Skip to content

Commit 48496e3

Browse files
committed
Adding st2api and st2client services
1 parent 524c0e1 commit 48496e3

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

templates/services.yaml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ metadata:
2828
name: {{ .Release.Name }}-st2api
2929
annotations:
3030
description: StackStorm st2api - service hosts the REST API endpoints that serve requests from WebUI, CLI, ChatOps and other st2 services.
31+
{{- if .Values.st2web.service.hostname }}
32+
external-dns.alpha.kubernetes.io/hostname: {{ .Values.st2api.service.hostname | quote }}
33+
{{- end }}
34+
{{- if .Values.st2api.service.annotations }}
35+
{{- toYaml .Values.st2api.service.annotations | nindent 4 }}
36+
{{- end }}
3137
labels:
3238
app: st2api
3339
tier: backend
@@ -39,7 +45,12 @@ spec:
3945
selector:
4046
app: st2api
4147
release: {{ .Release.Name }}
42-
type: ClusterIP
48+
type: {{ .Values.st2api.service.type }}
49+
{{- if contains "ExternalName" .Values.st2api.service.type }}
50+
{{- if .Values.st2api.service.hostname }}
51+
externalName: {{ .Values.st2api.service.hostname }}
52+
{{- end }}
53+
{{- end }}
4354
ports:
4455
- protocol: TCP
4556
port: 9101
@@ -125,3 +136,34 @@ spec:
125136
- protocol: TCP
126137
port: 8081
127138
{{- end }}
139+
140+
---
141+
kind: Service
142+
apiVersion: v1
143+
metadata:
144+
name: {{ .Release.Name }}-st2client
145+
annotations:
146+
description: StackStorm st2client
147+
{{- if .Values.st2client.service.hostname }}
148+
external-dns.alpha.kubernetes.io/hostname: {{ .Values.st2client.service.hostname | quote }}
149+
{{- end }}
150+
{{- if .Values.st2client.service.annotations }}
151+
{{- toYaml .Values.st2client.service.annotations | nindent 4 }}
152+
{{- end }}
153+
labels:
154+
app: st2client
155+
tier: frontend
156+
vendor: stackstorm
157+
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
158+
release: {{ .Release.Name }}
159+
heritage: {{ .Release.Service }}
160+
spec:
161+
selector:
162+
app: st2client
163+
release: {{ .Release.Name }}
164+
type: {{ .Values.st2client.service.type }}
165+
{{- if contains "ExternalName" .Values.st2client.service.type }}
166+
{{- if .Values.st2client.service.hostname }}
167+
externalName: {{ .Values.st2client.service.hostname }}
168+
{{- end }}
169+
{{- end }}

values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,14 @@ st2api:
377377
tolerations: []
378378
affinity: {}
379379
env: {}
380+
service:
381+
# type can be one of "ClusterIP", "NodePort", "LoadBalancer" or "ExternalName"
382+
type: "ClusterIP"
383+
# The hostname associated with st2api service (externalName, added to external DNS, etc.)
384+
hostname: ""
385+
# For more information regarding annotations, see
386+
# https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws
387+
annotations: {}
380388
# HTTP_PROXY: http://proxy:1234
381389
serviceAccount:
382390
attach: false
@@ -706,6 +714,14 @@ st2client:
706714
username = ${ST2_AUTH_USERNAME}
707715
password = ${ST2_AUTH_PASSWORD}
708716
env: {}
717+
service:
718+
# type can be one of "ClusterIP", "NodePort", "LoadBalancer" or "ExternalName"
719+
type: "ClusterIP"
720+
# The hostname associated with st2client service (externalName, added to external DNS, etc.)
721+
hostname: ""
722+
# For more information regarding annotations, see
723+
# https://kubernetes.io/docs/concepts/services-networking/service/#ssl-support-on-aws
724+
annotations: {}
709725
# HTTP_PROXY: http://proxy:1234
710726
## These named secrets (managed outside this chart) will be added to envFrom.
711727
envFromSecrets: []

0 commit comments

Comments
 (0)