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

Set both beta and non-beta is-default-value annotation on storage class #1772

Merged
merged 2 commits into from
Sep 23, 2019
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
6 changes: 3 additions & 3 deletions hack/deployer/runner/gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ EOF`, sc)).Run()
return err
}

cmd := fmt.Sprintf(
`kubectl patch storageclass %s -p '{ "metadata": { "annotations": { "storageclass.beta.kubernetes.io/is-default-class":"false"} } }'`,
defaultName)
// Depending on K8s version, a different annotation is needed. To avoid parsing version string, both are set.
patch := `'{ "metadata": { "annotations": { "storageclass.kubernetes.io/is-default-class":"false", "storageclass.beta.kubernetes.io/is-default-class":"false"} } }'`
cmd := fmt.Sprintf(`kubectl patch storageclass %s -p %s`, defaultName, patch)
return NewCommand(cmd).Run()
}

Expand Down