From 2123af4939e80363b0679c42d7c4132e91398441 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Tue, 18 Apr 2023 14:40:46 +0100 Subject: [PATCH 1/6] EOPS-1547: Allow users to add annotations for refinery and collector deployments Signed-off-by: suryapandian --- charts/refinery/templates/deployment-redis.yaml | 3 +++ charts/refinery/templates/deployment.yaml | 3 +++ charts/refinery/values.yaml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/charts/refinery/templates/deployment-redis.yaml b/charts/refinery/templates/deployment-redis.yaml index 0402ae5c..114ff3eb 100644 --- a/charts/refinery/templates/deployment-redis.yaml +++ b/charts/refinery/templates/deployment-redis.yaml @@ -6,6 +6,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "refinery.redis.labels" . | nindent 4 }} +{{- with .Values.deploymentRedisAnnotations }} + annotations: {{ toYaml . | nindent 4 }} +{{- end }} spec: replicas: 1 selector: diff --git a/charts/refinery/templates/deployment.yaml b/charts/refinery/templates/deployment.yaml index a975987f..2d359778 100644 --- a/charts/refinery/templates/deployment.yaml +++ b/charts/refinery/templates/deployment.yaml @@ -5,6 +5,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "refinery.labels" . | nindent 4 }} +{{- with .Values.deploymentAnnotations }} + annotations: {{ toYaml . | nindent 4 }} +{{- end }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} diff --git a/charts/refinery/values.yaml b/charts/refinery/values.yaml index d8cae503..10b2e1c9 100644 --- a/charts/refinery/values.yaml +++ b/charts/refinery/values.yaml @@ -496,6 +496,9 @@ podLabels: {} podAnnotations: {} +deploymentAnnotations: {} +deploymentRedisAnnotations: {} + podSecurityContext: {} # fsGroup: 2000 From a2e4967d7b4b968f7a9d1aa13db683422532a59a Mon Sep 17 00:00:00 2001 From: suryapandian Date: Tue, 18 Apr 2023 14:42:32 +0100 Subject: [PATCH 2/6] collector deployment annotations Signed-off-by: suryapandian --- charts/opentelemetry-collector/templates/deployment.yaml | 3 +++ charts/opentelemetry-collector/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/opentelemetry-collector/templates/deployment.yaml b/charts/opentelemetry-collector/templates/deployment.yaml index 9a0270d0..c243a774 100644 --- a/charts/opentelemetry-collector/templates/deployment.yaml +++ b/charts/opentelemetry-collector/templates/deployment.yaml @@ -5,6 +5,9 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "opentelemetry-collector.labels" . | nindent 4 }} +{{- with .Values.deploymentAnnotations }} + annotations: {{ toYaml . | nindent 4 }} +{{- end }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} diff --git a/charts/opentelemetry-collector/values.yaml b/charts/opentelemetry-collector/values.yaml index 9aecd220..b17e0310 100644 --- a/charts/opentelemetry-collector/values.yaml +++ b/charts/opentelemetry-collector/values.yaml @@ -77,6 +77,8 @@ image: # used if autoscaling.enabled is false replicaCount: 1 +deploymentAnnotations: {} + podAnnotations: {} podSecurityContext: {} From 2dcf72eb2d852dc92f2152a007c24a6e7d87cf31 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Tue, 18 Apr 2023 16:06:28 +0100 Subject: [PATCH 3/6] Revert "collector deployment annotations" This reverts commit a2e4967d7b4b968f7a9d1aa13db683422532a59a. --- charts/opentelemetry-collector/templates/deployment.yaml | 3 --- charts/opentelemetry-collector/values.yaml | 2 -- 2 files changed, 5 deletions(-) diff --git a/charts/opentelemetry-collector/templates/deployment.yaml b/charts/opentelemetry-collector/templates/deployment.yaml index c243a774..9a0270d0 100644 --- a/charts/opentelemetry-collector/templates/deployment.yaml +++ b/charts/opentelemetry-collector/templates/deployment.yaml @@ -5,9 +5,6 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "opentelemetry-collector.labels" . | nindent 4 }} -{{- with .Values.deploymentAnnotations }} - annotations: {{ toYaml . | nindent 4 }} -{{- end }} spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} diff --git a/charts/opentelemetry-collector/values.yaml b/charts/opentelemetry-collector/values.yaml index b17e0310..9aecd220 100644 --- a/charts/opentelemetry-collector/values.yaml +++ b/charts/opentelemetry-collector/values.yaml @@ -77,8 +77,6 @@ image: # used if autoscaling.enabled is false replicaCount: 1 -deploymentAnnotations: {} - podAnnotations: {} podSecurityContext: {} From f7d59ed82b0673e6bd7f7b9afcc0b2b74c20ec32 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Tue, 18 Apr 2023 16:59:43 +0100 Subject: [PATCH 4/6] add annotation under redis Signed-off-by: suryapandian --- charts/refinery/templates/deployment-redis.yaml | 2 +- charts/refinery/values.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/charts/refinery/templates/deployment-redis.yaml b/charts/refinery/templates/deployment-redis.yaml index 114ff3eb..381c8e00 100644 --- a/charts/refinery/templates/deployment-redis.yaml +++ b/charts/refinery/templates/deployment-redis.yaml @@ -6,7 +6,7 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "refinery.redis.labels" . | nindent 4 }} -{{- with .Values.deploymentRedisAnnotations }} +{{- with .Values.redis.deploymentAnnotations }} annotations: {{ toYaml . | nindent 4 }} {{- end }} spec: diff --git a/charts/refinery/values.yaml b/charts/refinery/values.yaml index 10b2e1c9..407b19b8 100644 --- a/charts/refinery/values.yaml +++ b/charts/refinery/values.yaml @@ -481,7 +481,7 @@ redis: # Affinity specific to installed Redis configuration. Requires redis.enabled to be true affinity: {} - + deploymentAnnotations: {} serviceAccount: # Specifies whether a service account should be created create: true @@ -497,7 +497,6 @@ podLabels: {} podAnnotations: {} deploymentAnnotations: {} -deploymentRedisAnnotations: {} podSecurityContext: {} # fsGroup: 2000 From cd55ebf989d3f7b5e19e66215b28b940a9cab609 Mon Sep 17 00:00:00 2001 From: suryapandian Date: Tue, 18 Apr 2023 17:11:31 +0100 Subject: [PATCH 5/6] use image annotations to be consistent with naming convention Signed-off-by: suryapandian --- charts/refinery/templates/deployment-redis.yaml | 2 +- charts/refinery/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/refinery/templates/deployment-redis.yaml b/charts/refinery/templates/deployment-redis.yaml index 381c8e00..b5355dc7 100644 --- a/charts/refinery/templates/deployment-redis.yaml +++ b/charts/refinery/templates/deployment-redis.yaml @@ -6,7 +6,7 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "refinery.redis.labels" . | nindent 4 }} -{{- with .Values.redis.deploymentAnnotations }} +{{- with .Values.redis.image.annotations }} annotations: {{ toYaml . | nindent 4 }} {{- end }} spec: diff --git a/charts/refinery/values.yaml b/charts/refinery/values.yaml index 407b19b8..d862fb3f 100644 --- a/charts/refinery/values.yaml +++ b/charts/refinery/values.yaml @@ -481,7 +481,7 @@ redis: # Affinity specific to installed Redis configuration. Requires redis.enabled to be true affinity: {} - deploymentAnnotations: {} + annotations: {} serviceAccount: # Specifies whether a service account should be created create: true From e2142b115c3eac822531d2d98ca4dcbd442acfca Mon Sep 17 00:00:00 2001 From: suryapandian Date: Wed, 19 Apr 2023 00:00:08 +0100 Subject: [PATCH 6/6] use annotation in redis Signed-off-by: suryapandian --- charts/refinery/templates/deployment-redis.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/refinery/templates/deployment-redis.yaml b/charts/refinery/templates/deployment-redis.yaml index b5355dc7..8710b0c3 100644 --- a/charts/refinery/templates/deployment-redis.yaml +++ b/charts/refinery/templates/deployment-redis.yaml @@ -6,7 +6,7 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "refinery.redis.labels" . | nindent 4 }} -{{- with .Values.redis.image.annotations }} +{{- with .Values.redis.annotations }} annotations: {{ toYaml . | nindent 4 }} {{- end }} spec: