Skip to content

Commit fc54de5

Browse files
committed
fix all the reference about the API packages change
1 parent e01ff16 commit fc54de5

28 files changed

+135
-99
lines changed

cmd/cloud-controller-manager/app/apis/config/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package config
1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2121
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
2223
)
2324

2425
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -35,7 +36,7 @@ type CloudControllerManagerConfiguration struct {
3536

3637
// ServiceControllerConfiguration holds configuration for ServiceController
3738
// related features.
38-
ServiceController kubectrlmgrconfig.ServiceControllerConfiguration
39+
ServiceController serviceconfig.ServiceControllerConfiguration
3940

4041
// NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status
4142
NodeStatusUpdateFrequency metav1.Duration

cmd/cloud-controller-manager/app/apis/config/v1alpha1/defaults.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2323
"k8s.io/apimachinery/pkg/runtime"
2424
kubectrlmgrconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1"
25+
serviceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/service/config/v1alpha1"
2526
)
2627

2728
func addDefaultingFuncs(scheme *runtime.Scheme) error {
@@ -45,4 +46,6 @@ func SetDefaults_CloudControllerManagerConfiguration(obj *CloudControllerManager
4546

4647
// Use the default RecommendedDefaultGenericControllerManagerConfiguration options
4748
kubectrlmgrconfigv1alpha1.RecommendedDefaultGenericControllerManagerConfiguration(&obj.Generic)
49+
// Use the default RecommendedDefaultServiceControllerConfiguration options
50+
serviceconfigv1alpha1.RecommendedDefaultServiceControllerConfiguration(&obj.ServiceController)
4851
}

cmd/cloud-controller-manager/app/apis/config/v1alpha1/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ limitations under the License.
2323
// +k8s:conversion-gen=k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config
2424
// +k8s:conversion-gen=k8s.io/component-base/config/v1alpha1
2525
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1
26+
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/service/config/v1alpha1
2627
// +k8s:openapi-gen=true
2728
// +k8s:defaulter-gen=TypeMeta
2829
// +groupName=cloudcontrollermanager.config.k8s.io

cmd/cloud-controller-manager/app/options/options_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
componentbaseconfig "k8s.io/component-base/config"
3131
cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options"
3232
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
33+
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
3334
)
3435

3536
func TestDefaultFlags(t *testing.T) {
@@ -80,7 +81,7 @@ func TestDefaultFlags(t *testing.T) {
8081
},
8182
},
8283
ServiceController: &cmoptions.ServiceControllerOptions{
83-
ServiceControllerConfiguration: &kubectrlmgrconfig.ServiceControllerConfiguration{
84+
ServiceControllerConfiguration: &serviceconfig.ServiceControllerConfiguration{
8485
ConcurrentServiceSyncs: 1,
8586
},
8687
},
@@ -209,7 +210,7 @@ func TestAddFlags(t *testing.T) {
209210
},
210211
},
211212
ServiceController: &cmoptions.ServiceControllerOptions{
212-
ServiceControllerConfiguration: &kubectrlmgrconfig.ServiceControllerConfiguration{
213+
ServiceControllerConfiguration: &serviceconfig.ServiceControllerConfiguration{
213214
ConcurrentServiceSyncs: 1,
214215
},
215216
},

cmd/controller-manager/app/options/servicecontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ package options
1919
import (
2020
"github.com/spf13/pflag"
2121

22-
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
2323
)
2424

2525
// ServiceControllerOptions holds the ServiceController options.
2626
type ServiceControllerOptions struct {
27-
*kubectrlmgrconfig.ServiceControllerConfiguration
27+
*serviceconfig.ServiceControllerConfiguration
2828
}
2929

3030
// AddFlags adds flags related to ServiceController for controller manager to the specified FlagSet.
@@ -37,7 +37,7 @@ func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet) {
3737
}
3838

