123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- # More info about the template: https://docs.openstack.org/kuryr-kubernetes/latest/installation/containerized.html#generating-kuryr-resource-definitions-for-kubernetes
- apiVersion: extensions/v1beta1
- kind: DaemonSet
- metadata:
- name: kuryr-cni-ds
- namespace: {{ kuryr_namespace }}
- labels:
- tier: node
- app: kuryr
- annotations:
- image.openshift.io/triggers: |
- [
- {"from":{"kind":"ImageStreamTag","name":"node:v3.10"},"fieldPath":"spec.template.spec.initContainers[?(@.name==\"install-cni-plugins\")].image"}
- ]
- spec:
- template:
- metadata:
- labels:
- tier: node
- app: kuryr
- spec:
- hostNetwork: true
- tolerations:
- - key: node-role.kubernetes.io/master
- operator: Exists
- effect: NoSchedule
- serviceAccountName: kuryr-controller
- initContainers:
- - name: install-cni-plugins
- image: " "
- command:
- - /bin/bash
- - -c
- - |
- #!/bin/bash
- set -ex
- # Take over network functions on the node
- rm -Rf /host-cni-bin/*
- cp -Rf /opt/cni/bin/* /host-cni-bin/
- volumeMounts:
- - name: bin
- mountPath: /host-cni-bin
- securityContext:
- privileged: true
- containers:
- - name: kuryr-cni
- image: {{ openshift_openstack_kuryr_cni_image }}
- imagePullPolicy: IfNotPresent
- command: [ "cni_ds_init" ]
- env:
- - name: CNI_DAEMON
- value: "True"
- - name: KUBERNETES_NODE_NAME
- valueFrom:
- fieldRef:
- fieldPath: spec.nodeName
- - name: KURYR_CNI_POD_NAME
- valueFrom:
- fieldRef:
- fieldPath: metadata.name
- securityContext:
- privileged: true
- volumeMounts:
- - name: bin
- mountPath: /opt/cni/bin
- - name: net-conf
- mountPath: /etc/cni/net.d
- - name: config-volume
- mountPath: /etc/kuryr/kuryr.conf
- subPath: kuryr-cni.conf
- - name: proc
- mountPath: /host_proc
- - name: openvswitch
- mountPath: /var/run/openvswitch
- {% if enable_kuryr_cni_probes|default(true)|bool %}
- readinessProbe:
- httpGet:
- path: /ready
- port: {{ kuryr_cni_healthcheck_port }}
- scheme: HTTP
- initialDelaySeconds: 15
- timeoutSeconds: 5
- livenessProbe:
- httpGet:
- path: /alive
- port: {{ kuryr_cni_healthcheck_port }}
- initialDelaySeconds: 15
- {% endif %}
- volumes:
- - name: bin
- hostPath:
- path: {{ cni_bin_dir }}
- - name: net-conf
- hostPath:
- path: /etc/cni/net.d
- - name: config-volume
- configMap:
- name: kuryr-config
- - name: proc
- hostPath:
- path: /proc
- - name: openvswitch
- hostPath:
- path: /var/run/openvswitch
|