Skip to content

Commit

Permalink
upgrade ovs-ovn pod by generation version instead of chart version (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Oct 19, 2022
1 parent b9e98e5 commit 57c75c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/images/upgrade-ovs.sh
@@ -1,11 +1,11 @@
#!/bin/bash

dsChartVer=`kubectl get ds -n kube-system ovs-ovn -o jsonpath={.metadata.annotations.chart-version}`
dsGenVer=`kubectl get ds -n kube-system ovs-ovn -o jsonpath={.metadata.generation}`
podNames=`kubectl get pod -n kube-system | grep ovs-ovn | awk '{print $1}'`
for pod in $podNames
do
podChartVer=`kubectl get pod -n kube-system $pod -o jsonpath={.metadata.annotations.chart-version}`
if [ $dsChartVer == $podChartVer ]
podGenVer=`kubectl get pod -n kube-system $pod -o jsonpath={.metadata.labels.pod-template-generation}`
if [ $dsGenVer == $podGenVer ]
then
echo "pod $pod alreay upgraded"
continue
Expand Down

0 comments on commit 57c75c1

Please sign in to comment.