-
Notifications
You must be signed in to change notification settings - Fork 472
/
deployment.yml
89 lines (88 loc) · 2.85 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
# Original Helm labels v
app: {{ template "connector.name" . }}
component: kafka-connector
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
# Helm/k8s recommended label names v
app.kubernetes.io/name: {{ template "connector.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.Version }}
app.kubernetes.io/component: kafka-connector
app.kubernetes.io/part-of: openfaas
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "connector.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: {{ template "connector.name" . }}
component: kafka-connector
template:
metadata:
annotations:
prometheus.io.scrape: "false"
labels:
app: {{ template "connector.name" . }}
component: kafka-connector
spec:
{{- if .Values.basic_auth }}
volumes:
- name: auth
secret:
secretName: basic-auth
{{- end }}
containers:
- name: kafka
image: {{ .Values.image }}
env:
- name: gateway_url
value: {{ .Values.gatewayURL | quote }}
- name: topics
value: {{ .Values.topics | quote }}
- name: print_response
value: {{ .Values.printResponse | quote }}
- name: print_response_body
value: {{ .Values.printResponseBody | quote }}
- name: asynchronous_invocation
value: {{ .Values.asyncInvocation | quote }}
{{- if .Values.basicAuth }}
- name: basic_auth
value: "true"
- name: secret_mount_path
value: "/var/secrets"
{{- end }}
- name: broker_host
value: {{ .Values.brokerHost | quote }}
{{- if .Values.upstreamTimeout }}
- name: upstream_timeout
value: {{ .Values.upstreamTimeout | quote }}
{{- end }}
{{- if .Values.rebuildInterval }}
- name: rebuild_interval
value: {{ .Values.rebuildInterval | quote }}
{{- end }}
{{- if .Values.basic_auth }}
volumeMounts:
- name: auth
readOnly: true
mountPath: "/var/secrets"
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}