Skip to content

Commit

Permalink
fix: ovs-ovn should reboot now (#2298)
Browse files Browse the repository at this point in the history
* fix: ovs-ovn should reboot now

* fix: ovs-ovn should reboot now
  • Loading branch information
lut777 committed Feb 22, 2023
1 parent eae134e commit 5b58c8f
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions kubeovn-helm/templates/post-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ .Chart.Name }}"
namespace: kube-system
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
annotations:
# This is what defines this resource as a hook. Without this line, the
# job is considered part of the release.
"helm.sh/hook": post-upgrade
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded
spec:
completions: 1
template:
metadata:
name: "{{ .Release.Name }}"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app: post-upgrade
component: job
spec:
tolerations:
- key: ""
operator: "Exists"
effect: "NoSchedule"
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- post-upgrade
- key: component
operator: In
values:
- job
restartPolicy: Never
hostNetwork: true
nodeSelector:
kubernetes.io/os: "linux"
serviceAccount: ovn
serviceAccountName: ovn
containers:
- name: post-upgrade-job
image: "{{ .Values.global.registry.address}}/{{ .Values.global.images.kubeovn.repository }}:{{ .Values.global.images.kubeovn.tag }}"
command: ["/kube-ovn/upgrade-ovs.sh"]

0 comments on commit 5b58c8f

Please sign in to comment.