Skip to content

Commit

Permalink
PWX-32850: When preflight is unsupported we need to make sure we are …
Browse files Browse the repository at this point in the history
…setting the pre-flight annotation to false. (#1195)

Signed-off-by: Jose Rivera <jose@portworx.com>
  • Loading branch information
jrivera-px committed Aug 10, 2023
1 parent 75fc9b7 commit cf05dbb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pkg/controller/storagecluster/storagecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -742,12 +742,11 @@ func (c *Controller) syncStorageCluster(
return fmt.Errorf("preflight check failed for StorageCluster %v/%v: %v", cluster.Namespace, cluster.Name, err)
}
} else {
if _, exists := cluster.Annotations[pxutil.AnnotationPreflightCheck]; !exists {
if cluster.Annotations == nil {
cluster.Annotations = make(map[string]string)
}
cluster.Annotations[pxutil.AnnotationPreflightCheck] = "false"
// Always disable preflight if not supported.
if cluster.Annotations == nil {
cluster.Annotations = make(map[string]string)
}
cluster.Annotations[pxutil.AnnotationPreflightCheck] = "false"
}

if err := c.miscCleanUp(cluster); err != nil {
Expand Down

0 comments on commit cf05dbb

Please sign in to comment.