Skip to content

Commit 65f5dce

Browse files
CalvinaudCalvin Audier
and
Calvin Audier
authored
Add custom label for resources in litmus-agent chart (#327)
* Add customs labels to litmus-agent helm chart #326 - Update helpers.tpl for chart and subchart to add custom labels to the labels litmus - Update deployment.yaml/hook-pre-install-job.yaml to add labels to the pods definition - Update values.yaml to include the customs labels on chart and sub chart. Signed-off-by: Calvin Audier <[email protected]> * Update docs for litmus-agent using helm-docs Update the README.md of the chart and subchart of litmus agent using helm-docs v1.11.0. Signed-off-by: Calvin Audier <[email protected]> * Bump version in charts of litmus-agent - Bump version of main chart from 0.1.4 to 0.2.0 - Bump version of subchart from 0.1.0 to 0.2.0 Signed-off-by: Calvin Audier <[email protected]> * Re-generate README.md with helm-docs Re-update the documentation with helm-docs 1.11.0 after bumping the version Signed-off-by: Calvin Audier <[email protected]> --------- Signed-off-by: Calvin Audier <[email protected]> Co-authored-by: Calvin Audier <[email protected]>
1 parent 584283d commit 65f5dce

30 files changed

+79
-23
lines changed

charts/litmus-agent/Chart.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
2-
appVersion: "0.1.4"
2+
appVersion: "0.2.0"
33
description: A Helm chart to install litmus agent
44
name: litmus-agent
5-
version: 0.1.4
5+
version: 0.2.0
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: 0.1.0
24+
version: 0.2.0
2525
condition: chaos-operator.enabled
2626
- name: chaos-exporter
27-
version: 0.1.0
27+
version: 0.2.0
2828
condition: chaos-exporter.enabled
2929
- name: event-tracker
30-
version: 0.1.0
30+
version: 0.2.0
3131
condition: event-tracker.enabled
3232
- name: subscriber
33-
version: 0.1.0
33+
version: 0.2.0
3434
condition: subscriber.enabled
3535
- name: workflow-controller
36-
version: 0.1.0
36+
version: 0.2.0
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: 0.1.4](https://img.shields.io/badge/Version-0.1.4-informational?style=flat-square) ![AppVersion: 0.1.4](https://img.shields.io/badge/AppVersion-0.1.4-informational?style=flat-square)
3+
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![AppVersion: 0.2.0](https://img.shields.io/badge/AppVersion-0.2.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 | 0.1.0 |
28-
| | chaos-operator | 0.1.0 |
29-
| | event-tracker | 0.1.0 |
30-
| | subscriber | 0.1.0 |
31-
| | workflow-controller | 0.1.0 |
27+
| | chaos-exporter | 0.2.0 |
28+
| | chaos-operator | 0.2.0 |
29+
| | event-tracker | 0.2.0 |
30+
| | subscriber | 0.2.0 |
31+
| | workflow-controller | 0.2.0 |
3232

3333
## Installing the Chart
3434

@@ -72,6 +72,7 @@ $ helm install litmus-agent litmuschaos/litmus-agent \
7272
| global.AGENT_MODE | string | `"cluster"` | |
7373
| global.agentConfigName | string | `"agent-config"` | |
7474
| global.agentSecretName | string | `"agent-secret"` | |
75+
| global.customLabels | object | `{}` | |
7576
| global.podAnnotations | object | `{}` | |
7677
| image.pullPolicy | string | `"Always"` | |
7778
| image.repository | string | `"litmuschaos/litmus-helm-agent"` | |

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.0.0-beta3"
33
description: A Helm chart to install chaos-exporter
44
name: chaos-exporter
5-
version: 0.1.0
5+
version: 0.2.0
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

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

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

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

55
A Helm chart to install chaos-exporter
66

@@ -32,6 +32,7 @@ Kubernetes: `>=1.16.0-0`
3232
| autoscaling.minReplicas | int | `1` | |
3333
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
3434
| config.tsdb_scrape_interval | int | `10` | |
35+
| customLabels | object | `{}` | |
3536
| enabled | bool | `true` | |
3637
| fullnameOverride | string | `""` | |
3738
| image.pullPolicy | string | `"Always"` | |

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

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ helm.sh/chart: {{ include "chaos-exporter.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- if .Values.global.customLabels }}
44+
{{ toYaml .Values.global.customLabels }}
45+
{{- end }}
46+
{{- if .Values.customLabels }}
47+
{{ toYaml .Values.customLabels }}
48+
{{- end }}
4349
{{- end }}
4450

4551
{{/*

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

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spec:
1919
{{- end }}
2020
labels:
2121
{{- include "chaos-exporter.selectorLabels" . | nindent 8 }}
22+
{{- include "chaos-exporter.labels" . | nindent 8 }}
2223
spec:
2324
{{- with .Values.imagePullSecrets }}
2425
imagePullSecrets:

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

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ serviceAccount:
3030

3131
podAnnotations: {}
3232

33+
customLabels: {}
34+
3335
podSecurityContext: {}
3436
# fsGroup: 2000
3537

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.0.0-beta3"
33
description: A Helm chart to install chaos-operator
44
name: chaos-operator
5-
version: 0.1.0
5+
version: 0.2.0
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

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

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

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

55
A Helm chart to install chaos-operator
66

@@ -31,6 +31,7 @@ Kubernetes: `>=1.16.0-0`
3131
| autoscaling.maxReplicas | int | `100` | |
3232
| autoscaling.minReplicas | int | `1` | |
3333
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
34+
| customLabels | object | `{}` | |
3435
| fullnameOverride | string | `""` | |
3536
| image.pullPolicy | string | `"Always"` | |
3637
| image.repository | string | `"litmuschaos/chaos-operator"` | |

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

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ helm.sh/chart: {{ include "chaos-operator.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- if .Values.global.customLabels }}
44+
{{ toYaml .Values.global.customLabels }}
45+
{{- end }}
46+
{{- if .Values.customLabels }}
47+
{{ toYaml .Values.customLabels }}
48+
{{- end }}
4349
{{- end }}
4450

4551
{{/*

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

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spec:
1919
{{- end }}
2020
labels:
2121
{{- include "chaos-operator.selectorLabels" . | nindent 8 }}
22+
{{- include "chaos-operator.labels" . | nindent 8 }}
2223
spec:
2324
{{- with .Values.imagePullSecrets }}
2425
imagePullSecrets:

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

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ serviceAccount:
3030

3131
podAnnotations: {}
3232

33+
customLabels: {}
34+
3335
podSecurityContext: {}
3436
# fsGroup: 2000
3537

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.0.0-beta3"
33
description: A Helm chart to install event-tracker
44
name: event-tracker
5-
version: 0.1.0
5+
version: 0.2.0
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

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

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

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

55
A Helm chart to install event-tracker
66

@@ -31,6 +31,7 @@ Kubernetes: `>=1.16.0-0`
3131
| autoscaling.maxReplicas | int | `100` | |
3232
| autoscaling.minReplicas | int | `1` | |
3333
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
34+
| customLabels | object | `{}` | |
3435
| fullnameOverride | string | `""` | |
3536
| global.agentConfigName | string | `"agent-config"` | |
3637
| global.agentSecretName | string | `"agent-secret"` | |

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

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ helm.sh/chart: {{ include "event-tracker.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- if .Values.global.customLabels }}
44+
{{ toYaml .Values.global.customLabels }}
45+
{{- end }}
46+
{{- if .Values.customLabels }}
47+
{{ toYaml .Values.customLabels }}
48+
{{- end }}
4349
{{- end }}
4450

4551
{{/*

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

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spec:
1919
{{- end }}
2020
labels:
2121
{{- include "event-tracker.selectorLabels" . | nindent 8 }}
22+
{{- include "event-tracker.labels" . | nindent 8 }}
2223
spec:
2324
{{- with .Values.imagePullSecrets }}
2425
imagePullSecrets:

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

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ serviceAccount:
2828

2929
podAnnotations: {}
3030

31+
customLabels: {}
32+
3133
podSecurityContext: {}
3234
# fsGroup: 2000
3335

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.0.0-beta3"
33
description: A Helm chart to install subscriber
44
name: subscriber
5-
version: 0.1.0
5+
version: 0.2.0
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

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

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

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

55
A Helm chart to install subscriber
66

@@ -29,6 +29,7 @@ Kubernetes: `>=1.16.0-0`
2929
| affinity | object | `{}` | |
3030
| appSettings.containerRuntimeExecutor | string | `"k8sapi"` | |
3131
| appSettings.executorImage | string | `"litmuschaos/argoexec:v3.3.1"` | |
32+
| customLabels | object | `{}` | |
3233
| fullnameOverride | string | `""` | |
3334
| global.agentConfigName | string | `"agent-config"` | |
3435
| global.agentSecretName | string | `"agent-secret"` | |

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

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ helm.sh/chart: {{ include "subscriber.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- if .Values.global.customLabels }}
44+
{{ toYaml .Values.global.customLabels }}
45+
{{- end }}
46+
{{- if .Values.customLabels }}
47+
{{ toYaml .Values.customLabels }}
48+
{{- end }}
4349
{{- end }}
4450

4551
{{/*

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

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ spec:
1717
{{- end }}
1818
labels:
1919
{{- include "subscriber.selectorLabels" . | nindent 8 }}
20+
{{- include "subscriber.labels" . | nindent 8 }}
2021
spec:
2122
{{- with .Values.imagePullSecrets }}
2223
imagePullSecrets:

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

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ serviceAccount:
3232

3333
podAnnotations: {}
3434

35+
customLabels: {}
36+
3537
podSecurityContext: {}
3638
# fsGroup: 2000
3739

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.1.0
5+
version: 0.2.0
66
kubeVersion: ">=1.16.0-0"
77
home: https://litmuschaos.io
88
sources:

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

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

3-
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-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.0](https://img.shields.io/badge/Version-0.2.0-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

@@ -35,6 +35,7 @@ Kubernetes: `>=1.16.0-0`
3535
| autoscaling.minReplicas | int | `1` | |
3636
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
3737
| crds.create | bool | `true` | |
38+
| customLabels | object | `{}` | |
3839
| fullnameOverride | string | `""` | |
3940
| image.pullPolicy | string | `"Always"` | |
4041
| image.repository | string | `"litmuschaos/workflow-controller"` | |

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

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ helm.sh/chart: {{ include "workflow-controller.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- if .Values.global.customLabels }}
44+
{{ toYaml .Values.global.customLabels }}
45+
{{- end }}
46+
{{- if .Values.customLabels }}
47+
{{ toYaml .Values.customLabels }}
48+
{{- end }}
4349
{{- end }}
4450

4551
{{/*

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

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spec:
1919
{{- end }}
2020
labels:
2121
{{- include "workflow-controller.selectorLabels" . | nindent 8 }}
22+
{{- include "workflow-controller.labels" . | nindent 8 }}
2223
spec:
2324
{{- with .Values.imagePullSecrets }}
2425
imagePullSecrets:

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

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ serviceAccount:
3333

3434
podAnnotations: {}
3535

36+
customLabels: {}
37+
3638
podSecurityContext: {}
3739
# fsGroup: 2000
3840

charts/litmus-agent/templates/_helpers.tpl

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ helm.sh/chart: {{ include "litmus-agent.chart" . }}
4040
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
4141
{{- end }}
4242
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- if .Values.global.customLabels }}
44+
{{ toYaml .Values.global.customLabels }}
45+
{{- end }}
4346
{{- end }}
4447

4548
{{/*

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

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ spec:
1919
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
2020
app.kubernetes.io/instance: {{ .Release.Name | quote }}
2121
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
22+
{{- include "chaos-exporter.labels" . | nindent 8 }}
2223
spec:
2324
restartPolicy: Never
2425
serviceAccountName: {{ include "litmus-agent.serviceAccountName" . }}

charts/litmus-agent/values.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ global:
22
agentConfigName: agent-config
33
agentSecretName: agent-secret
44
podAnnotations: {}
5+
customLabels: {}
56
# AGENT_MODE: cluster, namespace
67
AGENT_MODE: "cluster"
78
# Default values for litmus-agent.

0 commit comments

Comments
 (0)