Skip to content

Commit 89f39c3

Browse files
CalvinaudJonsy13
andauthored
Fix agent global pod annotations (#408)
* Update the litmus-agent chart to use global podannotations - Add template in _helper to combiine global/local podAnnotation - Update deployment file - Bump version of chart and sub charts - Regenerate docs with helm-docs Signed-off-by: Calvin Audier <[email protected]> * Add pod-annotations to agent job Signed-off-by: Calvin Audier <[email protected]> * Running helm-docs Signed-off-by: Calvin Audier <[email protected]> --------- Signed-off-by: Calvin Audier <[email protected]> Signed-off-by: Calvinaud <[email protected]> Co-authored-by: Vedant Shrotria <[email protected]>
1 parent 5a51725 commit 89f39c3

File tree

25 files changed

+112
-32
lines changed

25 files changed

+112
-32
lines changed

charts/litmus-agent/Chart.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "3.13.0"
33
description: A Helm chart to install litmus agent
44
name: litmus-agent
5-
version: 3.13.0
5+
version: 3.13.1
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:
@@ -21,17 +21,17 @@ maintainers:
2121
icon: https://raw.githubusercontent.com/litmuschaos/icons/master/litmus.png
2222
dependencies:
2323
- name: chaos-operator
24-
version: 3.13.0
24+
version: 3.13.1
2525
condition: chaos-operator.enabled
2626
- name: chaos-exporter
27-
version: 3.13.0
27+
version: 3.13.1
2828
condition: chaos-exporter.enabled
2929
- name: event-tracker
30-
version: 3.13.0
30+
version: 3.13.1
3131
condition: event-tracker.enabled
3232
- name: subscriber
33-
version: 3.13.0
33+
version: 3.13.1
3434
condition: subscriber.enabled
3535
- name: workflow-controller
36-
version: 0.2.1
36+
version: 0.2.2
3737
condition: workflow-controller.enabled

charts/litmus-agent/README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# litmus-agent
22

3-
![Version: 3.13.0](https://img.shields.io/badge/Version-3.13.0-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
3+
![Version: 3.13.1](https://img.shields.io/badge/Version-3.13.1-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
44

55
A Helm chart to install litmus agent
66

@@ -24,11 +24,11 @@ Kubernetes: `>=1.16.0-0`
2424

2525
| Repository | Name | Version |
2626
|------------|------|---------|
27-
| | chaos-exporter | 3.13.0 |
28-
| | chaos-operator | 3.13.0 |
29-
| | event-tracker | 3.13.0 |
30-
| | subscriber | 3.13.0 |
31-
| | workflow-controller | 0.2.1 |
27+
| | chaos-exporter | 3.13.1 |
28+
| | chaos-operator | 3.13.1 |
29+
| | event-tracker | 3.13.1 |
30+
| | subscriber | 3.13.1 |
31+
| | workflow-controller | 0.2.2 |
3232

3333
## Installing the Chart
3434

@@ -80,6 +80,7 @@ $ helm install litmus-agent litmuschaos/litmus-agent \
8080
| image.pullPolicy | string | `"Always"` | |
8181
| image.repository | string | `"litmuschaos.docker.scarf.sh/litmuschaos/litmus-helm-agent"` | |
8282
| image.tag | string | `"latest"` | |
83+
| podAnnotations | object | `{}` | |
8384
| resources.limits.cpu | string | `"100m"` | |
8485
| resources.limits.memory | string | `"128Mi"` | |
8586
| resources.requests.cpu | string | `"100m"` | |

charts/litmus-agent/charts/chaos-exporter/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "3.13.0"
33
description: A Helm chart to install chaos-exporter
44
name: chaos-exporter
5-
version: 3.13.0
5+
version: 3.13.1
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

charts/litmus-agent/charts/chaos-exporter/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# chaos-exporter
22

3-
![Version: 3.13.0](https://img.shields.io/badge/Version-3.13.0-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
3+
![Version: 3.13.1](https://img.shields.io/badge/Version-3.13.1-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
44

55
A Helm chart to install chaos-exporter
66

charts/litmus-agent/charts/chaos-exporter/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ app.kubernetes.io/instance: {{ .Release.Name }}
5757
litmuschaos.io/app: {{ .Chart.Name }}
5858
{{- end }}
5959

60+
{{/*
61+
Common pod annotations
62+
*/}}
63+
{{- define "chaos-exporter.podAnnotations" -}}
64+
{{- if .Values.global.podAnnotations }}
65+
{{ toYaml .Values.global.podAnnotations }}
66+
{{- end }}
67+
{{- if .Values.podAnnotations }}
68+
{{ toYaml .Values.podAnnotations }}
69+
{{- end }}
70+
{{- end -}}
71+
6072
{{/*
6173
Create the name of the service account to use
6274
*/}}

charts/litmus-agent/charts/chaos-exporter/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ spec:
1313
{{- include "chaos-exporter.selectorLabels" . | nindent 6 }}
1414
template:
1515
metadata:
16-
{{- with .Values.podAnnotations }}
16+
{{- with include "chaos-exporter.podAnnotations" . }}
1717
annotations:
18-
{{- toYaml . | nindent 8 }}
18+
{{- . | indent 8 }}
1919
{{- end }}
2020
labels:
2121
{{- include "chaos-exporter.labels" . | nindent 8 }}

charts/litmus-agent/charts/chaos-operator/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "3.13.0"
33
description: A Helm chart to install chaos-operator
44
name: chaos-operator
5-
version: 3.13.0
5+
version: 3.13.1
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

charts/litmus-agent/charts/chaos-operator/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# chaos-operator
22

3-
![Version: 3.13.0](https://img.shields.io/badge/Version-3.13.0-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
3+
![Version: 3.13.1](https://img.shields.io/badge/Version-3.13.1-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
44

55
A Helm chart to install chaos-operator
66

charts/litmus-agent/charts/chaos-operator/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ app.kubernetes.io/name: {{ include "chaos-operator.name" . }}
5757
app.kubernetes.io/instance: {{ .Release.Name }}
5858
{{- end }}
5959

60+
{{/*
61+
Common pod annotations
62+
*/}}
63+
{{- define "chaos-operator.podAnnotations" -}}
64+
{{- if .Values.global.podAnnotations }}
65+
{{ toYaml .Values.global.podAnnotations }}
66+
{{- end }}
67+
{{- if .Values.podAnnotations }}
68+
{{ toYaml .Values.podAnnotations }}
69+
{{- end }}
70+
{{- end -}}
71+
6072
{{/*
6173
Create the name of the service account to use
6274
*/}}

charts/litmus-agent/charts/chaos-operator/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ spec:
1313
{{- include "chaos-operator.selectorLabels" . | nindent 6 }}
1414
template:
1515
metadata:
16-
{{- with .Values.podAnnotations }}
16+
{{- with include "chaos-operator.podAnnotations" . }}
1717
annotations:
18-
{{- toYaml . | nindent 8 }}
18+
{{- . | indent 8 }}
1919
{{- end }}
2020
labels:
2121
{{- include "chaos-operator.labels" . | nindent 8 }}

charts/litmus-agent/charts/event-tracker/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "3.13.0"
33
description: A Helm chart to install event-tracker
44
name: event-tracker
5-
version: 3.13.0
5+
version: 3.13.1
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

charts/litmus-agent/charts/event-tracker/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# event-tracker
22

3-
![Version: 3.13.0](https://img.shields.io/badge/Version-3.13.0-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
3+
![Version: 3.13.1](https://img.shields.io/badge/Version-3.13.1-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
44

55
A Helm chart to install event-tracker
66

charts/litmus-agent/charts/event-tracker/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ app.kubernetes.io/name: {{ include "event-tracker.name" . }}
5757
app.kubernetes.io/instance: {{ .Release.Name }}
5858
{{- end }}
5959

60+
{{/*
61+
Common pod annotations
62+
*/}}
63+
{{- define "event-tracker.podAnnotations" -}}
64+
{{- if .Values.global.podAnnotations }}
65+
{{ toYaml .Values.global.podAnnotations }}
66+
{{- end }}
67+
{{- if .Values.podAnnotations }}
68+
{{ toYaml .Values.podAnnotations }}
69+
{{- end }}
70+
{{- end -}}
71+
6072
{{/*
6173
Create the name of the service account to use
6274
*/}}

charts/litmus-agent/charts/event-tracker/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ spec:
1313
{{- include "event-tracker.selectorLabels" . | nindent 6 }}
1414
template:
1515
metadata:
16-
{{- with .Values.podAnnotations }}
16+
{{- with include "event-tracker.podAnnotations" . }}
1717
annotations:
18-
{{- toYaml . | nindent 8 }}
18+
{{- . | indent 8 }}
1919
{{- end }}
2020
labels:
2121
{{- include "event-tracker.labels" . | nindent 8 }}

charts/litmus-agent/charts/subscriber/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "3.13.0"
33
description: A Helm chart to install subscriber
44
name: subscriber
5-
version: 3.13.0
5+
version: 3.13.1
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

charts/litmus-agent/charts/subscriber/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# subscriber
22

3-
![Version: 3.13.0](https://img.shields.io/badge/Version-3.13.0-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
3+
![Version: 3.13.1](https://img.shields.io/badge/Version-3.13.1-informational?style=flat-square) ![AppVersion: 3.13.0](https://img.shields.io/badge/AppVersion-3.13.0-informational?style=flat-square)
44

55
A Helm chart to install subscriber
66

charts/litmus-agent/charts/subscriber/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ app.kubernetes.io/name: {{ include "subscriber.name" . }}
5858
app.kubernetes.io/instance: {{ .Release.Name }}
5959
{{- end }}
6060

61+
{{/*
62+
Common pod annotations
63+
*/}}
64+
{{- define "subscriber.podAnnotations" -}}
65+
{{- if .Values.global.podAnnotations }}
66+
{{ toYaml .Values.global.podAnnotations }}
67+
{{- end }}
68+
{{- if .Values.podAnnotations }}
69+
{{ toYaml .Values.podAnnotations }}
70+
{{- end }}
71+
{{- end -}}
72+
6173
{{/*
6274
Create the name of the service account to use
6375
*/}}

charts/litmus-agent/charts/subscriber/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ spec:
1111
{{- include "subscriber.selectorLabels" . | nindent 6 }}
1212
template:
1313
metadata:
14-
{{- with .Values.podAnnotations }}
14+
{{- with include "subscriber.podAnnotations" . }}
1515
annotations:
16-
{{- toYaml . | nindent 8 }}
16+
{{- . | indent 8 }}
1717
{{- end }}
1818
labels:
1919
{{- include "subscriber.labels" . | nindent 8 }}

charts/litmus-agent/charts/workflow-controller/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
appVersion: "v3.3.1"
33
description: A Helm chart to install workflow-controller
44
name: workflow-controller
5-
version: 0.2.1
5+
version: 0.2.2
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

charts/litmus-agent/charts/workflow-controller/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# workflow-controller
22

3-
![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![AppVersion: v3.3.1](https://img.shields.io/badge/AppVersion-v3.3.1-informational?style=flat-square)
3+
![Version: 0.2.2](https://img.shields.io/badge/Version-0.2.2-informational?style=flat-square) ![AppVersion: v3.3.1](https://img.shields.io/badge/AppVersion-v3.3.1-informational?style=flat-square)
44

55
A Helm chart to install workflow-controller
66

charts/litmus-agent/charts/workflow-controller/templates/_helpers.tpl

+12
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ app.kubernetes.io/name: {{ include "workflow-controller.name" . }}
5757
app.kubernetes.io/instance: {{ .Release.Name }}
5858
{{- end }}
5959

60+
{{/*
61+
Common pod annotations
62+
*/}}
63+
{{- define "workflow-controller.podAnnotations" -}}
64+
{{- if .Values.global.podAnnotations }}
65+
{{ toYaml .Values.global.podAnnotations }}
66+
{{- end }}
67+
{{- if .Values.podAnnotations }}
68+
{{ toYaml .Values.podAnnotations }}
69+
{{- end }}
70+
{{- end -}}
71+
6072
{{/*
6173
Create the name of the service account to use
6274
*/}}

charts/litmus-agent/charts/workflow-controller/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ spec:
1313
{{- include "workflow-controller.selectorLabels" . | nindent 6 }}
1414
template:
1515
metadata:
16-
{{- with .Values.podAnnotations }}
16+
{{- with include "workflow-controller.podAnnotations" . }}
1717
annotations:
18-
{{- toYaml . | nindent 8 }}
18+
{{- . | indent 8 }}
1919
{{- end }}
2020
labels:
2121
{{- include "workflow-controller.labels" . | nindent 8 }}

charts/litmus-agent/templates/_helpers.tpl

+13
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ app.kubernetes.io/name: {{ include "litmus-agent.name" . }}
5353
app.kubernetes.io/instance: {{ .Release.Name }}
5454
{{- end }}
5555

56+
{{/*
57+
Common pod annotations
58+
*/}}
59+
{{- define "litmus-agent.podAnnotations" -}}
60+
{{- if .Values.global.podAnnotations }}
61+
{{ toYaml .Values.global.podAnnotations }}
62+
{{- end }}
63+
{{- if .Values.podAnnotations }}
64+
{{ toYaml .Values.podAnnotations }}
65+
{{- end }}
66+
{{- end -}}
67+
68+
5669
{{/*
5770
Create the name of the service account to use
5871
*/}}

charts/litmus-agent/templates/hook-pre-install-job.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ spec:
1515
template:
1616
metadata:
1717
name: "{{ .Release.Name }}"
18+
{{- with include "litmus-agent.podAnnotations" . }}
19+
annotations:
20+
{{- . | indent 8 }}
21+
{{- end }}
1822
labels:
1923
{{- include "litmus-agent.labels" . | nindent 8 }}
2024
spec:

charts/litmus-agent/values.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ image:
4040
crds:
4141
create: true
4242

43+
podAnnotations: {}
44+
4345
resources:
4446
limits:
4547
cpu: 100m

0 commit comments

Comments
 (0)