2019-07-31 03:10:20 +00:00
|
|
|
---
|
|
|
|
kind: Deployment
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: kube-ovn-controller
|
2020-05-06 18:05:09 +00:00
|
|
|
namespace: kube-system
|
2019-07-31 03:10:20 +00:00
|
|
|
annotations:
|
|
|
|
kubernetes.io/description: |
|
|
|
|
kube-ovn controller
|
|
|
|
spec:
|
|
|
|
replicas: 2
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: kube-ovn-controller
|
|
|
|
strategy:
|
|
|
|
rollingUpdate:
|
|
|
|
maxSurge: 0%
|
|
|
|
maxUnavailable: 100%
|
|
|
|
type: RollingUpdate
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: kube-ovn-controller
|
|
|
|
component: network
|
|
|
|
type: infra
|
|
|
|
spec:
|
|
|
|
tolerations:
|
|
|
|
- operator: Exists
|
|
|
|
effect: NoSchedule
|
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchLabels:
|
|
|
|
app: kube-ovn-controller
|
|
|
|
topologyKey: kubernetes.io/hostname
|
2020-04-15 10:10:03 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
2019-07-31 03:10:20 +00:00
|
|
|
serviceAccountName: ovn
|
|
|
|
hostNetwork: true
|
|
|
|
containers:
|
|
|
|
- name: kube-ovn-controller
|
2020-04-15 10:10:03 +00:00
|
|
|
image: {{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }}
|
2019-07-31 03:10:20 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
command:
|
|
|
|
- /kube-ovn/start-controller.sh
|
|
|
|
args:
|
|
|
|
- --default-cidr={{ kube_pods_subnet }}
|
|
|
|
env:
|
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: KUBE_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
readinessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
2020-04-15 10:10:03 +00:00
|
|
|
- sh
|
|
|
|
- /kube-ovn/kube-ovn-controller-healthcheck.sh
|
2019-07-31 03:10:20 +00:00
|
|
|
periodSeconds: 3
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
2020-04-15 10:10:03 +00:00
|
|
|
- sh
|
|
|
|
- /kube-ovn/kube-ovn-controller-healthcheck.sh
|
2020-05-06 18:05:09 +00:00
|
|
|
initialDelaySeconds: 300
|
2019-07-31 03:10:20 +00:00
|
|
|
periodSeconds: 7
|
|
|
|
failureThreshold: 5
|
|
|
|
nodeSelector:
|
2020-04-15 10:10:03 +00:00
|
|
|
kubernetes.io/os: "linux"
|
2019-07-31 03:10:20 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: DaemonSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: kube-ovn-cni
|
2020-05-06 18:05:09 +00:00
|
|
|
namespace: kube-system
|
2019-07-31 03:10:20 +00:00
|
|
|
annotations:
|
|
|
|
kubernetes.io/description: |
|
|
|
|
This daemon set launches the kube-ovn cni daemon.
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: kube-ovn-cni
|
|
|
|
updateStrategy:
|
2020-04-15 10:10:03 +00:00
|
|
|
type: OnDelete
|
2019-07-31 03:10:20 +00:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: kube-ovn-cni
|
|
|
|
component: network
|
|
|
|
type: infra
|
|
|
|
spec:
|
|
|
|
tolerations:
|
|
|
|
- operator: Exists
|
2020-04-15 10:10:03 +00:00
|
|
|
priorityClassName: system-cluster-critical
|
2019-07-31 03:10:20 +00:00
|
|
|
serviceAccountName: ovn
|
|
|
|
hostNetwork: true
|
|
|
|
hostPID: true
|
|
|
|
initContainers:
|
|
|
|
- name: install-cni
|
2020-04-15 10:10:03 +00:00
|
|
|
image: {{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }}
|
2019-07-31 03:10:20 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
command: ["/kube-ovn/install-cni.sh"]
|
2020-04-15 10:10:03 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 0
|
|
|
|
privileged: true
|
2019-07-31 03:10:20 +00:00
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /etc/cni/net.d
|
|
|
|
name: cni-conf
|
|
|
|
- mountPath: /opt/cni/bin
|
|
|
|
name: cni-bin
|
|
|
|
containers:
|
|
|
|
- name: cni-server
|
2020-04-15 10:10:03 +00:00
|
|
|
image: {{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }}
|
2019-07-31 03:10:20 +00:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
|
|
|
command:
|
|
|
|
- sh
|
|
|
|
- /kube-ovn/start-cniserver.sh
|
|
|
|
args:
|
|
|
|
- --enable-mirror={{ traffic_mirror }}
|
2020-04-15 10:10:03 +00:00
|
|
|
- --encap-checksum={{ encap_checksum }}
|
|
|
|
- --service-cluster-ip-range={{ kube_service_addresses }}
|
2019-07-31 03:10:20 +00:00
|
|
|
securityContext:
|
2020-04-15 10:10:03 +00:00
|
|
|
capabilities:
|
|
|
|
add: ["NET_ADMIN", "SYS_ADMIN", "SYS_PTRACE"]
|
2019-07-31 03:10:20 +00:00
|
|
|
env:
|
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /run/openvswitch
|
|
|
|
name: host-run-ovs
|
2020-04-15 10:10:03 +00:00
|
|
|
- mountPath: /run/ovn
|
|
|
|
name: host-run-ovn
|
|
|
|
- mountPath: /var/run/netns
|
|
|
|
name: host-ns
|
|
|
|
mountPropagation: HostToContainer
|
2019-07-31 03:10:20 +00:00
|
|
|
readinessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- nc
|
|
|
|
- -z
|
|
|
|
- -w3
|
|
|
|
- 127.0.0.1
|
|
|
|
- "10665"
|
|
|
|
periodSeconds: 3
|
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
|
|
|
- nc
|
|
|
|
- -z
|
|
|
|
- -w3
|
|
|
|
- 127.0.0.1
|
|
|
|
- "10665"
|
|
|
|
initialDelaySeconds: 30
|
|
|
|
periodSeconds: 7
|
|
|
|
failureThreshold: 5
|
|
|
|
nodeSelector:
|
2020-04-15 10:10:03 +00:00
|
|
|
kubernetes.io/os: "linux"
|
2019-07-31 03:10:20 +00:00
|
|
|
volumes:
|
|
|
|
- name: host-run-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /run/openvswitch
|
2020-04-15 10:10:03 +00:00
|
|
|
- name: host-run-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /run/ovn
|
2019-07-31 03:10:20 +00:00
|
|
|
- name: cni-conf
|
|
|
|
hostPath:
|
|
|
|
path: /etc/cni/net.d
|
|
|
|
- name: cni-bin
|
|
|
|
hostPath:
|
2020-04-15 10:10:03 +00:00
|
|
|
path: /opt/cni/bin
|
|
|
|
- name: host-ns
|
|
|
|
hostPath:
|
|
|
|
path: /var/run/netns
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: DaemonSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: kube-ovn-pinger
|
2020-05-06 18:05:09 +00:00
|
|
|
namespace: kube-system
|
2020-04-15 10:10:03 +00:00
|
|
|
annotations:
|
|
|
|
kubernetes.io/description: |
|
|
|
|
This daemon set launches the openvswitch daemon.
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: kube-ovn-pinger
|
|
|
|
updateStrategy:
|
|
|
|
type: RollingUpdate
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: kube-ovn-pinger
|
|
|
|
component: network
|
|
|
|
type: infra
|
|
|
|
spec:
|
|
|
|
tolerations:
|
2020-06-02 12:38:15 +00:00
|
|
|
- operator: Exists
|
2020-04-15 10:10:03 +00:00
|
|
|
serviceAccountName: ovn
|
|
|
|
hostPID: true
|
|
|
|
containers:
|
|
|
|
- name: pinger
|
|
|
|
image: {{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }}
|
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2020-05-10 18:37:50 +00:00
|
|
|
command: ["/kube-ovn/kube-ovn-pinger", "--external-address=114.114.114.114"]
|
2020-04-15 10:10:03 +00:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 0
|
|
|
|
privileged: false
|
|
|
|
env:
|
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
|
|
|
- name: HOST_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.hostIP
|
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: host-modules
|
|
|
|
readOnly: true
|
|
|
|
- mountPath: /run/openvswitch
|
|
|
|
name: host-run-ovs
|
|
|
|
- mountPath: /var/run/openvswitch
|
|
|
|
name: host-run-ovs
|
|
|
|
- mountPath: /var/run/ovn
|
|
|
|
name: host-run-ovn
|
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
readOnly: true
|
|
|
|
- mountPath: /etc/openvswitch
|
|
|
|
name: host-config-openvswitch
|
|
|
|
- mountPath: /var/log/openvswitch
|
|
|
|
name: host-log-ovs
|
|
|
|
- mountPath: /var/log/ovn
|
|
|
|
name: host-log-ovn
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: {{ kube_ovn_pinger_cpu_request }}
|
|
|
|
memory: {{ kube_ovn_pinger_memory_request }}
|
|
|
|
limits:
|
|
|
|
cpu: {{ kube_ovn_pinger_cpu_limit }}
|
|
|
|
memory: {{ kube_ovn_pinger_memory_limit }}
|
|
|
|
nodeSelector:
|
|
|
|
kubernetes.io/os: "linux"
|
|
|
|
volumes:
|
|
|
|
- name: host-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
|
|
|
- name: host-run-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /run/openvswitch
|
|
|
|
- name: host-run-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /run/ovn
|
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: host-config-openvswitch
|
|
|
|
hostPath:
|
|
|
|
path: /etc/origin/openvswitch
|
|
|
|
- name: host-log-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /var/log/openvswitch
|
|
|
|
- name: host-log-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /var/log/ovn
|
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: kube-ovn-pinger
|
2020-05-06 18:05:09 +00:00
|
|
|
namespace: kube-system
|
2020-04-15 10:10:03 +00:00
|
|
|
labels:
|
|
|
|
app: kube-ovn-pinger
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: kube-ovn-pinger
|
|
|
|
ports:
|
|
|
|
- port: 8080
|
|
|
|
name: metrics
|
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: kube-ovn-controller
|
2020-05-06 18:05:09 +00:00
|
|
|
namespace: kube-system
|
2020-04-15 10:10:03 +00:00
|
|
|
labels:
|
|
|
|
app: kube-ovn-controller
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: kube-ovn-controller
|
|
|
|
ports:
|
|
|
|
- port: 10660
|
|
|
|
name: metrics
|
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: kube-ovn-cni
|
2020-05-06 18:05:09 +00:00
|
|
|
namespace: kube-system
|
2020-04-15 10:10:03 +00:00
|
|
|
labels:
|
|
|
|
app: kube-ovn-cni
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: kube-ovn-cni
|
|
|
|
ports:
|
|
|
|
- port: 10665
|
2020-06-02 12:38:15 +00:00
|
|
|
name: metrics
|