36898a2c39
* Changes to assign pod priority to kube components. * Removed the boolean flag pod_priority_assignment * Created new priorityclass k8s-cluster-critical * Created new priorityclass k8s-cluster-critical * Fixed the trailing spaces * Fixed the trailing spaces * Added kube version check while creating Priority Class k8s-cluster-critical * Moved k8s-cluster-critical.yml * Moved k8s-cluster-critical.yml to kube_config_dir
72 lines
2.2 KiB
Django/Jinja
72 lines
2.2 KiB
Django/Jinja
---
|
|
kind: DaemonSet
|
|
apiVersion: extensions/v1beta1
|
|
metadata:
|
|
name: contiv-netmaster
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: contiv-netmaster
|
|
spec:
|
|
updateStrategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
name: contiv-netmaster
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: contiv-netmaster
|
|
annotations:
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
|
spec:
|
|
{% if kube_version|version_compare('v1.11.1', '>=') %}
|
|
priorityClassName: system-node-critical
|
|
{% endif %}
|
|
# The netmaster must run in the host network namespace so that
|
|
# it isn't governed by policy that would prevent it from working.
|
|
hostNetwork: true
|
|
hostPID: true
|
|
nodeSelector:
|
|
node-role.kubernetes.io/master: "true"
|
|
tolerations:
|
|
- key: node-role.kubernetes.io/master
|
|
effect: NoSchedule
|
|
serviceAccountName: contiv-netmaster
|
|
containers:
|
|
- name: contiv-netmaster
|
|
image: {{ contiv_image_repo }}:{{ contiv_image_tag }}
|
|
env:
|
|
- name: CONTIV_ROLE
|
|
value: netmaster
|
|
- name: CONTIV_NETMASTER_MODE
|
|
value: kubernetes
|
|
- name: CONTIV_NETMASTER_ETCD_ENDPOINTS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: contiv-config
|
|
key: contiv_etcd
|
|
- name: CONTIV_NETMASTER_FORWARD_MODE
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: contiv-config
|
|
key: contiv_fwdmode
|
|
- name: CONTIV_NETMASTER_NET_MODE
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: contiv-config
|
|
key: contiv_netmode
|
|
- name: CONTIV_NETMASTER_LOG_LEVEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: contiv-config
|
|
key: contiv_netmaster_loglevel
|
|
securityContext:
|
|
privileged: true
|
|
volumeMounts:
|
|
- mountPath: /var/contiv
|
|
name: var-contiv
|
|
readOnly: false
|
|
volumes:
|
|
# Used by contiv-netmaster
|
|
- name: var-contiv
|
|
hostPath:
|
|
path: /var/contiv
|