mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Merge pull request #64654 from atlassian/missing-error-handling
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add missing error handling in schema-related code **What this PR does / why we need it**: Adds missing error handling to a few places. **Which issue(s) this PR fixes** Updates #51457. Still more work to do to fix the issue - client generation code needs to be updated (addressed in https://github.com/kubernetes/kubernetes/pull/64664). **Release note**: ```release-note NONE ``` /kind bug /sig api-machinery
This commit is contained in:
@@ -114,8 +114,12 @@ func NewCloudControllerManagerOptions() (*CloudControllerManagerOptions, error)
|
||||
// NewDefaultComponentConfig returns cloud-controller manager configuration object.
|
||||
func NewDefaultComponentConfig(insecurePort int32) (componentconfig.CloudControllerManagerConfiguration, error) {
|
||||
scheme := runtime.NewScheme()
|
||||
componentconfigv1alpha1.AddToScheme(scheme)
|
||||
componentconfig.AddToScheme(scheme)
|
||||
if err := componentconfigv1alpha1.AddToScheme(scheme); err != nil {
|
||||
return componentconfig.CloudControllerManagerConfiguration{}, err
|
||||
}
|
||||
if err := componentconfig.AddToScheme(scheme); err != nil {
|
||||
return componentconfig.CloudControllerManagerConfiguration{}, err
|
||||
}
|
||||
|
||||
versioned := componentconfigv1alpha1.CloudControllerManagerConfiguration{}
|
||||
scheme.Default(&versioned)
|
||||
|
Reference in New Issue
Block a user