Skip to content

Commit

Permalink
fixing wrong change.
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan-tree-zhou committed Jan 25, 2022
1 parent 34c36d3 commit afcf9e6
Show file tree
Hide file tree
Showing 7 changed files with 434 additions and 65 deletions.
4 changes: 2 additions & 2 deletions apis/v1alpha1/instrumentation_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
AnnotationDefaultAutoInstrumentationJava = "instrumentation.opentelemetry.io/default-auto-instrumentation-java-image"
AnnotationDefaultAutoInstrumentationNodeJS = "instrumentation.opentelemetry.io/default-auto-instrumentation-nodejs-image"
AnnotationDefaultAutoInstrumentationPython = "instrumentation.opentelemetry.io/default-auto-instrumentation-python-image"
EnvPrefix = "OTEL_"
envPrefix = "OTEL_"
)

// log is for logging in this package.
Expand Down Expand Up @@ -131,7 +131,7 @@ func (in *Instrumentation) validate() error {
func (in *Instrumentation) validateEnv(envs []corev1.EnvVar) error {
if len(envs) > 0 {
for _, env := range envs {
if !strings.HasPrefix(env.Name, EnvPrefix) {
if !strings.HasPrefix(env.Name, envPrefix) {
return fmt.Errorf("env name should start with \"OTEL_\": %s", env.Name)
}
}
Expand Down
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=opentelemetry-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.16.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.13.0+git
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
68 changes: 34 additions & 34 deletions bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ metadata:
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2020-12-16T13:37:00+00:00"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.16.0
operators.operatorframework.io/builder: operator-sdk-v1.13.0+git
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: github.com/open-telemetry/opentelemetry-operator
support: OpenTelemetry Community
Expand Down Expand Up @@ -376,29 +376,29 @@ spec:
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Fail
generateName: minstrumentation.kb.io
failurePolicy: Ignore
generateName: mpod.kb.io
rules:
- apiGroups:
- opentelemetry.io
- ""
apiVersions:
- v1alpha1
- v1
operations:
- CREATE
- UPDATE
resources:
- instrumentations
- pods
sideEffects: None
targetPort: 9443
type: MutatingAdmissionWebhook
webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation
webhookPath: /mutate-v1-pod
- admissionReviewVersions:
- v1
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Fail
generateName: mopentelemetrycollector.kb.io
generateName: minstrumentation.kb.io
rules:
- apiGroups:
- opentelemetry.io
Expand All @@ -408,47 +408,46 @@ spec:
- CREATE
- UPDATE
resources:
- opentelemetrycollectors
- instrumentations
sideEffects: None
targetPort: 9443
type: MutatingAdmissionWebhook
webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector
webhookPath: /mutate-opentelemetry-io-v1alpha1-instrumentation
- admissionReviewVersions:
- v1
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Ignore
generateName: mpod.kb.io
failurePolicy: Fail
generateName: mopentelemetrycollector.kb.io
rules:
- apiGroups:
- ""
- opentelemetry.io
apiVersions:
- v1
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- pods
- opentelemetrycollectors
sideEffects: None
targetPort: 9443
type: MutatingAdmissionWebhook
webhookPath: /mutate-v1-pod
webhookPath: /mutate-opentelemetry-io-v1alpha1-opentelemetrycollector
- admissionReviewVersions:
- v1
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Fail
generateName: vinstrumentationcreateupdate.kb.io
failurePolicy: Ignore
generateName: vinstrumentationdelete.kb.io
rules:
- apiGroups:
- opentelemetry.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
- DELETE
resources:
- instrumentations
sideEffects: None
Expand All @@ -460,36 +459,36 @@ spec:
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Ignore
generateName: vinstrumentationdelete.kb.io
failurePolicy: Fail
generateName: vopentelemetrycollectorcreateupdate.kb.io
rules:
- apiGroups:
- opentelemetry.io
apiVersions:
- v1alpha1
operations:
- DELETE
- CREATE
- UPDATE
resources:
- instrumentations
- opentelemetrycollectors
sideEffects: None
targetPort: 9443
type: ValidatingAdmissionWebhook
webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation
webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector
- admissionReviewVersions:
- v1
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Fail
generateName: vopentelemetrycollectorcreateupdate.kb.io
failurePolicy: Ignore
generateName: vopentelemetrycollectordelete.kb.io
rules:
- apiGroups:
- opentelemetry.io
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
- DELETE
resources:
- opentelemetrycollectors
sideEffects: None
Expand All @@ -501,18 +500,19 @@ spec:
- v1beta1
containerPort: 443
deploymentName: opentelemetry-operator-controller-manager
failurePolicy: Ignore
generateName: vopentelemetrycollectordelete.kb.io
failurePolicy: Fail
generateName: vinstrumentationcreateupdate.kb.io
rules:
- apiGroups:
- opentelemetry.io
apiVersions:
- v1alpha1
operations:
- DELETE
- CREATE
- UPDATE
resources:
- opentelemetrycollectors
- instrumentations
sideEffects: None
targetPort: 9443
type: ValidatingAdmissionWebhook
webhookPath: /validate-opentelemetry-io-v1alpha1-opentelemetrycollector
webhookPath: /validate-opentelemetry-io-v1alpha1-instrumentation
Loading

0 comments on commit afcf9e6

Please sign in to comment.