-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Disable v1beta3 in REST API #4992
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -197,12 +197,16 @@ func ValidateAPILevels(apiLevels []string, knownAPILevels, deadAPILevels []strin | |
| func ValidateEtcdStorageConfig(config api.EtcdStorageConfig) fielderrors.ValidationErrorList { | ||
| allErrs := fielderrors.ValidationErrorList{} | ||
|
|
||
| if len(config.KubernetesStorageVersion) == 0 { | ||
| allErrs = append(allErrs, fielderrors.NewFieldRequired("kubernetesStorageVersion")) | ||
| } | ||
| if len(config.OpenShiftStorageVersion) == 0 { | ||
| allErrs = append(allErrs, fielderrors.NewFieldRequired("openShiftStorageVersion")) | ||
| } | ||
| allErrs = append(allErrs, ValidateStorageVersionLevel( | ||
| config.KubernetesStorageVersion, | ||
| api.KnownKubernetesStorageVersionLevels, | ||
| api.DeadKubernetesStorageVersionLevels, | ||
| "kubernetesStorageVersion")...) | ||
| allErrs = append(allErrs, ValidateStorageVersionLevel( | ||
| config.OpenShiftStorageVersion, | ||
| api.KnownOpenShiftStorageVersionLevels, | ||
| api.DeadOpenShiftStorageVersionLevels, | ||
| "openShiftStorageVersion")...) | ||
|
|
||
| if strings.ContainsRune(config.KubernetesStoragePrefix, '%') { | ||
| allErrs = append(allErrs, fielderrors.NewFieldInvalid("kubernetesStoragePrefix", config.KubernetesStoragePrefix, "the '%' character may not be used in etcd path prefixes")) | ||
|
|
@@ -214,6 +218,22 @@ func ValidateEtcdStorageConfig(config api.EtcdStorageConfig) fielderrors.Validat | |
| return allErrs | ||
| } | ||
|
|
||
| func ValidateStorageVersionLevel(level string, knownAPILevels, deadAPILevels []string, name string) fielderrors.ValidationErrorList { | ||
| allErrs := fielderrors.ValidationErrorList{} | ||
|
|
||
| if len(level) == 0 { | ||
| allErrs = append(allErrs, fielderrors.NewFieldRequired(name)) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. return here, no point in checking if
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
| return allErrs | ||
| } | ||
| supportedLevels := sets.NewString(knownAPILevels...) | ||
| supportedLevels.Delete(deadAPILevels...) | ||
| if !supportedLevels.Has(level) { | ||
| allErrs = append(allErrs, fielderrors.NewFieldValueNotSupported(name, level, supportedLevels.List())) | ||
| } | ||
|
|
||
| return allErrs | ||
| } | ||
|
|
||
| func ValidateServiceAccountConfig(config api.ServiceAccountConfig, builtInKubernetes bool) ValidationResults { | ||
| validationResults := ValidationResults{} | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oc get -n $1 builds -o name | head -n 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know this is worth changing right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not.