diff --git a/charts/litmus-agent/README.md b/charts/litmus-agent/README.md index 00bd475c..c9e8d821 100644 --- a/charts/litmus-agent/README.md +++ b/charts/litmus-agent/README.md @@ -1,6 +1,6 @@ # litmus-agent -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) +![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![AppVersion: 0.1.3](https://img.shields.io/badge/AppVersion-0.1.3-informational?style=flat-square) A Helm chart to install litmus agent @@ -64,7 +64,6 @@ $ helm install litmus-agent litmuschaos/litmus-agent \ | NS_EXISTS | bool | `true` | | | PLATFORM_NAME | string | `"Others"` | | | SA_EXISTS | bool | `true` | | -| existingHookSecret | string | `""` | Create a custom secret to be used by the pre-install hook (including `LITMUS_PASSWORD`) | | chaos-exporter.enabled | bool | `true` | | | chaos-operator.enabled | bool | `true` | | | crds.create | bool | `true` | | @@ -81,6 +80,7 @@ $ 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 | | workflow-controller.crds.create | bool | `true` | | | workflow-controller.enabled | bool | `true` | | diff --git a/charts/litmus-agent/templates/hook-pre-install-job.yaml b/charts/litmus-agent/templates/hook-pre-install-job.yaml index 42a71796..9ef8a869 100644 --- a/charts/litmus-agent/templates/hook-pre-install-job.yaml +++ b/charts/litmus-agent/templates/hook-pre-install-job.yaml @@ -29,11 +29,7 @@ spec: args: ["./litmus-agent", "--action", "create"] envFrom: - secretRef: - {{- if .Values.existingHookSecret }} - name: {{ .Values.existingHookSecret }} - {{- else }} name: {{ include "litmus-agent.fullname" . }}-hook - {{ end }} env: - name: AGENT_NAME value: {{ .Values.AGENT_NAME }} diff --git a/charts/litmus-agent/templates/secret.yaml b/charts/litmus-agent/templates/secret.yaml index cd661a65..8fe8703a 100644 --- a/charts/litmus-agent/templates/secret.yaml +++ b/charts/litmus-agent/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.existingHookSecret }} +{{- if not .Values.useExistingHookSecret }} apiVersion: v1 kind: Secret metadata: diff --git a/charts/litmus-agent/values.yaml b/charts/litmus-agent/values.yaml index d81742cc..632334e8 100644 --- a/charts/litmus-agent/values.yaml +++ b/charts/litmus-agent/values.yaml @@ -41,11 +41,11 @@ resources: cpu: 100m memory: 128Mi -# STRING: Name of secret created independently of this chart. -# This will stop the chart from making its own secret. Use -# /litmus-helm/charts/litmus-agent/templates/secret.yaml as a base template for -# the custom secret. -existingHookSecret: "" +# Custom secret name should be: +# `{{ include "litmus-agent.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 chaos-operator: enabled: true