Skip to content

Commit

Permalink
Merge pull request #580 from chengshifan/add-debug-code-for-gke
Browse files Browse the repository at this point in the history
chore:  fix a bug of gke cluster creation
  • Loading branch information
chengshifan authored Jul 30, 2024
2 parents d05b1f3 + c7a2337 commit 067faef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/gcp/pkg/stub/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func createCluster(cr *v1alpha1.GKECluster, log *logrus.Entry) (*v1alpha1.GKEClu
if err != nil {
err = fmt.Errorf("failed to create GKE Cluster: %v, %s", err, out)
log.Error(err)
log.Errorf("Error creation with command: gcloud %s", strings.Join(args, " "))
return nil, err
}

Expand Down Expand Up @@ -735,6 +736,10 @@ func getExactClusterVersion(cr *v1alpha1.GKECluster, log *logrus.Entry) (string,
}

for _, c := range config.Channels {
if strings.ToLower(c.Channel) == "extended" {
// extended in not supported by --release-channel extended in current gcloud version
continue
}
for _, v := range c.ValidVersions {
if strings.HasPrefix(v, cr.Spec.ClusterVersion) {
return v, strings.ToLower(c.Channel), nil
Expand Down

0 comments on commit 067faef

Please sign in to comment.