From d5a8cd7ce3f1211b90278566383bd6f608f609af Mon Sep 17 00:00:00 2001 From: Jassef Torres Jacques Date: Fri, 9 Feb 2024 11:24:38 -0600 Subject: [PATCH] [Issue-43] Added jobs commands override ability --- charts/spinnaker/templates/hooks/cleanup.yaml | 4 ++++ .../spinnaker/templates/hooks/install-using-hal.yaml | 4 ++++ charts/spinnaker/values.yaml | 11 +++++++++++ 3 files changed, 19 insertions(+) diff --git a/charts/spinnaker/templates/hooks/cleanup.yaml b/charts/spinnaker/templates/hooks/cleanup.yaml index d568bf5..3566d3c 100644 --- a/charts/spinnaker/templates/hooks/cleanup.yaml +++ b/charts/spinnaker/templates/hooks/cleanup.yaml @@ -37,9 +37,13 @@ spec: - name: halyard-config mountPath: /opt/halyard/scripts command: + {{- if .Values.halyard.additionalSettings.cleanJobCmd }} + {{- toYaml .Values.halyard.additionalSettings.cleanJobCmd | nindent 8 }} + {{- else }} - bash - -xe - "/opt/halyard/scripts/clean.sh" + {{- end}} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 8 }} diff --git a/charts/spinnaker/templates/hooks/install-using-hal.yaml b/charts/spinnaker/templates/hooks/install-using-hal.yaml index 1e3ab1c..e0b7042 100644 --- a/charts/spinnaker/templates/hooks/install-using-hal.yaml +++ b/charts/spinnaker/templates/hooks/install-using-hal.yaml @@ -139,6 +139,10 @@ spec: {{- toYaml .Values.halyard.additionalVolumeMounts | nindent 8 }} {{- end }} command: + {{- if .Values.halyard.additionalSettings.installJobCmd }} + {{- toYaml .Values.halyard.additionalSettings.installJobCmd | nindent 8 }} + {{- else }} - bash - -xe - "/opt/halyard/scripts/install.sh" + {{- end }} diff --git a/charts/spinnaker/values.yaml b/charts/spinnaker/values.yaml index 4ffb85f..8d5d7a5 100644 --- a/charts/spinnaker/values.yaml +++ b/charts/spinnaker/values.yaml @@ -104,6 +104,17 @@ halyard: # - name: volumeMount1 # mountPath: /volumeMount1 + additionalSettings: + # To override command used in insta-using-hal job + installJobCmd: [] + # - echo + # - "Hello, World!" + + # To override command used in cleanup job + cleanJobCmd: [] + # - echo + # - "Hello, World!" + ## Populate to provide a custom local BOM for Halyard to use for deployment. Read more for details: ## https://www.spinnaker.io/guides/operator/custom-boms/#boms-and-configuration-on-your-filesystem bom: ~