Skip to content

Commit

Permalink
Merge pull request #50 from jjtowers/feat/issue-43/ovrd-jobs-cmds-1
Browse files Browse the repository at this point in the history
[Issue-43] Added jobs commands override ability
  • Loading branch information
ksrinimba authored Feb 14, 2024
2 parents 386be53 + d5a8cd7 commit 2dd807c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/spinnaker/templates/hooks/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/spinnaker/templates/hooks/install-using-hal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
11 changes: 11 additions & 0 deletions charts/spinnaker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ~
Expand Down

0 comments on commit 2dd807c

Please sign in to comment.