Skip to content

Commit

Permalink
Add custom label for resources in litmus-agent chart (#327)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
Calvinaud and Calvin Audier authored Aug 7, 2023
1 parent 584283d commit 65f5dce
Show file tree
Hide file tree
Showing 30 changed files with 79 additions and 23 deletions.
14 changes: 7 additions & 7 deletions charts/litmus-agent/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: "0.1.4"
appVersion: "0.2.0"
description: A Helm chart to install litmus agent
name: litmus-agent
version: 0.1.4
version: 0.2.0
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand All @@ -21,17 +21,17 @@ maintainers:
icon: https://raw.githubusercontent.com/litmuschaos/icons/master/litmus.png
dependencies:
- name: chaos-operator
version: 0.1.0
version: 0.2.0
condition: chaos-operator.enabled
- name: chaos-exporter
version: 0.1.0
version: 0.2.0
condition: chaos-exporter.enabled
- name: event-tracker
version: 0.1.0
version: 0.2.0
condition: event-tracker.enabled
- name: subscriber
version: 0.1.0
version: 0.2.0
condition: subscriber.enabled
- name: workflow-controller
version: 0.1.0
version: 0.2.0
condition: workflow-controller.enabled
13 changes: 7 additions & 6 deletions charts/litmus-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# litmus-agent

![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)
![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)

A Helm chart to install litmus agent

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

| Repository | Name | Version |
|------------|------|---------|
| | chaos-exporter | 0.1.0 |
| | chaos-operator | 0.1.0 |
| | event-tracker | 0.1.0 |
| | subscriber | 0.1.0 |
| | workflow-controller | 0.1.0 |
| | chaos-exporter | 0.2.0 |
| | chaos-operator | 0.2.0 |
| | event-tracker | 0.2.0 |
| | subscriber | 0.2.0 |
| | workflow-controller | 0.2.0 |

## Installing the Chart

Expand Down Expand Up @@ -72,6 +72,7 @@ $ helm install litmus-agent litmuschaos/litmus-agent \
| global.AGENT_MODE | string | `"cluster"` | |
| global.agentConfigName | string | `"agent-config"` | |
| global.agentSecretName | string | `"agent-secret"` | |
| global.customLabels | object | `{}` | |
| global.podAnnotations | object | `{}` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"litmuschaos/litmus-helm-agent"` | |
Expand Down
2 changes: 1 addition & 1 deletion charts/litmus-agent/charts/chaos-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "3.0.0-beta3"
description: A Helm chart to install chaos-exporter
name: chaos-exporter
version: 0.1.0
version: 0.2.0
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/litmus-agent/charts/chaos-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# chaos-exporter

![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)
![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)

A Helm chart to install chaos-exporter

Expand Down Expand Up @@ -32,6 +32,7 @@ Kubernetes: `>=1.16.0-0`
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| config.tsdb_scrape_interval | int | `10` | |
| customLabels | object | `{}` | |
| enabled | bool | `true` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"Always"` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ helm.sh/chart: {{ include "chaos-exporter.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.global.customLabels }}
{{ toYaml .Values.global.customLabels }}
{{- end }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
{{- end }}
labels:
{{- include "chaos-exporter.selectorLabels" . | nindent 8 }}
{{- include "chaos-exporter.labels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus-agent/charts/chaos-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ serviceAccount:

podAnnotations: {}

customLabels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down
2 changes: 1 addition & 1 deletion charts/litmus-agent/charts/chaos-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "3.0.0-beta3"
description: A Helm chart to install chaos-operator
name: chaos-operator
version: 0.1.0
version: 0.2.0
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/litmus-agent/charts/chaos-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# chaos-operator

![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)
![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)

A Helm chart to install chaos-operator

Expand Down Expand Up @@ -31,6 +31,7 @@ Kubernetes: `>=1.16.0-0`
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| customLabels | object | `{}` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"litmuschaos/chaos-operator"` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ helm.sh/chart: {{ include "chaos-operator.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.global.customLabels }}
{{ toYaml .Values.global.customLabels }}
{{- end }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
{{- end }}
labels:
{{- include "chaos-operator.selectorLabels" . | nindent 8 }}
{{- include "chaos-operator.labels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus-agent/charts/chaos-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ serviceAccount:

podAnnotations: {}

customLabels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down
2 changes: 1 addition & 1 deletion charts/litmus-agent/charts/event-tracker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "3.0.0-beta3"
description: A Helm chart to install event-tracker
name: event-tracker
version: 0.1.0
version: 0.2.0
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/litmus-agent/charts/event-tracker/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# event-tracker

![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)
![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)

A Helm chart to install event-tracker

Expand Down Expand Up @@ -31,6 +31,7 @@ Kubernetes: `>=1.16.0-0`
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| customLabels | object | `{}` | |
| fullnameOverride | string | `""` | |
| global.agentConfigName | string | `"agent-config"` | |
| global.agentSecretName | string | `"agent-secret"` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ helm.sh/chart: {{ include "event-tracker.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.global.customLabels }}
{{ toYaml .Values.global.customLabels }}
{{- end }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
{{- end }}
labels:
{{- include "event-tracker.selectorLabels" . | nindent 8 }}
{{- include "event-tracker.labels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus-agent/charts/event-tracker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ serviceAccount:

podAnnotations: {}

customLabels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down
2 changes: 1 addition & 1 deletion charts/litmus-agent/charts/subscriber/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "3.0.0-beta3"
description: A Helm chart to install subscriber
name: subscriber
version: 0.1.0
version: 0.2.0
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/litmus-agent/charts/subscriber/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# subscriber

![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)
![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)

A Helm chart to install subscriber

Expand Down Expand Up @@ -29,6 +29,7 @@ Kubernetes: `>=1.16.0-0`
| affinity | object | `{}` | |
| appSettings.containerRuntimeExecutor | string | `"k8sapi"` | |
| appSettings.executorImage | string | `"litmuschaos/argoexec:v3.3.1"` | |
| customLabels | object | `{}` | |
| fullnameOverride | string | `""` | |
| global.agentConfigName | string | `"agent-config"` | |
| global.agentSecretName | string | `"agent-secret"` | |
Expand Down
6 changes: 6 additions & 0 deletions charts/litmus-agent/charts/subscriber/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ helm.sh/chart: {{ include "subscriber.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.global.customLabels }}
{{ toYaml .Values.global.customLabels }}
{{- end }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ spec:
{{- end }}
labels:
{{- include "subscriber.selectorLabels" . | nindent 8 }}
{{- include "subscriber.labels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus-agent/charts/subscriber/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ serviceAccount:

podAnnotations: {}

customLabels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down
2 changes: 1 addition & 1 deletion charts/litmus-agent/charts/workflow-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "v3.3.1"
description: A Helm chart to install workflow-controller
name: workflow-controller
version: 0.1.0
version: 0.2.0
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
3 changes: 2 additions & 1 deletion charts/litmus-agent/charts/workflow-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# workflow-controller

![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)
![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)

A Helm chart to install workflow-controller

Expand Down Expand Up @@ -35,6 +35,7 @@ Kubernetes: `>=1.16.0-0`
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| crds.create | bool | `true` | |
| customLabels | object | `{}` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"Always"` | |
| image.repository | string | `"litmuschaos/workflow-controller"` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ helm.sh/chart: {{ include "workflow-controller.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.global.customLabels }}
{{ toYaml .Values.global.customLabels }}
{{- end }}
{{- if .Values.customLabels }}
{{ toYaml .Values.customLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
{{- end }}
labels:
{{- include "workflow-controller.selectorLabels" . | nindent 8 }}
{{- include "workflow-controller.labels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
2 changes: 2 additions & 0 deletions charts/litmus-agent/charts/workflow-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ serviceAccount:

podAnnotations: {}

customLabels: {}

podSecurityContext: {}
# fsGroup: 2000

Expand Down
3 changes: 3 additions & 0 deletions charts/litmus-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ helm.sh/chart: {{ include "litmus-agent.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.global.customLabels }}
{{ toYaml .Values.global.customLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
1 change: 1 addition & 0 deletions charts/litmus-agent/templates/hook-pre-install-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ spec:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
{{- include "chaos-exporter.labels" . | nindent 8 }}
spec:
restartPolicy: Never
serviceAccountName: {{ include "litmus-agent.serviceAccountName" . }}
Expand Down
1 change: 1 addition & 0 deletions charts/litmus-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ global:
agentConfigName: agent-config
agentSecretName: agent-secret
podAnnotations: {}
customLabels: {}
# AGENT_MODE: cluster, namespace
AGENT_MODE: "cluster"
# Default values for litmus-agent.
Expand Down

0 comments on commit 65f5dce

Please sign in to comment.