File tree Expand file tree Collapse file tree 3 files changed +268
-12
lines changed
Expand file tree Collapse file tree 3 files changed +268
-12
lines changed Original file line number Diff line number Diff line change 1+ {{- range tuple "st2auth" "st2api" "st2stream" "st2web" "st2rulesengine" "st2timersengine" "st2workflowengine" "st2scheduler" "st2notifier" "st2sensorcontainer" "st2actionrunner" "st2garbagecollector" "st2client" "st2chatops" -}}
2+ {{- if or (index $.Values . "postStartScript") (eq . "st2actionrunner") (eq . "st2client") }}
13---
24apiVersion : v1
35kind : ConfigMap
46metadata :
5- name : {{ $.Release.Name }}-st2actionrunner -post-start-script
7+ name : {{ $.Release.Name }}-{{ . }} -post-start-script
68 annotations :
7- description : Custom postStart lifecycle event handler script for st2actionrunner
9+ description : Custom postStart lifecycle event handler script for {{ . }}
810 labels :
911 app : st2
1012 tier : backend
@@ -13,11 +15,12 @@ metadata:
1315 release : {{ $.Release.Name }}
1416 heritage : {{ $.Release.Service }}
1517data :
16- # k8s calls this script in parallel with starting st2actionrunner (ie the same time as ENTRYPOINT)
18+ # k8s calls this script in parallel with starting {{ . }} (ie the same time as ENTRYPOINT)
1719 # The pod will not be marked as "running" until this script completes successfully.
1820 # see: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
1921 post-start.sh : |
2022 #!/bin/bash
23+ {{- if or (eq . "st2actionrunner") (eq . "st2client") }}
2124 {{- $system_user := $.Values.st2.system_user.user }}
2225 {{- $ssh_key_file := tpl $.Values.st2.system_user.ssh_key_file $ }}
2326 {{- $ssh_key_file_name := base $ssh_key_file }}
2730 chown -R {{ $system_user }}:{{ $system_user }} {{ $ssh_key_file_dir }}
2831 chmod 400 {{ $ssh_key_file }}
2932 chmod 500 {{ $ssh_key_file_dir }}
33+ {{- end }}
34+ {{- index $.Values . "postStartScript" | nindent 4 }}
35+
36+ {{- end }}
37+ {{- end -}}
You can’t perform that action at this time.
0 commit comments