/
daemonset-config.yaml
191 lines (191 loc) · 6.96 KB
/
daemonset-config.yaml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
{{- if .Values.manifests.daemonset_config }}
{{- $_ := set .Values "images" .Values.global.images }}
{{- $context := . }}
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: contrail-config
spec:
{{ tuple $context "config" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:
metadata:
labels:
{{ tuple $context "opencontrail" "contrail-config" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
annotations:
configmap-hash: {{ tuple "configmap-env.yaml" $context | include "helm-toolkit.utils.hash" }}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ .Values.labels.config.node_selector_key }}
operator: In
values:
- {{ .Values.labels.config.node_selector_value }}
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
imagePullSecrets:
- name: contrail-controller-docker-secret
initContainers:
{{ tuple $context .Values.dependencies.config nil | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }}
- name: contrail-node-init
image: {{ .Values.global.images.tags.node_init | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
securityContext:
privileged: true
env:
- name: CONTRAIL_STATUS_IMAGE
value: {{ .Values.global.images.tags.contrail_status | quote }}
envFrom:
- configMapRef:
name: contrail-controller-env
volumeMounts:
- mountPath: /host/usr/bin
name: host-usr-bin
containers:
- name: contrail-config-api
image: {{ .Values.global.images.tags.config_api | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
ports:
- name: api-port
containerPort: {{ .Values.global.contrail_env.CONFIG_API_PORT | default 8082 }}
- name: introspect-port
containerPort: {{ .Values.global.contrail_env.CONFIG_API_INTROSPECT_PORT | default 8084 }}
envFrom:
- configMapRef:
name: contrail-controller-env
- configMapRef:
name: contrail-controller-keystone
- configMapRef:
name: contrail-controller-rabbitmq
env:
- name: KEYSTONE_AUTH_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.keystone.admin }}
key: KEYSTONE_AUTH_ADMIN_PASSWORD
volumeMounts:
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /var/crashes
name: var-crashes-config
- mountPath: /etc/contrail/ssl
name: ssl-dir
- name: contrail-devicemgr
image: {{ .Values.global.images.tags.config_devicemgr | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
envFrom:
- configMapRef:
name: contrail-controller-env
- configMapRef:
name: contrail-controller-keystone
- configMapRef:
name: contrail-controller-rabbitmq
env:
- name: KEYSTONE_AUTH_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.keystone.admin }}
key: KEYSTONE_AUTH_ADMIN_PASSWORD
volumeMounts:
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /var/crashes
name: var-crashes-config
- name: contrail-schema-transformer
image: {{ .Values.global.images.tags.config_schema_transformer | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
envFrom:
- configMapRef:
name: contrail-controller-env
- configMapRef:
name: contrail-controller-keystone
- configMapRef:
name: contrail-controller-rabbitmq
env:
- name: KEYSTONE_AUTH_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.keystone.admin }}
key: KEYSTONE_AUTH_ADMIN_PASSWORD
volumeMounts:
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /var/crashes
name: var-crashes-config
- name: contrail-svcmonitor
image: {{ .Values.global.images.tags.config_svcmonitor | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
envFrom:
- configMapRef:
name: contrail-controller-env
- configMapRef:
name: contrail-controller-keystone
- configMapRef:
name: contrail-controller-rabbitmq
env:
- name: KEYSTONE_AUTH_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.keystone.admin }}
key: KEYSTONE_AUTH_ADMIN_PASSWORD
volumeMounts:
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /var/crashes
name: var-crashes-config
- name: contrail-config-nodemgr
image: {{ .Values.global.images.tags.nodemgr | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
envFrom:
- configMapRef:
name: contrail-controller-env
- configMapRef:
name: contrail-controller-keystone
env:
- name: NODE_TYPE
value: config
- name: DOCKER_HOST
value: "unix://mnt/docker.sock"
- name: CASSANDRA_CQL_PORT
value: {{ .Values.global.contrail_env.CONFIGDB_CQL_PORT | default 9041 | quote }}
- name: CASSANDRA_JMX_LOCAL_PORT
value: {{ .Values.global.contrail_env.CONFIGDB_JMX_LOCAL_PORT | default 7200 | quote }}
- name: KEYSTONE_AUTH_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.secrets.keystone.admin }}
key: KEYSTONE_AUTH_ADMIN_PASSWORD
volumeMounts:
- mountPath: /mnt/docker.sock
name: docker-unix-socket
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /var/crashes
name: var-crashes-config
- mountPath: /etc/contrail/ssl
name: ssl-dir
volumes:
- name: docker-unix-socket
hostPath:
path: /var/run/docker.sock
type: Socket
- name: contrail-log
hostPath:
path: /var/log/contrail
- name: var-crashes-config
hostPath:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: /usr/bin
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
{{- end }}