Skip to content

Commit

Permalink
skip token refresh verification if host-pid not enabled
Browse files Browse the repository at this point in the history
Signed-off-by: shsun_pure <shsun@purestorage.com>
  • Loading branch information
shsun_pure committed Aug 11, 2024
1 parent 6e2096d commit 299f69b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/util/test/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,11 @@ func validatePortworxTokenRefresh(cluster *corev1.StorageCluster, timeout, inter
logrus.Infof("pxVersion: %v, opVersion: %v. Skip verification because px token refresh is not supported with these versions.", pxVersion, opVersion)
return nil
}
pidEnabled, err := strconv.ParseBool(cluster.Annotations["portworx.io/host-pid"])
if err != nil || !pidEnabled {
logrus.Infof("Annotation `host-pid: true` is required for verifying token refresh because we need to run command inside px runc container. Thus Skipping verification.")
return nil
}
logrus.Infof("Verifying px runc container token...")
// Get one Portworx pod to run commands inside the px runc container on the same node
pxPods, err := coreops.Instance().GetPods(cluster.Namespace, map[string]string{"name": "portworx"})
Expand Down

0 comments on commit 299f69b

Please sign in to comment.