From 8a89af9a5cf05a6af5f33ccf3b2b4903ff7e5660 Mon Sep 17 00:00:00 2001 From: Julia Jia Date: Tue, 10 Oct 2023 07:56:02 -0700 Subject: [PATCH] [opentelemetry-operator] Add affinity, tolerations and nodeSelector to tests (#911) * Add affinity, tolerations and nodeSelector to tests * Change version from 0.40.0 to 0.39.2 --- charts/opentelemetry-operator/Chart.yaml | 2 +- .../operator-webhook-with-cert-manager.yaml | 4 ++-- .../default/rendered/certmanager.yaml | 4 ++-- .../default/rendered/clusterrole.yaml | 6 +++--- .../default/rendered/clusterrolebinding.yaml | 4 ++-- .../examples/default/rendered/deployment.yaml | 2 +- .../examples/default/rendered/role.yaml | 2 +- .../default/rendered/rolebinding.yaml | 2 +- .../examples/default/rendered/service.yaml | 4 ++-- .../default/rendered/serviceaccount.yaml | 2 +- .../tests/test-certmanager-connection.yaml | 2 +- .../tests/test-service-connection.yaml | 4 ++-- .../tests/test-certmanager-connection.yaml | 9 +++++++++ .../tests/test-service-connection.yaml | 19 +++++++++++++++++++ 14 files changed, 47 insertions(+), 19 deletions(-) diff --git a/charts/opentelemetry-operator/Chart.yaml b/charts/opentelemetry-operator/Chart.yaml index 324339f2d..9c0bee4d7 100644 --- a/charts/opentelemetry-operator/Chart.yaml +++ b/charts/opentelemetry-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: opentelemetry-operator -version: 0.39.1 +version: 0.39.2 description: OpenTelemetry Operator Helm chart for Kubernetes type: application home: https://opentelemetry.io/ diff --git a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml index 7089f587c..8b107f2ad 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/admission-webhooks/operator-webhook-with-cert-manager.yaml @@ -6,7 +6,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -85,7 +85,7 @@ metadata: annotations: cert-manager.io/inject-ca-from: default/example-opentelemetry-operator-serving-cert labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml index 63142f09b..bc2758f4c 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/certmanager.yaml @@ -4,7 +4,7 @@ apiVersion: cert-manager.io/v1 kind: Certificate metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -29,7 +29,7 @@ apiVersion: cert-manager.io/v1 kind: Issuer metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml index ba524ed6c..7e1666d84 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrole.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -214,7 +214,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -232,7 +232,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml index d704c38d8..ba987efd3 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/clusterrolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -25,7 +25,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml index 343aa1839..b1bae29db 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/deployment.yaml @@ -4,7 +4,7 @@ apiVersion: apps/v1 kind: Deployment metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/role.yaml b/charts/opentelemetry-operator/examples/default/rendered/role.yaml index bdc6c8af8..dd9656a94 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/role.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/role.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml index cc8358db4..4d3d22d21 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/rolebinding.yaml @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/service.yaml b/charts/opentelemetry-operator/examples/default/rendered/service.yaml index 5eec6093b..ea6cd98c1 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/service.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/service.yaml @@ -4,7 +4,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -31,7 +31,7 @@ apiVersion: v1 kind: Service metadata: labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml index 509fb4ec7..74871d41a 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/serviceaccount.yaml @@ -6,7 +6,7 @@ metadata: name: opentelemetry-operator namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml index 0979a9ba5..aaba4141c 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-certmanager-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-cert-manager" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml index cfb6c6779..1c8b41cff 100644 --- a/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/examples/default/rendered/tests/test-service-connection.yaml @@ -6,7 +6,7 @@ metadata: name: "example-opentelemetry-operator-metrics" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm @@ -43,7 +43,7 @@ metadata: name: "example-opentelemetry-operator-webhook" namespace: default labels: - helm.sh/chart: opentelemetry-operator-0.39.1 + helm.sh/chart: opentelemetry-operator-0.39.2 app.kubernetes.io/name: opentelemetry-operator app.kubernetes.io/version: "0.85.0" app.kubernetes.io/managed-by: Helm diff --git a/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml b/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml index 622f8840c..f60b10f89 100644 --- a/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml +++ b/charts/opentelemetry-operator/templates/tests/test-certmanager-connection.yaml @@ -30,4 +30,13 @@ spec: else exit 1 fi restartPolicy: Never + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml b/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml index ac6a560b6..203eb4321 100644 --- a/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml +++ b/charts/opentelemetry-operator/templates/tests/test-service-connection.yaml @@ -31,6 +31,15 @@ spec: else exit 1 fi restartPolicy: Never + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 4 }} + {{- end }} {{- end }} --- apiVersion: v1 @@ -64,3 +73,13 @@ spec: else exit 1 fi restartPolicy: Never + {{- with .Values.affinity }} + affinity: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: {{ toYaml . | nindent 4 }} + {{- end }} +