/
daemonset-control-only.yaml
82 lines (82 loc) · 2.94 KB
/
daemonset-control-only.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
{{- if .Values.manifests.daemonset_control_only }}
{{- $_ := set .Values "images" .Values.global.images }}
{{- $context := . }}
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: contrail-control-only
spec:
{{ tuple $context "control_only" | include "helm-toolkit.snippets.kubernetes_upgrades_daemonset" | indent 2 }}
template:
metadata:
labels:
{{ tuple $context "opencontrail" "contrail-control-only" | 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.control_only.node_selector_key }}
operator: In
values:
- {{ .Values.labels.control_only.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.control_only 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
- mountPath: /etc/contrail/ssl
name: ssl-dir
containers:
- name: contrail-control
image: {{ .Values.global.images.tags.contrail_control | quote }}
imagePullPolicy: {{ default "" .Values.global.images.imagePullPolicy | quote }}
envFrom:
- configMapRef:
name: contrail-controller-env
- configMapRef:
name: contrail-controller-keystone
- configMapRef:
name: contrail-controller-rabbitmq
volumeMounts:
- mountPath: /var/log/contrail/
name: contrail-log
- mountPath: /var/crashes
name: var-crashes-control
volumes:
- name: contrail-log
hostPath:
path: /var/log/contrail
- name: var-crashes-control
hostPath:
path: /var/crashes
- name: host-usr-bin
hostPath:
path: {{ .Values.volumeMounts.host_usr_bin.hostPath }}
- name: ssl-dir
hostPath:
path: /etc/contrail/ssl
{{- end }}