Skip to content

Commit

Permalink
feat(litmus-agent): allow using existing configuration and secrets
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel DENIS <[email protected]>
  • Loading branch information
sambonbonne committed Jun 17, 2024
1 parent 9e383e2 commit 5155d26
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/litmus-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "3.8.0"
description: A Helm chart to install litmus agent
name: litmus-agent
version: 3.8.1
version: 3.8.2
kubeVersion: ">=1.16.0-0"
home: https://litmuschaos.io
sources:
Expand Down
6 changes: 5 additions & 1 deletion charts/litmus-agent/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# litmus-agent

![Version: 3.8.1](https://img.shields.io/badge/Version-3.8.1-informational?style=flat-square) ![AppVersion: 3.8.0](https://img.shields.io/badge/AppVersion-3.8.0-informational?style=flat-square)
![Version: 3.8.2](https://img.shields.io/badge/Version-3.8.2-informational?style=flat-square) ![AppVersion: 3.8.0](https://img.shields.io/badge/AppVersion-3.8.0-informational?style=flat-square)

A Helm chart to install litmus agent

Expand Down Expand Up @@ -85,6 +85,10 @@ $ helm install litmus-agent litmuschaos/litmus-agent \
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"128Mi"` | |
| subscriber.enabled | bool | `true` | |
| useExistingHookSecret | bool | `false` | Use an existing hook Secret instead of creating one with the chart, ref. to templates/secret.yaml |
| useExistingInfraConfigMap | bool | `false` | Use an existing infra ConfigMap instead of creating one with the chart, ref. to templates/infra-config-map.yaml |
| useExistingInfraSecret | bool | `false` | Use an existing infra Secret instead of creating one with the chart, ref. to templates/infra-secret.yaml |
| useExistingWorkflowControllerConfigMap | bool | `false` | Use an existing infra ConfigMap instead of creating one with the chart, ref. to templates/infra-config-map-workflow.yaml |
| workflow-controller.crds.create | bool | `true` | |
| workflow-controller.enabled | bool | `true` | |

Expand Down
2 changes: 2 additions & 0 deletions charts/litmus-agent/templates/infra-config-map-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.useExistingWorkflowControllerConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -11,3 +12,4 @@ metadata:
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": before-hook-creation,hook-failed
data: {}
{{ end }}
2 changes: 2 additions & 0 deletions charts/litmus-agent/templates/infra-config-map.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.useExistingInfraConfigMap }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -11,3 +12,4 @@ metadata:
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": before-hook-creation,hook-failed
data: {}
{{ end }}
2 changes: 2 additions & 0 deletions charts/litmus-agent/templates/infra-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.useExistingInfraSecret }}
apiVersion: v1
kind: Secret
type: Opaque
Expand All @@ -12,3 +13,4 @@ metadata:
"helm.sh/hook-weight": "1"
"helm.sh/hook-delete-policy": before-hook-creation,hook-failed
data: {}
{{ end }}
4 changes: 3 additions & 1 deletion charts/litmus-agent/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.useExistingHookSecret }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -21,4 +22,5 @@ data:
LITMUS_PASSWORD: {{ .Values.LITMUS_PASSWORD | b64enc | quote }}
{{- if .Values.LITMUS_PROJECT_ID }}
LITMUS_PROJECT_ID: {{ .Values.LITMUS_PROJECT_ID | b64enc | quote }}
{{ end }}
{{ end }}
{{ end }}
21 changes: 21 additions & 0 deletions charts/litmus-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,27 @@ resources:
cpu: 100m
memory: 128Mi

# Existing Secret name should be:
# `{{ include "subscriber.fullname" . }}-hook`
# I.E. `name: litmus-agent-hook`
# -- Use an existing hook Secret instead of creating one with the chart, ref. to templates/secret.yaml
useExistingHookSecret: false

# Existing ConfigMap name should be equal to .global.infraConfigName
# I.E. `name: subscriber-config`
# -- Use an existing infra ConfigMap instead of creating one with the chart, ref. to templates/infra-config-map.yaml
useExistingInfraConfigMap: false

# Existing Secret name should be equal to .global.infraSecretName
# I.E. `name: subscriber-secret`
# -- Use an existing infra Secret instead of creating one with the chart, ref. to templates/infra-secret.yaml
useExistingInfraSecret: false

# Existing ConfigMap name should be:
# `{{ index .Values "workflow-controller" "appSettings" "configmapName" }}`
# -- Use an existing infra ConfigMap instead of creating one with the chart, ref. to templates/infra-config-map-workflow.yaml
useExistingWorkflowControllerConfigMap: false

chaos-operator:
enabled: true

Expand Down

0 comments on commit 5155d26

Please sign in to comment.