Skip to content

Commit 5a51725

Browse files
authored
Add pod annotations support (#407)
* Add pod annotations support - Add podAnnotations value to add podannotations on each components - Add customPodAnnotation value to add podannotations on all components - bumped version 3.11.1 and regenerated docs Signed-off-by: Calvin Audier <[email protected]> * Fix if condition that was always true Signed-off-by: Calvin Audier <[email protected]> * Regenerating docs with helm-docs Signed-off-by: Calvin Audier <[email protected]> --------- Signed-off-by: Calvin Audier <[email protected]> Signed-off-by: Calvinaud <[email protected]>
1 parent 2e2d416 commit 5a51725

File tree

7 files changed

+50
-3
lines changed

7 files changed

+50
-3
lines changed

Diff for: charts/litmus/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 ChaosCenter
44
name: litmus
5-
version: 3.13.0
5+
version: 3.13.1
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

Diff for: charts/litmus/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# litmus
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 ChaosCenter
66

@@ -59,6 +59,7 @@ We separated service configuration from `portal.server.service` to `portal.serve
5959
| adminConfig.VERSION | string | `"3.13.0"` | |
6060
| allowedOrigins | string | `".*"` | |
6161
| customLabels | object | `{}` | Additional labels |
62+
| customPodAnnotations | object | `{}` | Additional annotations |
6263
| existingSecret | string | `""` | Use existing secret (e.g., External Secrets) |
6364
| image.imagePullSecrets | list | `[]` | |
6465
| image.imageRegistryName | string | `"litmuschaos.docker.scarf.sh/litmuschaos"` | |
@@ -113,6 +114,7 @@ We separated service configuration from `portal.server.service` to `portal.serve
113114
| portal.frontend.livenessProbe.successThreshold | int | `1` | |
114115
| portal.frontend.livenessProbe.timeoutSeconds | int | `5` | |
115116
| portal.frontend.nodeSelector | object | `{}` | |
117+
| portal.frontend.podAnnotations | object | `{}` | |
116118
| portal.frontend.readinessProbe.initialDelaySeconds | int | `5` | |
117119
| portal.frontend.readinessProbe.periodSeconds | int | `10` | |
118120
| portal.frontend.readinessProbe.successThreshold | int | `1` | |
@@ -145,6 +147,7 @@ We separated service configuration from `portal.server.service` to `portal.serve
145147
| portal.server.authServer.image.pullPolicy | string | `"Always"` | |
146148
| portal.server.authServer.image.repository | string | `"litmusportal-auth-server"` | |
147149
| portal.server.authServer.image.tag | string | `"3.13.0"` | |
150+
| portal.server.authServer.podAnnotations | object | `{}` | |
148151
| portal.server.authServer.ports[0].containerPort | int | `3000` | |
149152
| portal.server.authServer.ports[0].name | string | `"auth-server"` | |
150153
| portal.server.authServer.ports[1].containerPort | int | `3030` | |
@@ -194,6 +197,7 @@ We separated service configuration from `portal.server.service` to `portal.serve
194197
| portal.server.graphqlServer.livenessProbe.periodSeconds | int | `10` | |
195198
| portal.server.graphqlServer.livenessProbe.successThreshold | int | `1` | |
196199
| portal.server.graphqlServer.livenessProbe.timeoutSeconds | int | `5` | |
200+
| portal.server.graphqlServer.podAnnotations | object | `{}` | |
197201
| portal.server.graphqlServer.ports[0].containerPort | int | `8080` | |
198202
| portal.server.graphqlServer.ports[0].name | string | `"gql-server"` | |
199203
| portal.server.graphqlServer.ports[1].containerPort | int | `8000` | |

Diff for: charts/litmus/templates/_helpers.tpl

+27
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,30 @@ mongodb://{{ trimSuffix "," $hosts }}/admin
136136
{{- end -}}
137137
{{- end -}}
138138

139+
{{/* section to define the podannotations for the different components */}}
140+
{{- define "litmus-portal.podannotations.auth-server" -}}
141+
{{- if .Values.customPodAnnotations }}
142+
{{ toYaml .Values.customPodAnnotations }}
143+
{{- end }}
144+
{{- if .Values.portal.server.authServer.podAnnotations }}
145+
{{ toYaml .Values.portal.server.authServer.podAnnotations }}
146+
{{- end }}
147+
{{- end -}}
148+
149+
{{- define "litmus-portal.podannotations.graphql-server" -}}
150+
{{- if .Values.customPodAnnotations }}
151+
{{ toYaml .Values.customPodAnnotations }}
152+
{{- end }}
153+
{{- if .Values.portal.server.graphqlServer.podAnnotations }}
154+
{{ toYaml .Values.portal.server.graphqlServer.podAnnotations }}
155+
{{- end }}
156+
{{- end -}}
157+
158+
{{- define "litmus-portal.podannotations.frontend" -}}
159+
{{- if .Values.customPodAnnotations }}
160+
{{ toYaml .Values.customPodAnnotations }}
161+
{{- end }}
162+
{{- if .Values.portal.frontend.podAnnotations }}
163+
{{ toYaml .Values.portal.frontend.podAnnotations }}
164+
{{- end }}
165+
{{- end -}}

Diff for: charts/litmus/templates/auth-server-deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ spec:
2828
{{- if .Values.portal.server.customLabels }}
2929
{{ toYaml .Values.portal.server.customLabels | nindent 8 }}
3030
{{- end }}
31+
{{- if include "litmus-portal.podannotations.auth-server" . }}
32+
annotations:
33+
{{- include "litmus-portal.podannotations.auth-server" . | indent 8 }}
34+
{{- end}}
3135
spec:
3236
automountServiceAccountToken: {{ .Values.portal.server.authServer.automountServiceAccountToken }}
3337
{{- if .Values.image.imagePullSecrets }}

Diff for: charts/litmus/templates/frontend-deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ spec:
2828
{{- if .Values.portal.frontend.customLabels }}
2929
{{ toYaml .Values.portal.frontend.customLabels | nindent 8 }}
3030
{{- end }}
31+
{{- if include "litmus-portal.podannotations.frontend" . }}
32+
annotations:
33+
{{- include "litmus-portal.podannotations.frontend" . | indent 8 }}
34+
{{- end}}
3135
spec:
3236
automountServiceAccountToken: {{ .Values.portal.frontend.automountServiceAccountToken }}
3337
{{- if .Values.image.imagePullSecrets }}

Diff for: charts/litmus/templates/server-deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ spec:
2626
{{- if .Values.portal.server.customLabels }}
2727
{{ toYaml .Values.portal.server.customLabels | nindent 8 }}
2828
{{- end }}
29+
{{- if include "litmus-portal.podannotations.graphql-server" . }}
30+
annotations:
31+
{{- include "litmus-portal.podannotations.graphql-server" . | indent 8 }}
32+
{{- end}}
2933
spec:
3034
automountServiceAccountToken: {{ .Values.portal.server.graphqlServer.automountServiceAccountToken }}
3135
{{- if .Values.image.imagePullSecrets }}

Diff for: charts/litmus/values.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Declare variables to be passed into your templates.
44
nameOverride: ""
55

6+
# -- Additional annotations
7+
customPodAnnotations: {}
68
# -- Additional labels
79
customLabels: {}
810
# my.company.com/concourse-cd: 2
@@ -123,6 +125,7 @@ portal:
123125
containerPort: 8185
124126
customLabels: {}
125127
# my.company.com/tier: "frontend"
128+
podAnnotations: {}
126129

127130
resources:
128131
# We usually recommend not to specify default resources and to leave this as a conscious
@@ -280,6 +283,7 @@ portal:
280283
periodSeconds: 10
281284
successThreshold: 1
282285
timeoutSeconds: 1
286+
podAnnotations: {}
283287
authServer:
284288
replicas: 1
285289
autoscaling:
@@ -328,7 +332,7 @@ portal:
328332
ephemeral-storage: "1Gi"
329333
volumeMounts: []
330334
volumes: []
331-
335+
podAnnotations: {}
332336
nodeSelector: {}
333337
tolerations: []
334338
affinity: {}

0 commit comments

Comments
 (0)