diff --git a/.chloggen/ha-webhook.yaml b/.chloggen/ha-webhook.yaml new file mode 100644 index 0000000000..33ec4787cb --- /dev/null +++ b/.chloggen/ha-webhook.yaml @@ -0,0 +1,18 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action) +component: auto-instrumentation + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Provide high availability for the instrumentation webhook on OpenShift. + +# One or more tracking issues related to the change +issues: [5010] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: | + On OpenShift, the operator is deployed with 2 replicas. This ensures the auto-instrumentation pod mutating webhook + high availability. The operator deployment now also defines PodDisruptionBudgets to ensure the replicas run on different nodes. diff --git a/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml index 29ef4b9305..3ea11d67ce 100644 --- a/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -99,7 +99,7 @@ metadata: categories: Logging & Tracing,Monitoring,Observability certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2026-04-27T14:53:29Z" + createdAt: "2026-04-29T13:09:32Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.29.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 diff --git a/bundle/openshift/manifests/opentelemetry-operator-controller-manager_policy_v1_poddisruptionbudget.yaml b/bundle/openshift/manifests/opentelemetry-operator-controller-manager_policy_v1_poddisruptionbudget.yaml new file mode 100644 index 0000000000..b6335d0164 --- /dev/null +++ b/bundle/openshift/manifests/opentelemetry-operator-controller-manager_policy_v1_poddisruptionbudget.yaml @@ -0,0 +1,13 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + name: opentelemetry-operator-controller-manager +spec: + minAvailable: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager diff --git a/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml b/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml index 3996aaf428..f1068d41e7 100644 --- a/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml +++ b/bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml @@ -99,7 +99,7 @@ metadata: categories: Logging & Tracing,Monitoring,Observability certified: "false" containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator - createdAt: "2026-04-27T14:53:29Z" + createdAt: "2026-04-29T13:09:32Z" description: Provides the OpenTelemetry components, including the Collector operators.operatorframework.io/builder: operator-sdk-v1.29.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v3 @@ -540,18 +540,32 @@ spec: control-plane: controller-manager name: opentelemetry-operator-controller-manager spec: - replicas: 1 + replicas: 2 selector: matchLabels: app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager - strategy: {} + strategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + type: RollingUpdate template: metadata: labels: app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager spec: + affinity: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + topologyKey: kubernetes.io/hostname + weight: 100 containers: - args: - --zap-log-level=info diff --git a/config/overlays/openshift/kustomization.yaml b/config/overlays/openshift/kustomization.yaml index 47d7cd1e4a..06b534510b 100644 --- a/config/overlays/openshift/kustomization.yaml +++ b/config/overlays/openshift/kustomization.yaml @@ -1,5 +1,6 @@ resources: - ../../default +- pdb.yaml patches: - path: manager-patch.yaml diff --git a/config/overlays/openshift/manager-patch.yaml b/config/overlays/openshift/manager-patch.yaml index aa14a7a62b..2e7ac528de 100644 --- a/config/overlays/openshift/manager-patch.yaml +++ b/config/overlays/openshift/manager-patch.yaml @@ -1,3 +1,25 @@ +- op: replace + path: "/spec/replicas" + value: 2 +- op: replace + path: "/spec/strategy" + value: + type: RollingUpdate + rollingUpdate: + maxUnavailable: 1 + maxSurge: 1 +- op: add + path: "/spec/template/spec/affinity" + value: + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + podAffinityTerm: + labelSelector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager + topologyKey: kubernetes.io/hostname - op: add path: "/spec/template/spec/containers/0/args" value: diff --git a/config/overlays/openshift/pdb.yaml b/config/overlays/openshift/pdb.yaml new file mode 100644 index 0000000000..67af574045 --- /dev/null +++ b/config/overlays/openshift/pdb.yaml @@ -0,0 +1,14 @@ +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: opentelemetry-operator-controller-manager + namespace: system + labels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager +spec: + minAvailable: 1 + selector: + matchLabels: + app.kubernetes.io/name: opentelemetry-operator + control-plane: controller-manager