Skip to content

Commit

Permalink
Revert "upgrade ovs-ovn pod by generation version instead of chart ve…
Browse files Browse the repository at this point in the history
…rsion (#1960)" (#3386)

This reverts commit f075458.

Signed-off-by: 马洪贞 <hzma@alauda.io>
  • Loading branch information
hongzhen-ma committed Nov 8, 2023
1 parent e36c6b9 commit b3f78fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist/images/upgrade-ovs.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

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

0 comments on commit b3f78fc

Please sign in to comment.