Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(litmus): add pod annotations support #274

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/litmus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "2.12.0"
description: A Helm chart to install ChaosCenter
name: litmus
version: 2.13.0
version: 2.13.1
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
4 changes: 3 additions & 1 deletion charts/litmus/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# litmus

![Version: 2.13.0](https://img.shields.io/badge/Version-2.13.0-informational?style=flat-square) ![AppVersion: 2.12.0](https://img.shields.io/badge/AppVersion-2.12.0-informational?style=flat-square)
![Version: 2.13.1](https://img.shields.io/badge/Version-2.13.1-informational?style=flat-square) ![AppVersion: 2.12.0](https://img.shields.io/badge/AppVersion-2.12.0-informational?style=flat-square)

A Helm chart to install ChaosCenter

Expand Down Expand Up @@ -80,6 +80,7 @@ $ helm install litmus-portal litmuschaos/litmus
| portal.frontend.livenessProbe.successThreshold | int | `1` | |
| portal.frontend.livenessProbe.timeoutSeconds | int | `5` | |
| portal.frontend.nodeSelector | object | `{}` | |
| portal.frontend.podAnnotations | object | `{}` | |
| portal.frontend.readinessProbe.initialDelaySeconds | int | `5` | |
| portal.frontend.readinessProbe.periodSeconds | int | `10` | |
| portal.frontend.readinessProbe.successThreshold | int | `1` | |
Expand Down Expand Up @@ -181,6 +182,7 @@ $ helm install litmus-portal litmuschaos/litmus
| portal.server.graphqlServer.volumes[1].emptyDir | object | `{}` | |
| portal.server.graphqlServer.volumes[1].name | string | `"hub-storage"` | |
| portal.server.nodeSelector | object | `{}` | |
| portal.server.podAnnotations | object | `{}` | |
| portal.server.replicas | int | `1` | |
| portal.server.service.annotations | object | `{}` | |
| portal.server.service.authRpcServer.port | int | `3030` | |
Expand Down
6 changes: 6 additions & 0 deletions charts/litmus/templates/auth-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ spec:
{{- if .Values.portal.server.customLabels }}
{{ toYaml .Values.portal.server.customLabels | nindent 8 }}
{{- end }}
{{- if .Values.portal.server.podAnnotations }}
annotations:
{{- range $key, $value := .Values.portal.server.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
automountServiceAccountToken: {{ .Values.portal.server.authServer.automountServiceAccountToken }}
serviceAccountName: {{ .Values.portal.server.serviceAccountName }}
Expand Down
6 changes: 6 additions & 0 deletions charts/litmus/templates/frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ spec:
{{- if .Values.portal.frontend.customLabels }}
{{ toYaml .Values.portal.frontend.customLabels | nindent 8 }}
{{- end }}
{{- if .Values.portal.frontend.podAnnotations }}
annotations:
{{- range $key, $value := .Values.portal.frontend.podAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
automountServiceAccountToken: {{ .Values.portal.frontend.automountServiceAccountToken }}
{{- if .Values.image.imagePullSecrets }}
Expand Down
6 changes: 6 additions & 0 deletions charts/litmus/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ spec:
{{- if .Values.portal.server.customLabels }}
{{ toYaml .Values.portal.server.customLabels | nindent 8 }}
{{- end }}
{{- if .Values.portal.server.podAnnotations }}
annotations:
{{- range $key, $value := .Values.portal.server.podAnnotations }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itninja-hue Please consider replacing this with:

{{- with .Values.portal.server.podAnnotations }}
{{ toYaml . | indent 8 }}
    {{- end }}

This should result in the equivalent values yaml being:

[...]
portal:
  server:
    podAnnotations:
      annotation: "example"
      annotation.two: "example"
      [...]

instead of being divided into two keys and is much easier.

{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
spec:
serviceAccountName: {{ .Values.portal.server.serviceAccountName }}
{{- if .Values.image.imagePullSecrets }}
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ portal:
pullPolicy: "Always"
containerPort: 8080
customLabels: {}
podAnnotations: {}
# my.company.com/tier: "frontend"

resources:
Expand Down Expand Up @@ -296,6 +297,7 @@ portal:
nodeSelector: {}
tolerations: []
affinity: {}
podAnnotations: {}
Jonsy13 marked this conversation as resolved.
Show resolved Hide resolved

# OpenShift specific configuration
openshift:
Expand Down