diff --git a/charts/litmus-agent/README.md b/charts/litmus-agent/README.md index 4d504ee6..11ce4a39 100644 --- a/charts/litmus-agent/README.md +++ b/charts/litmus-agent/README.md @@ -80,6 +80,7 @@ $ helm install litmus-agent litmuschaos/litmus-agent \ | image.pullPolicy | string | `"Always"` | | | image.repository | string | `"litmuschaos.docker.scarf.sh/litmuschaos/litmus-helm-agent"` | | | image.tag | string | `"latest"` | | +| podAnnotations | object | `{}` | | | resources.limits.cpu | string | `"100m"` | | | resources.limits.memory | string | `"128Mi"` | | | resources.requests.cpu | string | `"100m"` | | diff --git a/charts/litmus-agent/templates/_helpers.tpl b/charts/litmus-agent/templates/_helpers.tpl index e6c34bd3..811ea3b7 100644 --- a/charts/litmus-agent/templates/_helpers.tpl +++ b/charts/litmus-agent/templates/_helpers.tpl @@ -53,6 +53,19 @@ app.kubernetes.io/name: {{ include "litmus-agent.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Common pod annotations +*/}} +{{- define "litmus-agent.podAnnotations" -}} +{{- if .Values.global.podAnnotations }} +{{ toYaml .Values.global.podAnnotations }} +{{- end }} +{{- if .Values.podAnnotations }} +{{ toYaml .Values.podAnnotations }} +{{- end }} +{{- end -}} + + {{/* Create the name of the service account to use */}} diff --git a/charts/litmus-agent/templates/hook-pre-install-job.yaml b/charts/litmus-agent/templates/hook-pre-install-job.yaml index 1f8ab77e..4389ec55 100644 --- a/charts/litmus-agent/templates/hook-pre-install-job.yaml +++ b/charts/litmus-agent/templates/hook-pre-install-job.yaml @@ -15,6 +15,10 @@ spec: template: metadata: name: "{{ .Release.Name }}" + {{- with include "litmus-agent.podAnnotations" . }} + annotations: + {{- . | indent 8 }} + {{- end }} labels: {{- include "litmus-agent.labels" . | nindent 8 }} spec: diff --git a/charts/litmus-agent/values.yaml b/charts/litmus-agent/values.yaml index b544dd39..dd0bcbcf 100644 --- a/charts/litmus-agent/values.yaml +++ b/charts/litmus-agent/values.yaml @@ -40,6 +40,8 @@ image: crds: create: true +podAnnotations: {} + resources: limits: cpu: 100m