patch

package
v0.0.0-...-874eccf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NodeIPEnvName               = "NODE_IP"
	PodNameEnvVName             = "POD_NAME"
	PodNameEnvValue             = "$(POD_NAME)"
	LogzioLanguageAnnotation    = "logz.io/instrumentation-language"
	LogzioServiceAnnotationName = "logz.io/service-name"
)

Variables

View Source
var AnnotationPatcherInst = &AnnotationPatcher{}
View Source
var (
	LogzioMonitoringService = os.Getenv("MONITORING_SERVICE_ENDPOINT")
)
View Source
var PodOwnedLabels = []string{
	"app",
	"app.kubernetes.io/name",
}

Functions

func IsDetected

func IsDetected(ctx context.Context, original *v1.PodTemplateSpec, instrumentedApp *apiV1.InstrumentedApplication) (bool, error)

func IsTracesInstrumented

func IsTracesInstrumented(original *v1.PodTemplateSpec, instrumentation *apiV1.InstrumentedApplication) (bool, error)

func ModifyObject

func ModifyObject(original *v1.PodTemplateSpec, instrumentation *apiV1.InstrumentedApplication) error

func RollbackPatch

func RollbackPatch(original *v1.PodTemplateSpec, instrumentation *apiV1.InstrumentedApplication) error

func UpdateActiveServiceName

func UpdateActiveServiceName(original *v1.PodTemplateSpec, instrumentation *apiV1.InstrumentedApplication) error

Types

type AnnotationPatcher

type AnnotationPatcher struct{}

func (*AnnotationPatcher) Patch

type Patcher

type Patcher interface {
	Patch(podSpec *v1.PodTemplateSpec, instrumentation *apiV1.InstrumentedApplication)
	UnPatch(podSpec *v1.PodTemplateSpec) error
	IsTracesInstrumented(podSpec *v1.PodTemplateSpec) bool
	UpdateServiceNameEnv(podSpec *v1.PodTemplateSpec, instrumentation *apiV1.InstrumentedApplication)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL