Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kube-ovn v1.12.0-727-ged16ce5a #252

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/system/kubeovn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ update:
curl -sSL https://github.com/kubeovn/kube-ovn/archive/refs/heads/master.tar.gz | \
tar xzvf - --strip 1 kube-ovn-master/charts
patch --no-backup-if-mismatch -p4 < patches/cozyconfig.diff
patch --no-backup-if-mismatch -p1 < patches/fix-disable-modules-management.diff
ln -s ../../images charts/kube-ovn/images
sed -i '/image:/ s/{{.*}}/{{ include "kubeovn.image" . }}/g' `grep -rl image: charts/kube-ovn/templates/`

Expand Down
21 changes: 21 additions & 0 deletions packages/system/kubeovn/charts/kube-ovn/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,24 @@ Number of master nodes
RollingUpdate
{{- end -}}
{{- end -}}

{{- define "kubeovn.ovn.versionCompatibility" -}}
{{- $ds := lookup "apps/v1" "DaemonSet" $.Values.namespace "ovs-ovn" -}}
{{- if $ds -}}
{{- $chartVersion := index $ds.metadata.annotations "chart-version" }}
{{- $newChartVersion := printf "%s-%s" .Chart.Name .Chart.Version }}
{{- $imageVersion := (index $ds.spec.template.spec.containers 0).image | splitList ":" | last | trimPrefix "v" -}}
{{- $versionRegex := `^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)` -}}
{{- if and (ne $newChartVersion $chartVersion) (regexMatch $versionRegex $imageVersion) -}}
{{- if regexFind $versionRegex $imageVersion | semverCompare ">= 1.13.0" -}}
24.03
{{- else if regexFind $versionRegex $imageVersion | semverCompare ">= 1.12.0" -}}
22.12
{{- else if regexFind $versionRegex $imageVersion | semverCompare ">= 1.11.0" -}}
22.03
{{- else -}}
21.06
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,42 @@ spec:
priorityClassName: system-cluster-critical
serviceAccountName: ovn-ovs
hostNetwork: true
initContainers:
- name: hostpath-init
image: {{ include "kubeovn.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
- -c
- "chown -R nobody: /var/run/ovn /etc/ovn /var/log/ovn"
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /var/run/ovn
name: host-run-ovn
- mountPath: /etc/ovn
name: host-config-ovn
- mountPath: /var/log/ovn
name: host-log-ovn
containers:
- name: ovn-central
image: {{ include "kubeovn.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- bash
- /kube-ovn/start-db.sh
securityContext:
runAsUser: 65534
privileged: false
capabilities:
add: ["SYS_NICE"]
add:
- NET_BIND_SERVICE
- SYS_NICE
env:
- name: ENABLE_SSL
value: "{{ .Values.networking.ENABLE_SSL }}"
Expand Down Expand Up @@ -82,10 +109,8 @@ spec:
value: "{{ .Values.networking.OVN_NORTHD_N_THREADS }}"
- name: ENABLE_COMPACT
value: "{{ .Values.networking.ENABLE_COMPACT }}"
{{- if include "kubeovn.ovs-ovn.updateStrategy" . | eq "OnDelete" }}
- name: OVN_VERSION_COMPATIBILITY
value: "21.06"
{{- end }}
value: '{{ include "kubeovn.ovn.versionCompatibility" . }}'
resources:
requests:
cpu: {{ index .Values "ovn-central" "requests" "cpu" }}
Expand All @@ -94,16 +119,10 @@ spec:
cpu: {{ index .Values "ovn-central" "limits" "cpu" }}
memory: {{ index .Values "ovn-central" "limits" "memory" }}
volumeMounts:
- mountPath: /var/run/openvswitch
name: host-run-ovs
- mountPath: /var/run/ovn
name: host-run-ovn
- mountPath: /etc/openvswitch
name: host-config-openvswitch
- mountPath: /etc/ovn
name: host-config-ovn
- mountPath: /var/log/openvswitch
name: host-log-ovs
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /etc/localtime
Expand Down Expand Up @@ -133,21 +152,12 @@ spec:
{{ index . 0 }}: "{{ if eq (len .) 2 }}{{ index . 1 }}{{ end }}"
{{- end }}
volumes:
- name: host-run-ovs
hostPath:
path: /run/openvswitch
- name: host-run-ovn
hostPath:
path: /run/ovn
- name: host-config-openvswitch
hostPath:
path: {{ .Values.OPENVSWITCH_DIR }}
- name: host-config-ovn
hostPath:
path: {{ .Values.OVN_DIR }}
- name: host-log-ovs
hostPath:
path: {{ .Values.log_conf.LOG_DIR }}/openvswitch
- name: host-log-ovn
hostPath:
path: {{ .Values.log_conf.LOG_DIR }}/ovn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ spec:
priorityClassName: system-cluster-critical
serviceAccountName: ovn
hostNetwork: true
initContainers:
- name: hostpath-init
image: {{ include "kubeovn.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
- -c
- "chown -R nobody: /var/log/kube-ovn"
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsUser: 0
volumeMounts:
- name: kube-ovn-log
mountPath: /var/log/kube-ovn
containers:
- name: kube-ovn-controller
image: {{ include "kubeovn.image" . }}
Expand Down Expand Up @@ -84,18 +102,29 @@ spec:
- --gc-interval={{- .Values.performance.GC_INTERVAL }}
- --inspect-interval={{- .Values.performance.INSPECT_INTERVAL }}
- --log_file=/var/log/kube-ovn/kube-ovn-controller.log
- --log_file_max_size=0
- --log_file_max_size=200
- --enable-lb-svc={{- .Values.func.ENABLE_LB_SVC }}
- --keep-vm-ip={{- .Values.func.ENABLE_KEEP_VM_IP }}
- --enable-metrics={{- .Values.networking.ENABLE_METRICS }}
- --node-local-dns-ip={{- .Values.networking.NODE_LOCAL_DNS_IP }}
- --secure-serving={{- .Values.func.SECURE_SERVING }}
securityContext:
runAsUser: 65534
privileged: false
capabilities:
add:
- NET_BIND_SERVICE
env:
- name: ENABLE_SSL
value: "{{ .Values.networking.ENABLE_SSL }}"
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
Expand All @@ -106,6 +135,10 @@ spec:
fieldPath: spec.nodeName
- name: OVN_DB_IPS
value: "{{ .Values.MASTER_NODES | default (include "kubeovn.nodeIPs" .) }}"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_IPS
valueFrom:
fieldRef:
Expand All @@ -127,12 +160,14 @@ spec:
exec:
command:
- /kube-ovn/kube-ovn-controller-healthcheck
- --tls={{- .Values.func.SECURE_SERVING }}
periodSeconds: 3
timeoutSeconds: 45
livenessProbe:
exec:
command:
- /kube-ovn/kube-ovn-controller-healthcheck
- --tls={{- .Values.func.SECURE_SERVING }}
initialDelaySeconds: 300
periodSeconds: 7
failureThreshold: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,45 @@ spec:
priorityClassName: system-cluster-critical
serviceAccountName: ovn
hostNetwork: true
initContainers:
- name: hostpath-init
image: {{ include "kubeovn.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
- -c
- "chown -R nobody: /var/run/ovn /var/log/ovn /var/log/kube-ovn"
securityContext:
allowPrivilegeEscalation: true
capabilities:
drop:
- ALL
privileged: true
runAsUser: 0
volumeMounts:
- mountPath: /var/run/ovn
name: host-run-ovn
- mountPath: /var/log/ovn
name: host-log-ovn
- name: kube-ovn-log
mountPath: /var/log/kube-ovn
containers:
- name: ovn-ic-controller
image: {{ include "kubeovn.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/kube-ovn/start-ic-controller.sh"]
args:
- --log_file=/var/log/kube-ovn/kube-ovn-ic-controller.log
- --log_file_max_size=0
- --log_file_max_size=200
- --logtostderr=false
- --alsologtostderr=true
securityContext:
runAsUser: 65534
privileged: false
capabilities:
add: ["SYS_NICE"]
add:
- NET_BIND_SERVICE
- SYS_NICE
env:
- name: ENABLE_SSL
value: "{{ .Values.networking.ENABLE_SSL }}"
Expand All @@ -73,8 +99,6 @@ spec:
volumeMounts:
- mountPath: /var/run/ovn
name: host-run-ovn
- mountPath: /etc/ovn
name: host-config-ovn
- mountPath: /var/log/ovn
name: host-log-ovn
- mountPath: /etc/localtime
Expand All @@ -90,9 +114,6 @@ spec:
- name: host-run-ovn
hostPath:
path: /run/ovn
- name: host-config-ovn
hostPath:
path: /etc/origin/ovn
- name: host-log-ovn
hostPath:
path: /var/log/ovn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,31 @@ spec:
type: string
qosPolicy:
type: string
bgpSpeaker:
type: object
properties:
enabled:
type: boolean
asn:
type: integer
remoteAsn:
type: integer
neighbors:
type: array
items:
type: string
holdTime:
type: string
routerId:
type: string
password:
type: string
enableGracefulRestart:
type: boolean
extraArgs:
type: array
items:
type: string
tolerations:
type: array
items:
Expand Down Expand Up @@ -1191,6 +1216,9 @@ spec:
- jsonPath: .status.ready
name: Ready
type: boolean
- jsonPath: .spec.externalSubnet
name: ExternalSubnet
type: string
schema:
openAPIV3Schema:
type: object
Expand Down Expand Up @@ -1297,8 +1325,12 @@ spec:
type: boolean
v4Eip:
type: string
v6Eip:
type: string
v4Ip:
type: string
v6Ip:
type: string
vpc:
type: string
conditions:
Expand Down Expand Up @@ -1490,8 +1522,12 @@ spec:
type: boolean
v4Eip:
type: string
v6Eip:
type: string
v4Ip:
type: string
v6Ip:
type: string
vpc:
type: string
externalPort:
Expand Down Expand Up @@ -1969,6 +2005,8 @@ spec:
type: string
u2oInterconnectionIP:
type: string
u2oInterconnectionMAC:
type: string
u2oInterconnectionVPC:
type: string
v4usingIPrange:
Expand Down
Loading