3939
// ApplyTo fills up ServiceController config with options.
40-
func (o *ServiceControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.ServiceControllerConfiguration) error {
40+
func (o *ServiceControllerOptions) ApplyTo(cfg *serviceconfig.ServiceControllerConfiguration) error {
4141
if o == nil {
4242
return nil
4343
}

cmd/kube-controller-manager/app/options/attachdetachcontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ package options
1919
import (
2020
"github.com/spf13/pflag"
2121

22-
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
attachdetachconfig "k8s.io/kubernetes/pkg/controller/volume/attachdetach/config"
2323
)
2424

2525
// AttachDetachControllerOptions holds the AttachDetachController options.
2626
type AttachDetachControllerOptions struct {
27-
*kubectrlmgrconfig.AttachDetachControllerConfiguration
27+
*attachdetachconfig.AttachDetachControllerConfiguration
2828
}
2929

3030
// AddFlags adds flags related to AttachDetachController for controller manager to the specified FlagSet.
@@ -38,7 +38,7 @@ func (o *AttachDetachControllerOptions) AddFlags(fs *pflag.FlagSet) {
3838
}
3939

4040
// ApplyTo fills up AttachDetachController config with options.
41-
func (o *AttachDetachControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.AttachDetachControllerConfiguration) error {
41+
func (o *AttachDetachControllerOptions) ApplyTo(cfg *attachdetachconfig.AttachDetachControllerConfiguration) error {
4242
if o == nil {
4343
return nil
4444
}

cmd/kube-controller-manager/app/options/csrsigningcontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package options
1919
import (
2020
"github.com/spf13/pflag"
2121

22-
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
2323
)
2424

2525
const (
@@ -34,7 +34,7 @@ const (
3434

3535
// CSRSigningControllerOptions holds the CSRSigningController options.
3636
type CSRSigningControllerOptions struct {
37-
*kubectrlmgrconfig.CSRSigningControllerConfiguration
37+
*csrsigningconfig.CSRSigningControllerConfiguration
3838
}
3939

4040
// AddFlags adds flags related to CSRSigningController for controller manager to the specified FlagSet.
@@ -49,7 +49,7 @@ func (o *CSRSigningControllerOptions) AddFlags(fs *pflag.FlagSet) {
4949
}
5050

5151
// ApplyTo fills up CSRSigningController config with options.
52-
func (o *CSRSigningControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.CSRSigningControllerConfiguration) error {
52+
func (o *CSRSigningControllerOptions) ApplyTo(cfg *csrsigningconfig.CSRSigningControllerConfiguration) error {
5353
if o == nil {
5454
return nil
5555
}

cmd/kube-controller-manager/app/options/daemonsetcontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ package options
1919
import (
2020
"github.com/spf13/pflag"
2121

22-
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
daemonconfig "k8s.io/kubernetes/pkg/controller/daemon/config"
2323
)
2424

2525
// DaemonSetControllerOptions holds the DaemonSetController options.
2626
type DaemonSetControllerOptions struct {
27-
*kubectrlmgrconfig.DaemonSetControllerConfiguration
27+
*daemonconfig.DaemonSetControllerConfiguration
2828
}
2929

3030
// AddFlags adds flags related to DaemonSetController for controller manager to the specified FlagSet.
@@ -35,7 +35,7 @@ func (o *DaemonSetControllerOptions) AddFlags(fs *pflag.FlagSet) {
3535
}
3636

3737
// ApplyTo fills up DaemonSetController config with options.
38-
func (o *DaemonSetControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.DaemonSetControllerConfiguration) error {
38+
func (o *DaemonSetControllerOptions) ApplyTo(cfg *daemonconfig.DaemonSetControllerConfiguration) error {
3939
if o == nil {
4040
return nil
4141
}

cmd/kube-controller-manager/app/options/deploymentcontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ package options
1919
import (
2020
"github.com/spf13/pflag"
2121

22-
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config"
2323
)
2424

2525
// DeploymentControllerOptions holds the DeploymentController options.
2626
type DeploymentControllerOptions struct {
27-
*kubectrlmgrconfig.DeploymentControllerConfiguration
27+
*deploymentconfig.DeploymentControllerConfiguration
2828
}
2929

3030
// AddFlags adds flags related to DeploymentController for controller manager to the specified FlagSet.
@@ -38,7 +38,7 @@ func (o *DeploymentControllerOptions) AddFlags(fs *pflag.FlagSet) {
3838
}
3939

4040
// ApplyTo fills up DeploymentController config with options.
41-
func (o *DeploymentControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.DeploymentControllerConfiguration) error {
41+
func (o *DeploymentControllerOptions) ApplyTo(cfg *deploymentconfig.DeploymentControllerConfiguration) error {
4242
if o == nil {
4343
return nil
4444
}

cmd/kube-controller-manager/app/options/endpointcontroller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ package options
1919
import (
2020
"github.com/spf13/pflag"
2121

22-
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
22+
endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config"
2323
)
2424

2525
// EndpointControllerOptions holds the EndPointController options.
2626
type EndpointControllerOptions struct {
27-
*kubectrlmgrconfig.EndpointControllerConfiguration
27+
*endpointconfig.EndpointControllerConfiguration
2828
}
2929

3030
// AddFlags adds flags related to EndPointController for controller manager to the specified FlagSet.
@@ -37,7 +37,7 @@ func (o *EndpointControllerOptions) AddFlags(fs *pflag.FlagSet) {
3737
}
3838

3939
// ApplyTo fills up EndPointController config with options.
40-
func (o *EndpointControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.EndpointControllerConfiguration) error {
40+
func (o *EndpointControllerOptions) ApplyTo(cfg *endpointconfig.EndpointControllerConfiguration) error {
4141
if o == nil {
4242
return nil
4343
}

0 commit comments

Comments
 (0)