Skip to content

Commit 7b64ec8

Browse files
Remove updates from pod mutating webhook (open-telemetry#2584)
* Remove 'update' from pod mutating webhook for autoinstrumentation * Revert shebang * Add chlog entry * Rename chloggen file
1 parent 3d71a5f commit 7b64ec8

File tree

5 files changed

+18
-5
lines changed

5 files changed

+18
-5
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: 'bug_fix'
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
5+
component: operator
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: "Removes UPDATE from pod mutating admission webhook since it only needs to mutate on pod CREATE events."
9+
10+
# One or more tracking issues related to the change
11+
issues: [1514]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: "The pod webhook currently modifies the pod spec in invalid ways on UPDATE events, and UPDATES are not necessary in the webhook."

bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ metadata:
6565
categories: Logging & Tracing,Monitoring
6666
certified: "false"
6767
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
68-
createdAt: "2024-03-01T10:16:23Z"
68+
createdAt: "2024-03-04T14:38:01Z"
6969
description: Provides the OpenTelemetry components, including the Collector
7070
operators.operatorframework.io/builder: operator-sdk-v1.29.0
7171
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
@@ -587,7 +587,6 @@ spec:
587587
- v1
588588
operations:
589589
- CREATE
590-
- UPDATE
591590
resources:
592591
- pods
593592
sideEffects: None

config/webhook/manifests.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ webhooks:
8080
- v1
8181
operations:
8282
- CREATE
83-
- UPDATE
8483
resources:
8584
- pods
8685
sideEffects: None

internal/webhook/podmutation/webhookhandler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
"github.com/open-telemetry/opentelemetry-operator/internal/config"
3030
)
3131

32-
// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1
32+
// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1
3333
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=list;watch
3434
// +kubebuilder:rbac:groups=opentelemetry.io,resources=opentelemetrycollectors,verbs=get;list;watch
3535
// +kubebuilder:rbac:groups=opentelemetry.io,resources=instrumentations,verbs=get;list;watch

tests/e2e-upgrade/upgrade-test/opentelemetry-operator-v0.86.0.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -8464,7 +8464,6 @@ webhooks:
84648464
- v1
84658465
operations:
84668466
- CREATE
8467-
- UPDATE
84688467
resources:
84698468
- pods
84708469
sideEffects: None

0 commit comments

Comments
 (0)