121 lines
3.5 KiB
YAML
121 lines
3.5 KiB
YAML
{{- if .Values.nats.enabled }}
|
|
{{- if not .Values.nats.external }}
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: fission-nats-streaming
|
|
namespace: {{ .Release.Namespace }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
svc: nats-streaming
|
|
name: nats-streaming
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
svc: nats-streaming
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: nats-streaming
|
|
spec:
|
|
serviceAccount: fission-nats-streaming
|
|
containers:
|
|
- name: nats-streaming
|
|
image: "{{ .Values.nats.streamingserver.image }}:{{ .Values.nats.streamingserver.tag }}"
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
args: [
|
|
"--cluster_id", "{{ .Values.nats.clusterID }}",
|
|
"--auth", "{{ .Values.nats.authToken }}",
|
|
"--max_channels", "0",
|
|
"--http_port", "4223"
|
|
]
|
|
ports:
|
|
- containerPort: 4222
|
|
protocol: TCP
|
|
- containerPort: 4223
|
|
protocol: TCP
|
|
readinessProbe:
|
|
httpGet:
|
|
path: "/streaming/serverz"
|
|
port: 4223
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 1
|
|
failureThreshold: 30
|
|
livenessProbe:
|
|
httpGet:
|
|
path: "/streaming/serverz"
|
|
port: 4223
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 5
|
|
{{- if .Values.terminationMessagePath }}
|
|
terminationMessagePath: {{ .Values.terminationMessagePath }}
|
|
{{- end }}
|
|
{{- if .Values.terminationMessagePolicy }}
|
|
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
|
|
{{- end }}
|
|
{{- if .Values.extraCoreComponentPodConfig }}
|
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
|
{{- end }}
|
|
---
|
|
{{- end }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: mqtrigger-nats-streaming
|
|
labels:
|
|
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
|
svc: mqtrigger
|
|
messagequeue: nats-streaming
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
svc: mqtrigger
|
|
messagequeue: nats-streaming
|
|
template:
|
|
metadata:
|
|
labels:
|
|
svc: mqtrigger
|
|
messagequeue: nats-streaming
|
|
spec:
|
|
containers:
|
|
- name: mqtrigger
|
|
image: {{ include "fission-bundleImage" . | quote }}
|
|
imagePullPolicy: {{ .Values.pullPolicy }}
|
|
command: ["/fission-bundle"]
|
|
args: ["--mqt", "--routerUrl", "http://router.{{ .Release.Namespace }}"]
|
|
env:
|
|
- name: MESSAGE_QUEUE_TYPE
|
|
value: nats-streaming
|
|
- name: MESSAGE_QUEUE_CLUSTER_ID
|
|
value: {{ .Values.nats.clusterID }}
|
|
- name: MESSAGE_QUEUE_QUEUE_GROUP
|
|
value: {{ .Values.nats.queueGroup }}
|
|
- name: MESSAGE_QUEUE_CLIENT_ID
|
|
value: {{ .Values.nats.clientID }}
|
|
- name: MESSAGE_QUEUE_URL
|
|
{{- if .Values.nats.authToken }}
|
|
value: nats://{{ .Values.nats.authToken }}@{{ .Values.nats.hostaddress }}
|
|
{{- else }}
|
|
value: nats://{{ .Values.nats.hostaddress }}
|
|
{{- end }}
|
|
- name: DEBUG_ENV
|
|
value: {{ .Values.debugEnv | quote }}
|
|
- name: PPROF_ENABLED
|
|
value: {{ .Values.pprof.enabled | quote }}
|
|
{{- include "opentracing.envs" . | indent 8 }}
|
|
{{- include "opentelemtry.envs" . | indent 8 }}
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: fission-svc
|
|
{{- if .Values.extraCoreComponentPodConfig }}
|
|
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
|
|
{{- end }}
|
|
{{- end }}
|