diff --git a/src/apm/php.go b/src/apm/php.go index 70984aeb..82795f33 100644 --- a/src/apm/php.go +++ b/src/apm/php.go @@ -90,7 +90,7 @@ func InjectPhpagent(phpSpec v1alpha1.Php, pod corev1.Pod, index int) (corev1.Pod return pod, nil } -// setDotNetEnvVar function sets env var to the container if not exist already. +// setPhpEnvVar function sets env var to the container if not exist already. // value of concatValues should be set to true if the env var supports multiple values separated by :. // If it is set to false, the original container's env var value has priority. func setPhpEnvVar(container *corev1.Container, envVarName string, envVarValue string, concatValues bool) { diff --git a/src/instrumentation/upgrade/upgrade.go b/src/instrumentation/upgrade/upgrade.go index 69d25985..ce7973ef 100644 --- a/src/instrumentation/upgrade/upgrade.go +++ b/src/instrumentation/upgrade/upgrade.go @@ -110,7 +110,7 @@ func (u *InstrumentationUpgrade) upgrade(_ context.Context, inst v1alpha1.Instru // upgrade the image only if the image matches the annotation if inst.Spec.Php.Image == autoInstPhp { inst.Spec.Php.Image = u.DefaultAutoInstPhp - inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationDotNet] = u.DefaultAutoInstPhp + inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationPhp] = u.DefaultAutoInstPhp } } autoInstGo := inst.Annotations[v1alpha1.AnnotationDefaultAutoInstrumentationGo] diff --git a/src/internal/config/main.go b/src/internal/config/main.go index 9247c4d2..13b20b4f 100644 --- a/src/internal/config/main.go +++ b/src/internal/config/main.go @@ -157,7 +157,7 @@ func (c *Config) AutoInstrumentationDotNetImage() string { return c.autoInstrumentationDotNetImage } -// AutoInstrumentationDotNetImage returns New Relic DotNet auto-instrumentation container image. +// AutoInstrumentationPhpImage returns New Relic PHP auto-instrumentation container image. func (c *Config) AutoInstrumentationPhpImage() string { return c.autoInstrumentationPhpImage } diff --git a/src/main.go b/src/main.go index 9d434656..464f306b 100644 --- a/src/main.go +++ b/src/main.go @@ -102,7 +102,7 @@ func main() { pflag.StringVar(&autoInstrumentationNodeJS, "auto-instrumentation-nodejs-image", fmt.Sprintf("ghcr.io/newrelic-experimental/newrelic-agent-operator/instrumentation-nodejs:%s", v.AutoInstrumentationNodeJS), "The default New Relic NodeJS instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationPython, "auto-instrumentation-python-image", fmt.Sprintf("ghcr.io/newrelic-experimental/newrelic-agent-operator/instrumentation-python:%s", v.AutoInstrumentationPython), "The default New Relic Python instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationDotNet, "auto-instrumentation-dotnet-image", fmt.Sprintf("ghcr.io/newrelic-experimental/newrelic-agent-operator/instrumentation-dotnet:%s", v.AutoInstrumentationDotNet), "The default New Relic DotNet instrumentation image. This image is used when no image is specified in the CustomResource.") - pflag.StringVar(&autoInstrumentationPhp, "auto-instrumentation-php-image", fmt.Sprintf("ghcr.io/newrelic-experimental/newrelic-agent-operator/instrumentation-php:%s", v.AutoInstrumentationDotNet), "The default New Relic Php instrumentation image. This image is used when no image is specified in the CustomResource.") + pflag.StringVar(&autoInstrumentationPhp, "auto-instrumentation-php-image", fmt.Sprintf("ghcr.io/newrelic-experimental/newrelic-agent-operator/instrumentation-php:%s", v.AutoInstrumentationPhp), "The default New Relic Php instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringVar(&autoInstrumentationGo, "auto-instrumentation-go-image", fmt.Sprintf("ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go:%s", v.AutoInstrumentationGo), "The default Opentelemtry Go instrumentation image. This image is used when no image is specified in the CustomResource.") pflag.StringArrayVar(&labelsFilter, "labels", []string{}, "Labels to filter away from propagating onto deploys")