Skip to content

Commit 731d12a

Browse files
committed
Auto Monitor follow up changes (#311)
* Implement patching and workload informers * Update EnableMultiInstrumentationSupport and SkipMultiInstrumentationContainerValidation feature flags to be enabled by default * incorporate feedback
1 parent ad13931 commit 731d12a

File tree

9 files changed

+262
-103
lines changed

9 files changed

+262
-103
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func main() {
287287

288288
decoder := admission.NewDecoder(mgr.GetScheme())
289289

290-
instrumentationAnnotator, shouldMonitorAllServices := auto.CreateInstrumentationAnnotator(autoMonitorConfigStr, autoAnnotationConfigStr, ctx, mgr.GetClient(), mgr.GetAPIReader(), setupLog)
290+
instrumentationAnnotator := auto.CreateInstrumentationAnnotator(autoMonitorConfigStr, autoAnnotationConfigStr, ctx, mgr.GetClient(), mgr.GetAPIReader(), setupLog)
291291

292292
if instrumentationAnnotator != nil {
293293
mgr.GetWebhookServer().Register("/mutate-v1-workload", &webhook.Admission{
@@ -323,7 +323,7 @@ func main() {
323323
Handler: podmutation.NewWebhookHandler(cfg, ctrl.Log.WithName("pod-webhook"), decoder, mgr.GetClient(),
324324
[]podmutation.PodMutator{
325325
sidecar.NewMutator(logger, cfg, mgr.GetClient()),
326-
instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("amazon-cloudwatch-agent-operator"), shouldMonitorAllServices),
326+
instrumentation.NewMutator(logger, mgr.GetClient(), mgr.GetEventRecorderFor("amazon-cloudwatch-agent-operator")),
327327
}),
328328
})
329329
} else {

pkg/featuregate/featuregate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var (
5959

6060
EnableMultiInstrumentationSupport = featuregate.GlobalRegistry().MustRegister(
6161
"operator.autoinstrumentation.multi-instrumentation",
62-
featuregate.StageAlpha,
62+
featuregate.StageBeta,
6363
featuregate.WithRegisterFromVersion("0.86.0"),
6464
featuregate.WithRegisterDescription("controls whether the operator supports multi instrumentation"))
6565

@@ -86,7 +86,7 @@ var (
8686
// annotations from being used.
8787
SkipMultiInstrumentationContainerValidation = featuregate.GlobalRegistry().MustRegister(
8888
"operator.autoinstrumentation.multi-instrumentation.skip-container-validation",
89-
featuregate.StageAlpha,
89+
featuregate.StageBeta,
9090
featuregate.WithRegisterDescription("controls whether the operator validates the container annotations when multi-instrumentation is enabled"))
9191
)
9292

0 commit comments

Comments
 (0)