Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix a bug of gke cluster creation #580

Merged
merged 6 commits into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading