Skip to content

Commit 26d4214

Browse files
committed
added a seperate template function to handle custom st2actionrunner logic
1 parent 3fe9592 commit 26d4214

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

templates/_helpers.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ stackstorm
3030
{{- end -}}
3131
{{- end -}}
3232

33+
# Generate Docker image repository for st2actionrunner: Private 'docker.stackstorm.com' for Enterprise vs Public Docker Hub 'stackstorm' for FOSS version
34+
{{- define "st2actionrunnerImageRepository" -}}
35+
{{- if required "Missing context '.Values.enterprise.enabled'!" .Values.enterprise.enabled -}}
36+
docker.stackstorm.com
37+
{{- else if .Values.image.repository -}}
38+
{{ .Values.image.repository }}
39+
{{- else if .Values.st2actionrunner.image.repository -}}
40+
{{ .Values.st2actionrunner.image.repository }}
41+
{{- else -}}
42+
stackstorm
43+
{{- end -}}
44+
{{- end -}}
45+
3346
{{/*
3447
Create the name of the stackstorm-ha service account to use
3548
*/}}

templates/deployments.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,9 @@ spec:
10451045
{{- if .Values.st2.packs.image.pullSecret }}
10461046
- name: {{ .Values.st2.packs.image.pullSecret }}
10471047
{{- end }}
1048+
{{- if .Values.st2actionrunner.image.pullSecret }}
1049+
- name: {{ .Values.st2actionrunner.image.pullSecret }}
1050+
{{- end }}
10481051
{{- if .Values.st2.packs.image.repository }}
10491052
initContainers:
10501053
# Merge packs and virtualenvs from st2actionrunner with those from the st2.packs image
@@ -1079,7 +1082,7 @@ spec:
10791082
{{- end }}
10801083
containers:
10811084
- name: st2actionrunner{{ template "enterpriseSuffix" . }}
1082-
image: "{{ .Values.st2actionrunner.image.repository | default template "imageRepository" . }}/{{ .Values.st2actionrunner.image.name | default st2actionrunner }}{{ template "enterpriseSuffix" . }}:{{ .Values.st2actionrunner.image.tag | default .Chart.AppVersion }}"
1085+
image: "{{ template "st2actionrunnerImageRepository" . }}/{{ .Values.st2actionrunner.image.name | default "st2actionrunner" }}{{ template "enterpriseSuffix" . }}:{{ .Values.st2actionrunner.image.tag | default .Chart.AppVersion }}"
10831086
imagePullPolicy: {{ .Values.st2actionrunner.image.imagePullPolicy | default .Values.image.pullPolicy }}
10841087
# TODO: Add liveness/readiness probes (#3)
10851088
#livenessProbe:

values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ st2notifier:
350350
st2actionrunner:
351351
replicas: 5
352352
# TODO: Find out recommended/default resources for this specific service (#5)
353-
image:
353+
image: {}
354354
# Uncomment the following block to use your own at2actionrunner docker image
355355
#repository: your-remote-docker-registry.io
356356
#name: st2actionrunner

0 commit comments

Comments
 (0)