Skip to content

Commit 0c5e2e1

Browse files
authored
Add support for Kubernetes 1.35 (#4582)
* Add support for Kubernetes 1.35 * Fix e2e-crd-validations test for K8s 1.35 K8s 1.35 changed CEL validation error messages to no longer include "object": in the error output. Update the test to handle both formats.
1 parent fced786 commit 0c5e2e1

File tree

6 files changed

+57
-9
lines changed

6 files changed

+57
-9
lines changed

.chloggen/eks135.yaml

Lines changed: 16 additions & 0 deletions
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: enhancement
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, 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: Add support for Kubernetes 1.35
9+
10+
# One or more tracking issues related to the change
11+
issues: [4575]
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:

.github/workflows/e2e-reusable.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
# should be compatible with them.
6464
kube-version:
6565
- "1.25"
66-
- "1.34"
66+
- "1.35"
6767
group:
6868
- e2e
6969
- e2e-automatic-rbac

.github/workflows/scorecard.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
kube-version:
2323
- "1.25"
24-
- "1.34"
24+
- "1.35"
2525

2626
steps:
2727

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ endif
9696

9797
START_KIND_CLUSTER ?= true
9898

99-
KUBE_VERSION ?= 1.34
99+
KUBE_VERSION ?= 1.35
100100
KIND_CONFIG ?= kind-$(KUBE_VERSION).yaml
101101
KIND_CLUSTER_NAME ?= "otel-operator"
102102
CHAINSAW_SELECTOR := $(shell [ "$(shell printf '%s\n' "$(KUBE_VERSION)" "1.29" | sort -V | head -n1)" = "1.29" ] && echo "--selector sidecar=native" || echo "--selector sidecar=legacy")

kind-1.35.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
kind: Cluster
2+
apiVersion: kind.x-k8s.io/v1alpha4
3+
networking:
4+
ipFamily: dual
5+
nodes:
6+
- role: control-plane
7+
image: kindest/node:v1.35.0@sha256:452d707d4862f52530247495d180205e029056831160e22870e37e3f6c1ac31f
8+
kubeadmConfigPatches:
9+
- |
10+
kind: InitConfiguration
11+
nodeRegistration:
12+
kubeletExtraArgs:
13+
node-labels: "ingress-ready=true"
14+
extraPortMappings:
15+
- containerPort: 80
16+
hostPort: 80
17+
protocol: TCP
18+
- containerPort: 443
19+
hostPort: 443
20+
protocol: TCP

tests/e2e-crd-validations/sidecar/chainsaw-test.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ spec:
1515
- name: priorityClassErrorMessageCEL
1616
value: |-
1717
OpenTelemetryCollector.opentelemetry.io "sidecar-priorityclass" is invalid: spec: Invalid value: "object": the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'priorityClassName'
18+
- name: priorityClassErrorMessageCELv135
19+
value: |-
20+
OpenTelemetryCollector.opentelemetry.io "sidecar-priorityclass" is invalid: spec: Invalid value: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'priorityClassName'
1821
- name: priorityClassErrorMessageWebhook
1922
value: |-
2023
admission webhook "vopentelemetrycollectorcreateupdatebeta.kb.io" denied the request: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'priorityClassName'
@@ -24,12 +27,15 @@ spec:
2427
expect:
2528
- check:
2629
($error != null): true
27-
($error): (($minorVersion > `24` && $priorityClassErrorMessageCEL) || $priorityClassErrorMessageWebhook)
30+
($error): (($minorVersion >= `35` && $priorityClassErrorMessageCELv135) || ($minorVersion > `24` && $minorVersion < `35` && $priorityClassErrorMessageCEL) || $priorityClassErrorMessageWebhook)
2831
- name: step-01
2932
bindings:
3033
- name: tolerationErrorMessageCEL
3134
value: |-
3235
OpenTelemetryCollector.opentelemetry.io "sidecar-tolerations" is invalid: spec: Invalid value: "object": the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'tolerations'
36+
- name: tolerationErrorMessageCELv135
37+
value: |-
38+
OpenTelemetryCollector.opentelemetry.io "sidecar-tolerations" is invalid: spec: Invalid value: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'tolerations'
3339
- name: tolerationErrorMessageWebhook
3440
value: |-
3541
admission webhook "vopentelemetrycollectorcreateupdatebeta.kb.io" denied the request: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'tolerations'
@@ -39,12 +45,15 @@ spec:
3945
expect:
4046
- check:
4147
($error != null): true
42-
($error): (($minorVersion > `24` && $tolerationErrorMessageCEL) || $tolerationErrorMessageWebhook)
48+
($error): (($minorVersion >= `35` && $tolerationErrorMessageCELv135) || ($minorVersion > `24` && $minorVersion < `35` && $tolerationErrorMessageCEL) || $tolerationErrorMessageWebhook)
4349
- name: step-02
4450
bindings:
4551
- name: affinityErrorMessageCEL
4652
value: |-
4753
OpenTelemetryCollector.opentelemetry.io "sidecar-affinity" is invalid: spec: Invalid value: "object": the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'affinity'
54+
- name: affinityErrorMessageCELv135
55+
value: |-
56+
OpenTelemetryCollector.opentelemetry.io "sidecar-affinity" is invalid: spec: Invalid value: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'affinity'
4857
- name: affinityErrorMessageWebhook
4958
value: |-
5059
admission webhook "vopentelemetrycollectorcreateupdatebeta.kb.io" denied the request: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'affinity'
@@ -54,13 +63,16 @@ spec:
5463
expect:
5564
- check:
5665
($error != null): true
57-
($error): (($minorVersion > `24` && $affinityErrorMessageCEL) || $affinityErrorMessageWebhook)
66+
($error): (($minorVersion >= `35` && $affinityErrorMessageCELv135) || ($minorVersion > `24` && $minorVersion < `35` && $affinityErrorMessageCEL) || $affinityErrorMessageWebhook)
5867
- name: step-03
5968
bindings:
60-
- name: affinityErrorMessageCEL
69+
- name: additionalContainersErrorMessageCEL
6170
value: |-
6271
OpenTelemetryCollector.opentelemetry.io "sidecar-additional-containers" is invalid: spec: Invalid value: "object": the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'additionalContainers'
63-
- name: affinityErrorMessageWebhook
72+
- name: additionalContainersErrorMessageCELv135
73+
value: |-
74+
OpenTelemetryCollector.opentelemetry.io "sidecar-additional-containers" is invalid: spec: Invalid value: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'additionalContainers'
75+
- name: additionalContainersErrorMessageWebhook
6476
value: |-
6577
admission webhook "vopentelemetrycollectorcreateupdatebeta.kb.io" denied the request: the OpenTelemetry Collector mode is set to sidecar, which does not support the attribute 'AdditionalContainers'
6678
try:
@@ -69,4 +81,4 @@ spec:
6981
expect:
7082
- check:
7183
($error != null): true
72-
($error): (($minorVersion > `24` && $affinityErrorMessageCEL) || $affinityErrorMessageWebhook)
84+
($error): (($minorVersion >= `35` && $additionalContainersErrorMessageCELv135) || ($minorVersion > `24` && $minorVersion < `35` && $additionalContainersErrorMessageCEL) || $additionalContainersErrorMessageWebhook)

0 commit comments

Comments
 (0)