2019-07-31 11:10:20 +08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
2024-08-15 21:39:18 +08:00
|
|
|
metadata:
|
|
|
|
name: ovn-ovs
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
rbac.authorization.k8s.io/system-only: "true"
|
|
|
|
name: system:ovn-ovs
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- patch
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- services
|
|
|
|
- endpoints
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- apiGroups:
|
|
|
|
- apps
|
|
|
|
resources:
|
|
|
|
- controllerrevisions
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: ovn-ovs
|
|
|
|
roleRef:
|
|
|
|
name: system:ovn-ovs
|
|
|
|
kind: ClusterRole
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: ovn-ovs
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ServiceAccount
|
2019-07-31 11:10:20 +08:00
|
|
|
metadata:
|
|
|
|
name: ovn
|
2020-05-07 02:05:09 +08:00
|
|
|
namespace: kube-system
|
2019-07-31 11:10:20 +08:00
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
|
|
|
annotations:
|
|
|
|
rbac.authorization.k8s.io/system-only: "true"
|
|
|
|
name: system:ovn
|
|
|
|
rules:
|
|
|
|
- apiGroups:
|
|
|
|
- "kubeovn.io"
|
|
|
|
resources:
|
2021-02-10 18:25:01 +08:00
|
|
|
- vpcs
|
|
|
|
- vpcs/status
|
2021-06-16 23:10:00 +08:00
|
|
|
- vpc-nat-gateways
|
2024-08-15 21:39:18 +08:00
|
|
|
- vpc-nat-gateways/status
|
2022-05-12 12:35:15 +08:00
|
|
|
- subnets
|
|
|
|
- subnets/status
|
2024-08-15 21:39:18 +08:00
|
|
|
- ippools
|
|
|
|
- ippools/status
|
2019-07-31 11:10:20 +08:00
|
|
|
- ips
|
2022-12-09 07:58:11 +08:00
|
|
|
- vips
|
|
|
|
- vips/status
|
2020-05-07 02:05:09 +08:00
|
|
|
- vlans
|
2022-05-12 12:35:15 +08:00
|
|
|
- vlans/status
|
2021-07-15 16:59:38 +08:00
|
|
|
- provider-networks
|
|
|
|
- provider-networks/status
|
2021-10-15 03:11:09 +08:00
|
|
|
- security-groups
|
|
|
|
- security-groups/status
|
2022-12-09 07:58:11 +08:00
|
|
|
- iptables-eips
|
|
|
|
- iptables-fip-rules
|
|
|
|
- iptables-dnat-rules
|
|
|
|
- iptables-snat-rules
|
|
|
|
- iptables-eips/status
|
|
|
|
- iptables-fip-rules/status
|
|
|
|
- iptables-dnat-rules/status
|
|
|
|
- iptables-snat-rules/status
|
2023-05-25 09:34:51 +08:00
|
|
|
- ovn-eips
|
|
|
|
- ovn-fips
|
|
|
|
- ovn-snat-rules
|
|
|
|
- ovn-eips/status
|
|
|
|
- ovn-fips/status
|
|
|
|
- ovn-snat-rules/status
|
2024-08-15 21:39:18 +08:00
|
|
|
- ovn-dnat-rules
|
|
|
|
- ovn-dnat-rules/status
|
2023-05-25 09:34:51 +08:00
|
|
|
- switch-lb-rules
|
|
|
|
- switch-lb-rules/status
|
|
|
|
- vpc-dnses
|
|
|
|
- vpc-dnses/status
|
2024-08-15 21:39:18 +08:00
|
|
|
- qos-policies
|
|
|
|
- qos-policies/status
|
2019-07-31 11:10:20 +08:00
|
|
|
verbs:
|
|
|
|
- "*"
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
- namespaces
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
2024-08-15 21:39:18 +08:00
|
|
|
- patch
|
2019-07-31 11:10:20 +08:00
|
|
|
- watch
|
2024-08-15 21:39:18 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- nodes
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
2019-07-31 11:10:20 +08:00
|
|
|
- patch
|
|
|
|
- update
|
2024-08-15 21:39:18 +08:00
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods/exec
|
|
|
|
verbs:
|
|
|
|
- create
|
2021-06-16 23:10:00 +08:00
|
|
|
- apiGroups:
|
|
|
|
- "k8s.cni.cncf.io"
|
|
|
|
resources:
|
|
|
|
- network-attachment-definitions
|
|
|
|
verbs:
|
|
|
|
- get
|
2019-07-31 11:10:20 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
- networking.k8s.io
|
|
|
|
resources:
|
|
|
|
- networkpolicies
|
2024-08-15 21:39:18 +08:00
|
|
|
- configmaps
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- apps
|
|
|
|
resources:
|
|
|
|
- daemonsets
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
2019-07-31 11:10:20 +08:00
|
|
|
- services
|
2023-05-25 09:34:51 +08:00
|
|
|
- services/status
|
2024-08-15 21:39:18 +08:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- update
|
|
|
|
- create
|
|
|
|
- delete
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
2019-07-31 11:10:20 +08:00
|
|
|
- endpoints
|
2024-08-15 21:39:18 +08:00
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- apps
|
|
|
|
resources:
|
2019-07-31 11:10:20 +08:00
|
|
|
- statefulsets
|
2020-05-07 02:05:09 +08:00
|
|
|
- deployments
|
2022-05-12 12:35:15 +08:00
|
|
|
- deployments/scale
|
2019-07-31 11:10:20 +08:00
|
|
|
verbs:
|
2024-08-15 21:39:18 +08:00
|
|
|
- get
|
|
|
|
- list
|
2021-06-16 23:10:00 +08:00
|
|
|
- create
|
|
|
|
- delete
|
|
|
|
- update
|
2019-07-31 11:10:20 +08:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- events
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- patch
|
|
|
|
- update
|
2022-12-09 07:58:11 +08:00
|
|
|
- apiGroups:
|
|
|
|
- coordination.k8s.io
|
|
|
|
resources:
|
|
|
|
- leases
|
|
|
|
verbs:
|
|
|
|
- "*"
|
2022-05-12 12:35:15 +08:00
|
|
|
- apiGroups:
|
|
|
|
- "kubevirt.io"
|
|
|
|
resources:
|
|
|
|
- virtualmachines
|
|
|
|
- virtualmachineinstances
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
2024-08-15 21:39:18 +08:00
|
|
|
- apiGroups:
|
|
|
|
- authentication.k8s.io
|
|
|
|
resources:
|
|
|
|
- tokenreviews
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- apiGroups:
|
|
|
|
- authorization.k8s.io
|
|
|
|
resources:
|
|
|
|
- subjectaccessreviews
|
|
|
|
verbs:
|
|
|
|
- create
|
2019-07-31 11:10:20 +08:00
|
|
|
---
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRoleBinding
|
|
|
|
metadata:
|
|
|
|
name: ovn
|
|
|
|
roleRef:
|
|
|
|
name: system:ovn
|
|
|
|
kind: ClusterRole
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: ovn
|
2020-05-07 02:05:09 +08:00
|
|
|
namespace: kube-system
|
2019-07-31 11:10:20 +08:00
|
|
|
---
|
2024-08-15 21:39:18 +08:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: RoleBinding
|
|
|
|
metadata:
|
|
|
|
name: ovn
|
|
|
|
namespace: kube-system
|
|
|
|
roleRef:
|
|
|
|
apiGroup: rbac.authorization.k8s.io
|
|
|
|
kind: Role
|
|
|
|
name: extension-apiserver-authentication-reader
|
|
|
|
subjects:
|
|
|
|
- kind: ServiceAccount
|
|
|
|
name: ovn
|
|
|
|
namespace: kube-system
|
|
|
|
---
|
2019-07-31 11:10:20 +08:00
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: ovn-nb
|
2020-05-07 02:05:09 +08:00
|
|
|
namespace: kube-system
|
2019-07-31 11:10:20 +08:00
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- name: ovn-nb
|
|
|
|
protocol: TCP
|
|
|
|
port: 6641
|
|
|
|
targetPort: 6641
|
|
|
|
type: ClusterIP
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if enable_dual_stack_networks %}
|
|
|
|
ipFamilyPolicy: PreferDualStack
|
|
|
|
{% endif %}
|
2019-07-31 11:10:20 +08:00
|
|
|
selector:
|
|
|
|
app: ovn-central
|
2020-04-15 18:10:03 +08:00
|
|
|
ovn-nb-leader: "true"
|
2019-07-31 11:10:20 +08:00
|
|
|
sessionAffinity: None
|
|
|
|
---
|
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: ovn-sb
|
2020-05-07 02:05:09 +08:00
|
|
|
namespace: kube-system
|
2019-07-31 11:10:20 +08:00
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- name: ovn-sb
|
|
|
|
protocol: TCP
|
|
|
|
port: 6642
|
|
|
|
targetPort: 6642
|
|
|
|
type: ClusterIP
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if enable_dual_stack_networks %}
|
|
|
|
ipFamilyPolicy: PreferDualStack
|
|
|
|
{% endif %}
|
2019-07-31 11:10:20 +08:00
|
|
|
selector:
|
|
|
|
app: ovn-central
|
2020-04-15 18:10:03 +08:00
|
|
|
ovn-sb-leader: "true"
|
2019-07-31 11:10:20 +08:00
|
|
|
sessionAffinity: None
|
|
|
|
---
|
2021-04-18 09:50:21 +08:00
|
|
|
kind: Service
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: ovn-northd
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- name: ovn-northd
|
|
|
|
protocol: TCP
|
|
|
|
port: 6643
|
|
|
|
targetPort: 6643
|
|
|
|
type: ClusterIP
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if enable_dual_stack_networks %}
|
|
|
|
ipFamilyPolicy: PreferDualStack
|
|
|
|
{% endif %}
|
2021-04-18 09:50:21 +08:00
|
|
|
selector:
|
|
|
|
app: ovn-central
|
|
|
|
ovn-northd-leader: "true"
|
|
|
|
sessionAffinity: None
|
|
|
|
---
|
2019-07-31 11:10:20 +08:00
|
|
|
kind: Deployment
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: ovn-central
|
2020-05-07 02:05:09 +08:00
|
|
|
namespace: kube-system
|
2019-07-31 11:10:20 +08:00
|
|
|
annotations:
|
|
|
|
kubernetes.io/description: |
|
|
|
|
OVN components: northd, nb and sb.
|
|
|
|
spec:
|
2022-05-12 12:35:15 +08:00
|
|
|
replicas: {{ kube_ovn_central_replics }}
|
2019-07-31 11:10:20 +08:00
|
|
|
strategy:
|
|
|
|
rollingUpdate:
|
2021-02-10 18:25:01 +08:00
|
|
|
maxSurge: 0
|
|
|
|
maxUnavailable: 1
|
2019-07-31 11:10:20 +08:00
|
|
|
type: RollingUpdate
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: ovn-central
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: ovn-central
|
|
|
|
component: network
|
|
|
|
type: infra
|
|
|
|
spec:
|
|
|
|
tolerations:
|
2024-08-15 21:39:18 +08:00
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
|
|
|
- effect: NoExecute
|
|
|
|
operator: Exists
|
|
|
|
- key: CriticalAddonsOnly
|
|
|
|
operator: Exists
|
2019-07-31 11:10:20 +08:00
|
|
|
affinity:
|
|
|
|
podAntiAffinity:
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
- labelSelector:
|
|
|
|
matchLabels:
|
|
|
|
app: ovn-central
|
|
|
|
topologyKey: kubernetes.io/hostname
|
2020-04-15 18:10:03 +08:00
|
|
|
priorityClassName: system-cluster-critical
|
2024-08-15 21:39:18 +08:00
|
|
|
serviceAccountName: ovn-ovs
|
2019-07-31 11:10:20 +08:00
|
|
|
hostNetwork: true
|
|
|
|
containers:
|
|
|
|
- name: ovn-central
|
2020-04-15 18:10:03 +08:00
|
|
|
image: {{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }}
|
2019-07-31 11:10:20 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2020-04-15 18:10:03 +08:00
|
|
|
command: ["/kube-ovn/start-db.sh"]
|
|
|
|
securityContext:
|
|
|
|
capabilities:
|
2024-08-15 21:39:18 +08:00
|
|
|
add:
|
|
|
|
- NET_BIND_SERVICE
|
|
|
|
- SYS_NICE
|
2019-07-31 11:10:20 +08:00
|
|
|
env:
|
2020-11-27 01:34:19 +08:00
|
|
|
- name: ENABLE_SSL
|
2022-05-12 12:35:15 +08:00
|
|
|
value: "{{ kube_ovn_enable_ssl | lower }}"
|
2023-05-25 09:34:51 +08:00
|
|
|
- name: NODE_IPS
|
|
|
|
value: "{{ kube_ovn_central_ips }}"
|
2019-07-31 11:10:20 +08:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2020-04-15 18:10:03 +08:00
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2023-05-25 09:34:51 +08:00
|
|
|
- name: POD_IPS
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIPs
|
|
|
|
- name: ENABLE_BIND_LOCAL_IP
|
|
|
|
value: "{{ kube_ovn_bind_local_ip_enabled }}"
|
2024-08-15 21:39:18 +08:00
|
|
|
- name: PROBE_INTERVAL
|
|
|
|
value: "180000"
|
|
|
|
- name: OVN_NORTHD_PROBE_INTERVAL
|
|
|
|
value: "5000"
|
|
|
|
- name: OVN_LEADER_PROBE_INTERVAL
|
|
|
|
value: "5"
|
2019-07-31 11:10:20 +08:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: {{ kube_ovn_db_cpu_request }}
|
|
|
|
memory: {{ kube_ovn_db_memory_request }}
|
|
|
|
limits:
|
|
|
|
cpu: {{ kube_ovn_db_cpu_limit }}
|
|
|
|
memory: {{ kube_ovn_db_memory_limit }}
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /var/run/openvswitch
|
|
|
|
name: host-run-ovs
|
2020-04-15 18:10:03 +08:00
|
|
|
- mountPath: /var/run/ovn
|
|
|
|
name: host-run-ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
readOnly: true
|
|
|
|
- mountPath: /etc/openvswitch
|
|
|
|
name: host-config-openvswitch
|
2020-05-07 02:05:09 +08:00
|
|
|
- mountPath: /etc/ovn
|
|
|
|
name: host-config-ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
- mountPath: /var/log/openvswitch
|
2020-04-15 18:10:03 +08:00
|
|
|
name: host-log-ovs
|
|
|
|
- mountPath: /var/log/ovn
|
|
|
|
name: host-log-ovn
|
2021-06-16 23:10:00 +08:00
|
|
|
- mountPath: /etc/localtime
|
|
|
|
name: localtime
|
2020-11-27 01:34:19 +08:00
|
|
|
- mountPath: /var/run/tls
|
|
|
|
name: kube-ovn-tls
|
2019-07-31 11:10:20 +08:00
|
|
|
readinessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
2021-02-10 18:25:01 +08:00
|
|
|
- bash
|
2022-12-09 07:58:11 +08:00
|
|
|
- /kube-ovn/ovn-healthcheck.sh
|
2022-05-12 12:35:15 +08:00
|
|
|
periodSeconds: 15
|
2020-11-27 01:34:19 +08:00
|
|
|
timeoutSeconds: 45
|
2019-07-31 11:10:20 +08:00
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
2021-06-16 23:10:00 +08:00
|
|
|
- bash
|
|
|
|
- /kube-ovn/ovn-healthcheck.sh
|
2019-07-31 11:10:20 +08:00
|
|
|
initialDelaySeconds: 30
|
2022-05-12 12:35:15 +08:00
|
|
|
periodSeconds: 15
|
2019-07-31 11:10:20 +08:00
|
|
|
failureThreshold: 5
|
2020-11-27 01:34:19 +08:00
|
|
|
timeoutSeconds: 45
|
2019-07-31 11:10:20 +08:00
|
|
|
nodeSelector:
|
2020-04-15 18:10:03 +08:00
|
|
|
kubernetes.io/os: "linux"
|
2019-07-31 11:10:20 +08:00
|
|
|
kube-ovn/role: "master"
|
|
|
|
volumes:
|
|
|
|
- name: host-run-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /run/openvswitch
|
2020-04-15 18:10:03 +08:00
|
|
|
- name: host-run-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /run/ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
|
|
|
- name: host-config-openvswitch
|
|
|
|
hostPath:
|
|
|
|
path: /etc/origin/openvswitch
|
2020-05-07 02:05:09 +08:00
|
|
|
- name: host-config-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /etc/origin/ovn
|
2020-04-15 18:10:03 +08:00
|
|
|
- name: host-log-ovs
|
2019-07-31 11:10:20 +08:00
|
|
|
hostPath:
|
|
|
|
path: /var/log/openvswitch
|
2020-04-15 18:10:03 +08:00
|
|
|
- name: host-log-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /var/log/ovn
|
2021-06-16 23:10:00 +08:00
|
|
|
- name: localtime
|
|
|
|
hostPath:
|
|
|
|
path: /etc/localtime
|
2020-11-27 01:34:19 +08:00
|
|
|
- name: kube-ovn-tls
|
|
|
|
secret:
|
|
|
|
optional: true
|
|
|
|
secretName: kube-ovn-tls
|
2019-07-31 11:10:20 +08:00
|
|
|
---
|
|
|
|
kind: DaemonSet
|
|
|
|
apiVersion: apps/v1
|
|
|
|
metadata:
|
|
|
|
name: ovs-ovn
|
2020-05-07 02:05:09 +08:00
|
|
|
namespace: kube-system
|
2019-07-31 11:10:20 +08:00
|
|
|
annotations:
|
|
|
|
kubernetes.io/description: |
|
|
|
|
This daemon set launches the openvswitch daemon.
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: ovs
|
|
|
|
updateStrategy:
|
2024-08-15 21:39:18 +08:00
|
|
|
type: RollingUpdate
|
|
|
|
rollingUpdate:
|
|
|
|
maxSurge: 1
|
|
|
|
maxUnavailable: 0
|
2019-07-31 11:10:20 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: ovs
|
|
|
|
component: network
|
|
|
|
type: infra
|
|
|
|
spec:
|
|
|
|
tolerations:
|
2024-08-15 21:39:18 +08:00
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
|
|
|
- effect: NoExecute
|
|
|
|
operator: Exists
|
|
|
|
- key: CriticalAddonsOnly
|
|
|
|
operator: Exists
|
2023-05-25 09:34:51 +08:00
|
|
|
priorityClassName: system-node-critical
|
2024-08-15 21:39:18 +08:00
|
|
|
serviceAccountName: ovn-ovs
|
2019-07-31 11:10:20 +08:00
|
|
|
hostNetwork: true
|
|
|
|
hostPID: true
|
|
|
|
containers:
|
|
|
|
- name: openvswitch
|
2022-05-12 12:35:15 +08:00
|
|
|
image: {% if kube_ovn_dpdk_enabled %}{{ kube_ovn_dpdk_container_image_repo }}:{{ kube_ovn_dpdk_container_image_tag }}{% else %}{{ kube_ovn_container_image_repo }}:{{ kube_ovn_container_image_tag }}{% endif %}
|
|
|
|
|
2019-07-31 11:10:20 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2022-05-12 12:35:15 +08:00
|
|
|
command: [{% if kube_ovn_dpdk_enabled %}"/kube-ovn/start-ovs-dpdk.sh"{% else %}"/kube-ovn/start-ovs.sh"{% endif %}]
|
2019-07-31 11:10:20 +08:00
|
|
|
securityContext:
|
|
|
|
runAsUser: 0
|
2024-08-15 21:39:18 +08:00
|
|
|
privileged: false
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_ADMIN
|
|
|
|
- NET_BIND_SERVICE
|
|
|
|
- SYS_MODULE
|
|
|
|
- SYS_NICE
|
2019-07-31 11:10:20 +08:00
|
|
|
env:
|
2020-11-27 01:34:19 +08:00
|
|
|
- name: ENABLE_SSL
|
2022-05-12 12:35:15 +08:00
|
|
|
value: "{{ kube_ovn_enable_ssl | lower }}"
|
2019-07-31 11:10:20 +08:00
|
|
|
- name: POD_IP
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: status.podIP
|
2024-08-15 21:39:18 +08:00
|
|
|
- name: POD_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.name
|
|
|
|
- name: POD_NAMESPACE
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: metadata.namespace
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if not kube_ovn_dpdk_enabled %}
|
2020-08-01 15:34:04 +08:00
|
|
|
- name: HW_OFFLOAD
|
2022-08-30 18:21:01 +08:00
|
|
|
value: "{{ kube_ovn_hw_offload | string | lower }}"
|
2022-05-12 12:35:15 +08:00
|
|
|
- name: TUNNEL_TYPE
|
|
|
|
value: "{{ kube_ovn_tunnel_type }}"
|
|
|
|
{% endif %}
|
2020-11-27 01:34:19 +08:00
|
|
|
- name: KUBE_NODE_NAME
|
|
|
|
valueFrom:
|
|
|
|
fieldRef:
|
|
|
|
fieldPath: spec.nodeName
|
2022-12-28 12:51:27 +08:00
|
|
|
- name: OVN_DB_IPS
|
|
|
|
value: "{{ kube_ovn_central_ips }}"
|
2019-07-31 11:10:20 +08:00
|
|
|
volumeMounts:
|
2022-12-09 07:58:11 +08:00
|
|
|
- mountPath: /var/run/netns
|
|
|
|
name: host-ns
|
|
|
|
mountPropagation: HostToContainer
|
2019-07-31 11:10:20 +08:00
|
|
|
- mountPath: /lib/modules
|
|
|
|
name: host-modules
|
|
|
|
readOnly: true
|
|
|
|
- mountPath: /var/run/openvswitch
|
|
|
|
name: host-run-ovs
|
2020-04-15 18:10:03 +08:00
|
|
|
- mountPath: /var/run/ovn
|
|
|
|
name: host-run-ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
- mountPath: /sys
|
|
|
|
name: host-sys
|
|
|
|
readOnly: true
|
2021-07-15 16:59:38 +08:00
|
|
|
- mountPath: /etc/cni/net.d
|
|
|
|
name: cni-conf
|
2019-07-31 11:10:20 +08:00
|
|
|
- mountPath: /etc/openvswitch
|
|
|
|
name: host-config-openvswitch
|
2020-05-07 02:05:09 +08:00
|
|
|
- mountPath: /etc/ovn
|
|
|
|
name: host-config-ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
- mountPath: /var/log/openvswitch
|
2020-04-15 18:10:03 +08:00
|
|
|
name: host-log-ovs
|
|
|
|
- mountPath: /var/log/ovn
|
|
|
|
name: host-log-ovn
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if kube_ovn_dpdk_enabled %}
|
|
|
|
- mountPath: /opt/ovs-config
|
|
|
|
name: host-config-ovs
|
|
|
|
- mountPath: /dev/hugepages
|
|
|
|
name: hugepage
|
|
|
|
{% endif %}
|
2021-06-16 23:10:00 +08:00
|
|
|
- mountPath: /etc/localtime
|
|
|
|
name: localtime
|
2020-11-27 01:34:19 +08:00
|
|
|
- mountPath: /var/run/tls
|
|
|
|
name: kube-ovn-tls
|
2024-08-15 21:39:18 +08:00
|
|
|
- mountPath: /var/run/containerd
|
|
|
|
name: cruntime
|
|
|
|
readOnly: true
|
2019-07-31 11:10:20 +08:00
|
|
|
readinessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
2021-06-16 23:10:00 +08:00
|
|
|
- bash
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if kube_ovn_dpdk_enabled %}
|
|
|
|
- /kube-ovn/ovs-dpdk-healthcheck.sh
|
|
|
|
{% else %}
|
2021-06-16 23:10:00 +08:00
|
|
|
- /kube-ovn/ovs-healthcheck.sh
|
2022-05-12 12:35:15 +08:00
|
|
|
{% endif %}
|
2019-07-31 11:10:20 +08:00
|
|
|
periodSeconds: 5
|
2020-11-27 01:34:19 +08:00
|
|
|
timeoutSeconds: 45
|
2019-07-31 11:10:20 +08:00
|
|
|
livenessProbe:
|
|
|
|
exec:
|
|
|
|
command:
|
2021-06-16 23:10:00 +08:00
|
|
|
- bash
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if kube_ovn_dpdk_enabled %}
|
|
|
|
- /kube-ovn/ovs-dpdk-healthcheck.sh
|
|
|
|
{% else %}
|
2021-06-16 23:10:00 +08:00
|
|
|
- /kube-ovn/ovs-healthcheck.sh
|
2022-05-12 12:35:15 +08:00
|
|
|
{% endif %}
|
2023-05-25 09:34:51 +08:00
|
|
|
initialDelaySeconds: 60
|
2019-07-31 11:10:20 +08:00
|
|
|
periodSeconds: 5
|
|
|
|
failureThreshold: 5
|
2020-11-27 01:34:19 +08:00
|
|
|
timeoutSeconds: 45
|
2019-07-31 11:10:20 +08:00
|
|
|
resources:
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if kube_ovn_dpdk_enabled %}
|
|
|
|
requests:
|
|
|
|
cpu: {{ kube_ovn_dpdk_node_cpu_request }}
|
|
|
|
memory: {{ kube_ovn_dpdk_node_memory_request }}
|
|
|
|
limits:
|
|
|
|
cpu: {{ kube_ovn_dpdk_node_cpu_limit }}
|
|
|
|
memory: {{ kube_ovn_dpdk_node_memory_limit }}
|
|
|
|
hugepages-1Gi: 1Gi
|
|
|
|
{% else %}
|
2019-07-31 11:10:20 +08:00
|
|
|
requests:
|
|
|
|
cpu: {{ kube_ovn_node_cpu_request }}
|
|
|
|
memory: {{ kube_ovn_node_memory_request }}
|
|
|
|
limits:
|
|
|
|
cpu: {{ kube_ovn_node_cpu_limit }}
|
|
|
|
memory: {{ kube_ovn_node_memory_limit }}
|
2022-05-12 12:35:15 +08:00
|
|
|
{% endif %}
|
2019-07-31 11:10:20 +08:00
|
|
|
nodeSelector:
|
2020-04-15 18:10:03 +08:00
|
|
|
kubernetes.io/os: "linux"
|
2019-07-31 11:10:20 +08:00
|
|
|
volumes:
|
|
|
|
- name: host-modules
|
|
|
|
hostPath:
|
|
|
|
path: /lib/modules
|
|
|
|
- name: host-run-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /run/openvswitch
|
2020-04-15 18:10:03 +08:00
|
|
|
- name: host-run-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /run/ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
- name: host-sys
|
|
|
|
hostPath:
|
|
|
|
path: /sys
|
2022-12-09 07:58:11 +08:00
|
|
|
- name: host-ns
|
|
|
|
hostPath:
|
|
|
|
path: /var/run/netns
|
2021-07-15 16:59:38 +08:00
|
|
|
- name: cni-conf
|
|
|
|
hostPath:
|
|
|
|
path: /etc/cni/net.d
|
2019-07-31 11:10:20 +08:00
|
|
|
- name: host-config-openvswitch
|
|
|
|
hostPath:
|
|
|
|
path: /etc/origin/openvswitch
|
2020-05-07 02:05:09 +08:00
|
|
|
- name: host-config-ovn
|
|
|
|
hostPath:
|
|
|
|
path: /etc/origin/ovn
|
2020-04-15 18:10:03 +08:00
|
|
|
- name: host-log-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /var/log/openvswitch
|
|
|
|
- name: host-log-ovn
|
2019-07-31 11:10:20 +08:00
|
|
|
hostPath:
|
2020-06-30 03:39:59 +08:00
|
|
|
path: /var/log/ovn
|
2022-05-12 12:35:15 +08:00
|
|
|
{% if kube_ovn_dpdk_enabled %}
|
|
|
|
- name: host-config-ovs
|
|
|
|
hostPath:
|
|
|
|
path: /opt/ovs-config
|
|
|
|
type: DirectoryOrCreate
|
|
|
|
- name: hugepage
|
|
|
|
emptyDir:
|
|
|
|
medium: HugePages
|
|
|
|
{% endif %}
|
2021-06-16 23:10:00 +08:00
|
|
|
- name: localtime
|
|
|
|
hostPath:
|
|
|
|
path: /etc/localtime
|
2024-08-15 21:39:18 +08:00
|
|
|
- name: cruntime
|
|
|
|
hostPath:
|
|
|
|
path: /var/run/containerd
|
2020-11-27 01:34:19 +08:00
|
|
|
- name: kube-ovn-tls
|
|
|
|
secret:
|
|
|
|
optional: true
|
|
|
|
secretName: kube-ovn-tls
|