mirror of https://github.com/easzlab/kubeasz.git
129 lines
3.2 KiB
Plaintext
129 lines
3.2 KiB
Plaintext
|
---
|
||
|
kind: Deployment
|
||
|
apiVersion: apps/v1
|
||
|
metadata:
|
||
|
name: kube-ovn-controller
|
||
|
namespace: kube-ovn
|
||
|
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
|
||
|
serviceAccountName: ovn
|
||
|
hostNetwork: true
|
||
|
containers:
|
||
|
- name: kube-ovn-controller
|
||
|
image: "index.alauda.cn/alaudak8s/kube-ovn-controller:v0.4.0"
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
command:
|
||
|
- /kube-ovn/start-controller.sh
|
||
|
args:
|
||
|
- --default-cidr=10.16.0.0/16
|
||
|
- --node-switch-cidr=100.64.0.0/16
|
||
|
env:
|
||
|
- name: POD_NAME
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: metadata.name
|
||
|
- name: KUBE_NAMESPACE
|
||
|
valueFrom:
|
||
|
fieldRef:
|
||
|
fieldPath: metadata.namespace
|
||
|
nodeSelector:
|
||
|
beta.kubernetes.io/os: "linux"
|
||
|
|
||
|
---
|
||
|
kind: DaemonSet
|
||
|
apiVersion: apps/v1
|
||
|
metadata:
|
||
|
name: kube-ovn-cni
|
||
|
namespace: kube-ovn
|
||
|
annotations:
|
||
|
kubernetes.io/description: |
|
||
|
This daemon set launches the kube-ovn cni daemon.
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: kube-ovn-cni
|
||
|
updateStrategy:
|
||
|
type: RollingUpdate
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: kube-ovn-cni
|
||
|
component: network
|
||
|
type: infra
|
||
|
spec:
|
||
|
tolerations:
|
||
|
- operator: Exists
|
||
|
effect: NoSchedule
|
||
|
serviceAccountName: ovn
|
||
|
hostNetwork: true
|
||
|
hostPID: true
|
||
|
initContainers:
|
||
|
- name: install-cni
|
||
|
image: "index.alauda.cn/alaudak8s/kube-ovn-cni:v0.4.0"
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
command: ["/kube-ovn/install-cni.sh"]
|
||
|
volumeMounts:
|
||
|
- mountPath: /etc/cni/net.d
|
||
|
name: cni-conf
|
||
|
- mountPath: /opt/cni/bin
|
||
|
name: cni-bin
|
||
|
containers:
|
||
|
- name: cni-server
|
||
|
image: "index.alauda.cn/alaudak8s/kube-ovn-cni:v0.4.0"
|
||
|
imagePullPolicy: IfNotPresent
|
||
|
securityContext:
|
||
|
runAsUser: 0
|
||
|
privileged: true
|
||
|
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
|
||
|
nodeSelector:
|
||
|
beta.kubernetes.io/os: "linux"
|
||
|
volumes:
|
||
|
- name: host-run-ovs
|
||
|
hostPath:
|
||
|
path: /run/openvswitch
|
||
|
- name: cni-conf
|
||
|
hostPath:
|
||
|
path: /etc/cni/net.d
|
||
|
- name: cni-bin
|
||
|
hostPath:
|
||
|
path: {{ bin_dir }}
|