Skip to content

Commit 9c54d04

Browse files
committed
change apache-http constant
1 parent dd0a690 commit 9c54d04

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import (
5252
"github.com/open-telemetry/opentelemetry-operator/internal/version"
5353
"github.com/open-telemetry/opentelemetry-operator/internal/webhook/podmutation"
5454
collectorupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/collector/upgrade"
55+
"github.com/open-telemetry/opentelemetry-operator/pkg/constants"
5556
"github.com/open-telemetry/opentelemetry-operator/pkg/featuregate"
5657
"github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation"
5758
instrumentationupgrade "github.com/open-telemetry/opentelemetry-operator/pkg/instrumentation/upgrade"
@@ -129,7 +130,7 @@ func main() {
129130
"Enabling this will ensure there is only one active controller manager.")
130131
pflag.BoolVar(&createRBACPermissions, "create-rbac-permissions", false, "Automatically create RBAC permissions needed by the processors")
131132
pflag.BoolVar(&enableMultiInstrumentation, "enable-multi-instrumentation", false, "Controls whether the operator supports multi instrumentation")
132-
pflag.BoolVar(&enableApacheHTTPInstrumentation, "enable-apache-http-instrumentation", true, "controls whether the operator supports Apache HTTPD auto-instrumentation")
133+
pflag.BoolVar(&enableApacheHTTPInstrumentation, constants.FlagApacheHttpd, true, "controls whether the operator supports Apache HTTPD auto-instrumentation")
133134
stringFlagOrEnv(&collectorImage, "collector-image", "RELATED_IMAGE_COLLECTOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:%s", v.OpenTelemetryCollector), "The default OpenTelemetry collector image. This image is used when no image is specified in the CustomResource.")
134135
stringFlagOrEnv(&targetAllocatorImage, "target-allocator-image", "RELATED_IMAGE_TARGET_ALLOCATOR", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/target-allocator:%s", v.TargetAllocator), "The default OpenTelemetry target allocator image. This image is used when no image is specified in the CustomResource.")
135136
stringFlagOrEnv(&operatorOpAMPBridgeImage, "operator-opamp-bridge-image", "RELATED_IMAGE_OPERATOR_OPAMP_BRIDGE", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-operator/operator-opamp-bridge:%s", v.OperatorOpAMPBridge), "The default OpenTelemetry Operator OpAMP Bridge image. This image is used when no image is specified in the CustomResource.")

pkg/constants/env.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ const (
3535
EnvPodUID = "OTEL_RESOURCE_ATTRIBUTES_POD_UID"
3636
EnvNodeName = "OTEL_RESOURCE_ATTRIBUTES_NODE_NAME"
3737

38-
ApacheHttpd = "apache-httpd"
38+
FlagApacheHttpd = "enable-apache-httpd-instrumentation"
3939
)

pkg/instrumentation/upgrade/upgrade.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ type InstrumentationUpgrade struct {
6262

6363
func NewInstrumentationUpgrade(client client.Client, logger logr.Logger, recorder record.EventRecorder, cfg config.Config) *InstrumentationUpgrade {
6464
defaultAnnotationToConfig := map[string]autoInstConfig{
65-
constants.AnnotationDefaultAutoInstrumentationApacheHttpd: autoInstConfig{constants.ApacheHttpd, cfg.EnableApacheHTTPAutoInstrumentation()},
65+
constants.AnnotationDefaultAutoInstrumentationApacheHttpd: autoInstConfig{constants.FlagApacheHttpd, cfg.EnableApacheHTTPAutoInstrumentation()},
6666
}
6767

6868
return &InstrumentationUpgrade{

0 commit comments

Comments
 (0)