Unverified Commit 4499275c authored by Kubernetes Prow Robot's avatar Kubernetes Prow Robot Committed by GitHub

Merge pull request #72800 from stewart-yu/stewart-component-base

Move config local to every controller in KCM
parents 775d298c ecbd5427
...@@ -12,6 +12,7 @@ go_library( ...@@ -12,6 +12,7 @@ go_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//pkg/controller/apis/config:go_default_library", "//pkg/controller/apis/config:go_default_library",
"//pkg/controller/service/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
......
...@@ -19,6 +19,7 @@ package config ...@@ -19,6 +19,7 @@ package config
import ( import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
) )
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
...@@ -35,7 +36,7 @@ type CloudControllerManagerConfiguration struct { ...@@ -35,7 +36,7 @@ type CloudControllerManagerConfiguration struct {
// ServiceControllerConfiguration holds configuration for ServiceController // ServiceControllerConfiguration holds configuration for ServiceController
// related features. // related features.
ServiceController kubectrlmgrconfig.ServiceControllerConfiguration ServiceController serviceconfig.ServiceControllerConfiguration
// NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status // NodeStatusUpdateFrequency is the frequency at which the controller updates nodes' status
NodeStatusUpdateFrequency metav1.Duration NodeStatusUpdateFrequency metav1.Duration
......
...@@ -16,6 +16,7 @@ go_library( ...@@ -16,6 +16,7 @@ go_library(
deps = [ deps = [
"//cmd/cloud-controller-manager/app/apis/config:go_default_library", "//cmd/cloud-controller-manager/app/apis/config:go_default_library",
"//pkg/controller/apis/config/v1alpha1:go_default_library", "//pkg/controller/apis/config/v1alpha1:go_default_library",
"//pkg/controller/service/config/v1alpha1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
......
...@@ -22,6 +22,7 @@ import ( ...@@ -22,6 +22,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime"
kubectrlmgrconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1" kubectrlmgrconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1"
serviceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/service/config/v1alpha1"
) )
func addDefaultingFuncs(scheme *runtime.Scheme) error { func addDefaultingFuncs(scheme *runtime.Scheme) error {
...@@ -45,4 +46,6 @@ func SetDefaults_CloudControllerManagerConfiguration(obj *CloudControllerManager ...@@ -45,4 +46,6 @@ func SetDefaults_CloudControllerManagerConfiguration(obj *CloudControllerManager
// Use the default RecommendedDefaultGenericControllerManagerConfiguration options // Use the default RecommendedDefaultGenericControllerManagerConfiguration options
kubectrlmgrconfigv1alpha1.RecommendedDefaultGenericControllerManagerConfiguration(&obj.Generic) kubectrlmgrconfigv1alpha1.RecommendedDefaultGenericControllerManagerConfiguration(&obj.Generic)
// Use the default RecommendedDefaultServiceControllerConfiguration options
serviceconfigv1alpha1.RecommendedDefaultServiceControllerConfiguration(&obj.ServiceController)
} }
...@@ -23,6 +23,7 @@ limitations under the License. ...@@ -23,6 +23,7 @@ limitations under the License.
// +k8s:conversion-gen=k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config // +k8s:conversion-gen=k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config
// +k8s:conversion-gen=k8s.io/component-base/config/v1alpha1 // +k8s:conversion-gen=k8s.io/component-base/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1 // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/service/config/v1alpha1
// +k8s:openapi-gen=true // +k8s:openapi-gen=true
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +groupName=cloudcontrollermanager.config.k8s.io // +groupName=cloudcontrollermanager.config.k8s.io
......
...@@ -25,6 +25,7 @@ import ( ...@@ -25,6 +25,7 @@ import (
runtime "k8s.io/apimachinery/pkg/runtime" runtime "k8s.io/apimachinery/pkg/runtime"
config "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config" config "k8s.io/kubernetes/cmd/cloud-controller-manager/app/apis/config"
configv1alpha1 "k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1" configv1alpha1 "k8s.io/kubernetes/pkg/controller/apis/config/v1alpha1"
serviceconfigv1alpha1 "k8s.io/kubernetes/pkg/controller/service/config/v1alpha1"
) )
func init() { func init() {
...@@ -54,7 +55,7 @@ func autoConvert_v1alpha1_CloudControllerManagerConfiguration_To_config_CloudCon ...@@ -54,7 +55,7 @@ func autoConvert_v1alpha1_CloudControllerManagerConfiguration_To_config_CloudCon
if err := configv1alpha1.Convert_v1alpha1_KubeCloudSharedConfiguration_To_config_KubeCloudSharedConfiguration(&in.KubeCloudShared, &out.KubeCloudShared, s); err != nil { if err := configv1alpha1.Convert_v1alpha1_KubeCloudSharedConfiguration_To_config_KubeCloudSharedConfiguration(&in.KubeCloudShared, &out.KubeCloudShared, s); err != nil {
return err return err
} }
if err := configv1alpha1.Convert_v1alpha1_ServiceControllerConfiguration_To_config_ServiceControllerConfiguration(&in.ServiceController, &out.ServiceController, s); err != nil { if err := serviceconfigv1alpha1.Convert_v1alpha1_ServiceControllerConfiguration_To_config_ServiceControllerConfiguration(&in.ServiceController, &out.ServiceController, s); err != nil {
return err return err
} }
out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
...@@ -73,7 +74,7 @@ func autoConvert_config_CloudControllerManagerConfiguration_To_v1alpha1_CloudCon ...@@ -73,7 +74,7 @@ func autoConvert_config_CloudControllerManagerConfiguration_To_v1alpha1_CloudCon
if err := configv1alpha1.Convert_config_KubeCloudSharedConfiguration_To_v1alpha1_KubeCloudSharedConfiguration(&in.KubeCloudShared, &out.KubeCloudShared, s); err != nil { if err := configv1alpha1.Convert_config_KubeCloudSharedConfiguration_To_v1alpha1_KubeCloudSharedConfiguration(&in.KubeCloudShared, &out.KubeCloudShared, s); err != nil {
return err return err
} }
if err := configv1alpha1.Convert_config_ServiceControllerConfiguration_To_v1alpha1_ServiceControllerConfiguration(&in.ServiceController, &out.ServiceController, s); err != nil { if err := serviceconfigv1alpha1.Convert_config_ServiceControllerConfiguration_To_v1alpha1_ServiceControllerConfiguration(&in.ServiceController, &out.ServiceController, s); err != nil {
return err return err
} }
out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency out.NodeStatusUpdateFrequency = in.NodeStatusUpdateFrequency
......
...@@ -38,5 +38,4 @@ func RegisterDefaults(scheme *runtime.Scheme) error { ...@@ -38,5 +38,4 @@ func RegisterDefaults(scheme *runtime.Scheme) error {
func SetObjectDefaults_CloudControllerManagerConfiguration(in *CloudControllerManagerConfiguration) { func SetObjectDefaults_CloudControllerManagerConfiguration(in *CloudControllerManagerConfiguration) {
SetDefaults_CloudControllerManagerConfiguration(in) SetDefaults_CloudControllerManagerConfiguration(in)
configv1alpha1.SetDefaults_KubeCloudSharedConfiguration(&in.KubeCloudShared) configv1alpha1.SetDefaults_KubeCloudSharedConfiguration(&in.KubeCloudShared)
configv1alpha1.SetDefaults_ServiceControllerConfiguration(&in.ServiceController)
} }
...@@ -56,6 +56,7 @@ go_test( ...@@ -56,6 +56,7 @@ go_test(
deps = [ deps = [
"//cmd/controller-manager/app/options:go_default_library", "//cmd/controller-manager/app/options:go_default_library",
"//pkg/controller/apis/config:go_default_library", "//pkg/controller/apis/config:go_default_library",
"//pkg/controller/service/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library",
......
...@@ -30,6 +30,7 @@ import ( ...@@ -30,6 +30,7 @@ import (
componentbaseconfig "k8s.io/component-base/config" componentbaseconfig "k8s.io/component-base/config"
cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options" cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
) )
func TestDefaultFlags(t *testing.T) { func TestDefaultFlags(t *testing.T) {
...@@ -80,7 +81,7 @@ func TestDefaultFlags(t *testing.T) { ...@@ -80,7 +81,7 @@ func TestDefaultFlags(t *testing.T) {
}, },
}, },
ServiceController: &cmoptions.ServiceControllerOptions{ ServiceController: &cmoptions.ServiceControllerOptions{
ServiceControllerConfiguration: &kubectrlmgrconfig.ServiceControllerConfiguration{ ServiceControllerConfiguration: &serviceconfig.ServiceControllerConfiguration{
ConcurrentServiceSyncs: 1, ConcurrentServiceSyncs: 1,
}, },
}, },
...@@ -209,7 +210,7 @@ func TestAddFlags(t *testing.T) { ...@@ -209,7 +210,7 @@ func TestAddFlags(t *testing.T) {
}, },
}, },
ServiceController: &cmoptions.ServiceControllerOptions{ ServiceController: &cmoptions.ServiceControllerOptions{
ServiceControllerConfiguration: &kubectrlmgrconfig.ServiceControllerConfiguration{ ServiceControllerConfiguration: &serviceconfig.ServiceControllerConfiguration{
ConcurrentServiceSyncs: 1, ConcurrentServiceSyncs: 1,
}, },
}, },
......
...@@ -14,6 +14,7 @@ go_library( ...@@ -14,6 +14,7 @@ go_library(
deps = [ deps = [
"//pkg/client/leaderelectionconfig:go_default_library", "//pkg/client/leaderelectionconfig:go_default_library",
"//pkg/controller/apis/config:go_default_library", "//pkg/controller/apis/config:go_default_library",
"//pkg/controller/service/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/sets:go_default_library",
"//staging/src/k8s.io/component-base/cli/flag:go_default_library", "//staging/src/k8s.io/component-base/cli/flag:go_default_library",
"//staging/src/k8s.io/component-base/config:go_default_library", "//staging/src/k8s.io/component-base/config:go_default_library",
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
) )
// ServiceControllerOptions holds the ServiceController options. // ServiceControllerOptions holds the ServiceController options.
type ServiceControllerOptions struct { type ServiceControllerOptions struct {
*kubectrlmgrconfig.ServiceControllerConfiguration *serviceconfig.ServiceControllerConfiguration
} }
// AddFlags adds flags related to ServiceController for controller manager to the specified FlagSet. // AddFlags adds flags related to ServiceController for controller manager to the specified FlagSet.
...@@ -37,7 +37,7 @@ func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -37,7 +37,7 @@ func (o *ServiceControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up ServiceController config with options. // ApplyTo fills up ServiceController config with options.
func (o *ServiceControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.ServiceControllerConfiguration) error { func (o *ServiceControllerOptions) ApplyTo(cfg *serviceconfig.ServiceControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -73,6 +73,7 @@ go_library( ...@@ -73,6 +73,7 @@ go_library(
"//pkg/controller/volume/attachdetach:go_default_library", "//pkg/controller/volume/attachdetach:go_default_library",
"//pkg/controller/volume/expand:go_default_library", "//pkg/controller/volume/expand:go_default_library",
"//pkg/controller/volume/persistentvolume:go_default_library", "//pkg/controller/volume/persistentvolume:go_default_library",
"//pkg/controller/volume/persistentvolume/config:go_default_library",
"//pkg/controller/volume/pvcprotection:go_default_library", "//pkg/controller/volume/pvcprotection:go_default_library",
"//pkg/controller/volume/pvprotection:go_default_library", "//pkg/controller/volume/pvprotection:go_default_library",
"//pkg/features:go_default_library", "//pkg/features:go_default_library",
......
...@@ -36,7 +36,25 @@ go_library( ...@@ -36,7 +36,25 @@ go_library(
"//cmd/kube-controller-manager/app/config:go_default_library", "//cmd/kube-controller-manager/app/config:go_default_library",
"//pkg/controller/apis/config:go_default_library", "//pkg/controller/apis/config:go_default_library",
"//pkg/controller/apis/config/scheme:go_default_library", "//pkg/controller/apis/config/scheme:go_default_library",
"//pkg/controller/certificates/signer/config:go_default_library",
"//pkg/controller/daemon/config:go_default_library",
"//pkg/controller/deployment/config:go_default_library",
"//pkg/controller/endpoint/config:go_default_library",
"//pkg/controller/garbagecollector:go_default_library", "//pkg/controller/garbagecollector:go_default_library",
"//pkg/controller/garbagecollector/config:go_default_library",
"//pkg/controller/job/config:go_default_library",
"//pkg/controller/namespace/config:go_default_library",
"//pkg/controller/nodeipam/config:go_default_library",
"//pkg/controller/nodelifecycle/config:go_default_library",
"//pkg/controller/podautoscaler/config:go_default_library",
"//pkg/controller/podgc/config:go_default_library",
"//pkg/controller/replicaset/config:go_default_library",
"//pkg/controller/replication/config:go_default_library",
"//pkg/controller/resourcequota/config:go_default_library",
"//pkg/controller/serviceaccount/config:go_default_library",
"//pkg/controller/ttlafterfinished/config:go_default_library",
"//pkg/controller/volume/attachdetach/config:go_default_library",
"//pkg/controller/volume/persistentvolume/config:go_default_library",
"//pkg/features:go_default_library", "//pkg/features:go_default_library",
"//pkg/master/ports:go_default_library", "//pkg/master/ports:go_default_library",
"//staging/src/k8s.io/api/core/v1:go_default_library", "//staging/src/k8s.io/api/core/v1:go_default_library",
...@@ -76,6 +94,25 @@ go_test( ...@@ -76,6 +94,25 @@ go_test(
deps = [ deps = [
"//cmd/controller-manager/app/options:go_default_library", "//cmd/controller-manager/app/options:go_default_library",
"//pkg/controller/apis/config:go_default_library", "//pkg/controller/apis/config:go_default_library",
"//pkg/controller/certificates/signer/config:go_default_library",
"//pkg/controller/daemon/config:go_default_library",
"//pkg/controller/deployment/config:go_default_library",
"//pkg/controller/endpoint/config:go_default_library",
"//pkg/controller/garbagecollector/config:go_default_library",
"//pkg/controller/job/config:go_default_library",
"//pkg/controller/namespace/config:go_default_library",
"//pkg/controller/nodeipam/config:go_default_library",
"//pkg/controller/nodelifecycle/config:go_default_library",
"//pkg/controller/podautoscaler/config:go_default_library",
"//pkg/controller/podgc/config:go_default_library",
"//pkg/controller/replicaset/config:go_default_library",
"//pkg/controller/replication/config:go_default_library",
"//pkg/controller/resourcequota/config:go_default_library",
"//pkg/controller/service/config:go_default_library",
"//pkg/controller/serviceaccount/config:go_default_library",
"//pkg/controller/ttlafterfinished/config:go_default_library",
"//pkg/controller/volume/attachdetach/config:go_default_library",
"//pkg/controller/volume/persistentvolume/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/util/diff:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library", "//staging/src/k8s.io/apiserver/pkg/server/options:go_default_library",
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" attachdetachconfig "k8s.io/kubernetes/pkg/controller/volume/attachdetach/config"
) )
// AttachDetachControllerOptions holds the AttachDetachController options. // AttachDetachControllerOptions holds the AttachDetachController options.
type AttachDetachControllerOptions struct { type AttachDetachControllerOptions struct {
*kubectrlmgrconfig.AttachDetachControllerConfiguration *attachdetachconfig.AttachDetachControllerConfiguration
} }
// AddFlags adds flags related to AttachDetachController for controller manager to the specified FlagSet. // AddFlags adds flags related to AttachDetachController for controller manager to the specified FlagSet.
...@@ -38,7 +38,7 @@ func (o *AttachDetachControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -38,7 +38,7 @@ func (o *AttachDetachControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up AttachDetachController config with options. // ApplyTo fills up AttachDetachController config with options.
func (o *AttachDetachControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.AttachDetachControllerConfiguration) error { func (o *AttachDetachControllerOptions) ApplyTo(cfg *attachdetachconfig.AttachDetachControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,7 +19,7 @@ package options ...@@ -19,7 +19,7 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
) )
const ( const (
...@@ -34,7 +34,7 @@ const ( ...@@ -34,7 +34,7 @@ const (
// CSRSigningControllerOptions holds the CSRSigningController options. // CSRSigningControllerOptions holds the CSRSigningController options.
type CSRSigningControllerOptions struct { type CSRSigningControllerOptions struct {
*kubectrlmgrconfig.CSRSigningControllerConfiguration *csrsigningconfig.CSRSigningControllerConfiguration
} }
// AddFlags adds flags related to CSRSigningController for controller manager to the specified FlagSet. // AddFlags adds flags related to CSRSigningController for controller manager to the specified FlagSet.
...@@ -49,7 +49,7 @@ func (o *CSRSigningControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -49,7 +49,7 @@ func (o *CSRSigningControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up CSRSigningController config with options. // ApplyTo fills up CSRSigningController config with options.
func (o *CSRSigningControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.CSRSigningControllerConfiguration) error { func (o *CSRSigningControllerOptions) ApplyTo(cfg *csrsigningconfig.CSRSigningControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" daemonconfig "k8s.io/kubernetes/pkg/controller/daemon/config"
) )
// DaemonSetControllerOptions holds the DaemonSetController options. // DaemonSetControllerOptions holds the DaemonSetController options.
type DaemonSetControllerOptions struct { type DaemonSetControllerOptions struct {
*kubectrlmgrconfig.DaemonSetControllerConfiguration *daemonconfig.DaemonSetControllerConfiguration
} }
// AddFlags adds flags related to DaemonSetController for controller manager to the specified FlagSet. // AddFlags adds flags related to DaemonSetController for controller manager to the specified FlagSet.
...@@ -35,7 +35,7 @@ func (o *DaemonSetControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -35,7 +35,7 @@ func (o *DaemonSetControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up DaemonSetController config with options. // ApplyTo fills up DaemonSetController config with options.
func (o *DaemonSetControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.DaemonSetControllerConfiguration) error { func (o *DaemonSetControllerOptions) ApplyTo(cfg *daemonconfig.DaemonSetControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config"
) )
// DeploymentControllerOptions holds the DeploymentController options. // DeploymentControllerOptions holds the DeploymentController options.
type DeploymentControllerOptions struct { type DeploymentControllerOptions struct {
*kubectrlmgrconfig.DeploymentControllerConfiguration *deploymentconfig.DeploymentControllerConfiguration
} }
// AddFlags adds flags related to DeploymentController for controller manager to the specified FlagSet. // AddFlags adds flags related to DeploymentController for controller manager to the specified FlagSet.
...@@ -38,7 +38,7 @@ func (o *DeploymentControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -38,7 +38,7 @@ func (o *DeploymentControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up DeploymentController config with options. // ApplyTo fills up DeploymentController config with options.
func (o *DeploymentControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.DeploymentControllerConfiguration) error { func (o *DeploymentControllerOptions) ApplyTo(cfg *deploymentconfig.DeploymentControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config"
) )
// EndpointControllerOptions holds the EndPointController options. // EndpointControllerOptions holds the EndPointController options.
type EndpointControllerOptions struct { type EndpointControllerOptions struct {
*kubectrlmgrconfig.EndpointControllerConfiguration *endpointconfig.EndpointControllerConfiguration
} }
// AddFlags adds flags related to EndPointController for controller manager to the specified FlagSet. // AddFlags adds flags related to EndPointController for controller manager to the specified FlagSet.
...@@ -37,7 +37,7 @@ func (o *EndpointControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -37,7 +37,7 @@ func (o *EndpointControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up EndPointController config with options. // ApplyTo fills up EndPointController config with options.
func (o *EndpointControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.EndpointControllerConfiguration) error { func (o *EndpointControllerOptions) ApplyTo(cfg *endpointconfig.EndpointControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" garbagecollectorconfig "k8s.io/kubernetes/pkg/controller/garbagecollector/config"
) )
// GarbageCollectorControllerOptions holds the GarbageCollectorController options. // GarbageCollectorControllerOptions holds the GarbageCollectorController options.
type GarbageCollectorControllerOptions struct { type GarbageCollectorControllerOptions struct {
*kubectrlmgrconfig.GarbageCollectorControllerConfiguration *garbagecollectorconfig.GarbageCollectorControllerConfiguration
} }
// AddFlags adds flags related to GarbageCollectorController for controller manager to the specified FlagSet. // AddFlags adds flags related to GarbageCollectorController for controller manager to the specified FlagSet.
...@@ -38,7 +38,7 @@ func (o *GarbageCollectorControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -38,7 +38,7 @@ func (o *GarbageCollectorControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up GarbageCollectorController config with options. // ApplyTo fills up GarbageCollectorController config with options.
func (o *GarbageCollectorControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.GarbageCollectorControllerConfiguration) error { func (o *GarbageCollectorControllerOptions) ApplyTo(cfg *garbagecollectorconfig.GarbageCollectorControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" poautosclerconfig "k8s.io/kubernetes/pkg/controller/podautoscaler/config"
) )
// HPAControllerOptions holds the HPAController options. // HPAControllerOptions holds the HPAController options.
type HPAControllerOptions struct { type HPAControllerOptions struct {
*kubectrlmgrconfig.HPAControllerConfiguration *poautosclerconfig.HPAControllerConfiguration
} }
// AddFlags adds flags related to HPAController for controller manager to the specified FlagSet. // AddFlags adds flags related to HPAController for controller manager to the specified FlagSet.
...@@ -47,7 +47,7 @@ func (o *HPAControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -47,7 +47,7 @@ func (o *HPAControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up HPAController config with options. // ApplyTo fills up HPAController config with options.
func (o *HPAControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.HPAControllerConfiguration) error { func (o *HPAControllerOptions) ApplyTo(cfg *poautosclerconfig.HPAControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" jobconfig "k8s.io/kubernetes/pkg/controller/job/config"
) )
// JobControllerOptions holds the JobController options. // JobControllerOptions holds the JobController options.
type JobControllerOptions struct { type JobControllerOptions struct {
*kubectrlmgrconfig.JobControllerConfiguration *jobconfig.JobControllerConfiguration
} }
// AddFlags adds flags related to JobController for controller manager to the specified FlagSet. // AddFlags adds flags related to JobController for controller manager to the specified FlagSet.
...@@ -35,7 +35,7 @@ func (o *JobControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -35,7 +35,7 @@ func (o *JobControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up JobController config with options. // ApplyTo fills up JobController config with options.
func (o *JobControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.JobControllerConfiguration) error { func (o *JobControllerOptions) ApplyTo(cfg *jobconfig.JobControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" namespaceconfig "k8s.io/kubernetes/pkg/controller/namespace/config"
) )
// NamespaceControllerOptions holds the NamespaceController options. // NamespaceControllerOptions holds the NamespaceController options.
type NamespaceControllerOptions struct { type NamespaceControllerOptions struct {
*kubectrlmgrconfig.NamespaceControllerConfiguration *namespaceconfig.NamespaceControllerConfiguration
} }
// AddFlags adds flags related to NamespaceController for controller manager to the specified FlagSet. // AddFlags adds flags related to NamespaceController for controller manager to the specified FlagSet.
...@@ -38,7 +38,7 @@ func (o *NamespaceControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -38,7 +38,7 @@ func (o *NamespaceControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up NamespaceController config with options. // ApplyTo fills up NamespaceController config with options.
func (o *NamespaceControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.NamespaceControllerConfiguration) error { func (o *NamespaceControllerOptions) ApplyTo(cfg *namespaceconfig.NamespaceControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" nodeipamconfig "k8s.io/kubernetes/pkg/controller/nodeipam/config"
) )
// NodeIPAMControllerOptions holds the NodeIpamController options. // NodeIPAMControllerOptions holds the NodeIpamController options.
type NodeIPAMControllerOptions struct { type NodeIPAMControllerOptions struct {
*kubectrlmgrconfig.NodeIPAMControllerConfiguration *nodeipamconfig.NodeIPAMControllerConfiguration
} }
// AddFlags adds flags related to NodeIpamController for controller manager to the specified FlagSet. // AddFlags adds flags related to NodeIpamController for controller manager to the specified FlagSet.
...@@ -38,7 +38,7 @@ func (o *NodeIPAMControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -38,7 +38,7 @@ func (o *NodeIPAMControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up NodeIpamController config with options. // ApplyTo fills up NodeIpamController config with options.
func (o *NodeIPAMControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.NodeIPAMControllerConfiguration) error { func (o *NodeIPAMControllerOptions) ApplyTo(cfg *nodeipamconfig.NodeIPAMControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" nodelifecycleconfig "k8s.io/kubernetes/pkg/controller/nodelifecycle/config"
) )
// NodeLifecycleControllerOptions holds the NodeLifecycleController options. // NodeLifecycleControllerOptions holds the NodeLifecycleController options.
type NodeLifecycleControllerOptions struct { type NodeLifecycleControllerOptions struct {
*kubectrlmgrconfig.NodeLifecycleControllerConfiguration *nodelifecycleconfig.NodeLifecycleControllerConfiguration
} }
// AddFlags adds flags related to NodeLifecycleController for controller manager to the specified FlagSet. // AddFlags adds flags related to NodeLifecycleController for controller manager to the specified FlagSet.
...@@ -48,7 +48,7 @@ func (o *NodeLifecycleControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -48,7 +48,7 @@ func (o *NodeLifecycleControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up NodeLifecycleController config with options. // ApplyTo fills up NodeLifecycleController config with options.
func (o *NodeLifecycleControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.NodeLifecycleControllerConfiguration) error { func (o *NodeLifecycleControllerOptions) ApplyTo(cfg *nodelifecycleconfig.NodeLifecycleControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -39,6 +39,7 @@ import ( ...@@ -39,6 +39,7 @@ import (
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
kubectrlmgrconfigscheme "k8s.io/kubernetes/pkg/controller/apis/config/scheme" kubectrlmgrconfigscheme "k8s.io/kubernetes/pkg/controller/apis/config/scheme"
"k8s.io/kubernetes/pkg/controller/garbagecollector" "k8s.io/kubernetes/pkg/controller/garbagecollector"
garbagecollectorconfig "k8s.io/kubernetes/pkg/controller/garbagecollector/config"
"k8s.io/kubernetes/pkg/master/ports" "k8s.io/kubernetes/pkg/master/ports"
// add the kubernetes feature gates // add the kubernetes feature gates
...@@ -177,9 +178,9 @@ func NewKubeControllerManagerOptions() (*KubeControllerManagerOptions, error) { ...@@ -177,9 +178,9 @@ func NewKubeControllerManagerOptions() (*KubeControllerManagerOptions, error) {
s.SecureServing.ServerCert.PairName = "kube-controller-manager" s.SecureServing.ServerCert.PairName = "kube-controller-manager"
s.SecureServing.BindPort = ports.KubeControllerManagerPort s.SecureServing.BindPort = ports.KubeControllerManagerPort
gcIgnoredResources := make([]kubectrlmgrconfig.GroupResource, 0, len(garbagecollector.DefaultIgnoredResources())) gcIgnoredResources := make([]garbagecollectorconfig.GroupResource, 0, len(garbagecollector.DefaultIgnoredResources()))
for r := range garbagecollector.DefaultIgnoredResources() { for r := range garbagecollector.DefaultIgnoredResources() {
gcIgnoredResources = append(gcIgnoredResources, kubectrlmgrconfig.GroupResource{Group: r.Group, Resource: r.Resource}) gcIgnoredResources = append(gcIgnoredResources, garbagecollectorconfig.GroupResource{Group: r.Group, Resource: r.Resource})
} }
s.GarbageCollectorController.GCIgnoredResources = gcIgnoredResources s.GarbageCollectorController.GCIgnoredResources = gcIgnoredResources
......
...@@ -31,6 +31,25 @@ import ( ...@@ -31,6 +31,25 @@ import (
componentbaseconfig "k8s.io/component-base/config" componentbaseconfig "k8s.io/component-base/config"
cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options" cmoptions "k8s.io/kubernetes/cmd/controller-manager/app/options"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config"
csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
daemonconfig "k8s.io/kubernetes/pkg/controller/daemon/config"
deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config"
endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config"
garbagecollectorconfig "k8s.io/kubernetes/pkg/controller/garbagecollector/config"
jobconfig "k8s.io/kubernetes/pkg/controller/job/config"
namespaceconfig "k8s.io/kubernetes/pkg/controller/namespace/config"
nodeipamconfig "k8s.io/kubernetes/pkg/controller/nodeipam/config"
nodelifecycleconfig "k8s.io/kubernetes/pkg/controller/nodelifecycle/config"
poautosclerconfig "k8s.io/kubernetes/pkg/controller/podautoscaler/config"
podgcconfig "k8s.io/kubernetes/pkg/controller/podgc/config"
replicasetconfig "k8s.io/kubernetes/pkg/controller/replicaset/config"
replicationconfig "k8s.io/kubernetes/pkg/controller/replication/config"
resourcequotaconfig "k8s.io/kubernetes/pkg/controller/resourcequota/config"
serviceconfig "k8s.io/kubernetes/pkg/controller/service/config"
serviceaccountconfig "k8s.io/kubernetes/pkg/controller/serviceaccount/config"
ttlafterfinishedconfig "k8s.io/kubernetes/pkg/controller/ttlafterfinished/config"
attachdetachconfig "k8s.io/kubernetes/pkg/controller/volume/attachdetach/config"
persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config"
) )
func TestAddFlags(t *testing.T) { func TestAddFlags(t *testing.T) {
...@@ -169,30 +188,30 @@ func TestAddFlags(t *testing.T) { ...@@ -169,30 +188,30 @@ func TestAddFlags(t *testing.T) {
}, },
}, },
ServiceController: &cmoptions.ServiceControllerOptions{ ServiceController: &cmoptions.ServiceControllerOptions{
ServiceControllerConfiguration: &kubectrlmgrconfig.ServiceControllerConfiguration{ ServiceControllerConfiguration: &serviceconfig.ServiceControllerConfiguration{
ConcurrentServiceSyncs: 2, ConcurrentServiceSyncs: 2,
}, },
}, },
AttachDetachController: &AttachDetachControllerOptions{ AttachDetachController: &AttachDetachControllerOptions{
&kubectrlmgrconfig.AttachDetachControllerConfiguration{ &attachdetachconfig.AttachDetachControllerConfiguration{
ReconcilerSyncLoopPeriod: metav1.Duration{Duration: 30 * time.Second}, ReconcilerSyncLoopPeriod: metav1.Duration{Duration: 30 * time.Second},
DisableAttachDetachReconcilerSync: true, DisableAttachDetachReconcilerSync: true,
}, },
}, },
CSRSigningController: &CSRSigningControllerOptions{ CSRSigningController: &CSRSigningControllerOptions{
&kubectrlmgrconfig.CSRSigningControllerConfiguration{ &csrsigningconfig.CSRSigningControllerConfiguration{
ClusterSigningCertFile: "/cluster-signing-cert", ClusterSigningCertFile: "/cluster-signing-cert",
ClusterSigningKeyFile: "/cluster-signing-key", ClusterSigningKeyFile: "/cluster-signing-key",
ClusterSigningDuration: metav1.Duration{Duration: 10 * time.Hour}, ClusterSigningDuration: metav1.Duration{Duration: 10 * time.Hour},
}, },
}, },
DaemonSetController: &DaemonSetControllerOptions{ DaemonSetController: &DaemonSetControllerOptions{
&kubectrlmgrconfig.DaemonSetControllerConfiguration{ &daemonconfig.DaemonSetControllerConfiguration{
ConcurrentDaemonSetSyncs: 2, ConcurrentDaemonSetSyncs: 2,
}, },
}, },
DeploymentController: &DeploymentControllerOptions{ DeploymentController: &DeploymentControllerOptions{
&kubectrlmgrconfig.DeploymentControllerConfiguration{ &deploymentconfig.DeploymentControllerConfiguration{
ConcurrentDeploymentSyncs: 10, ConcurrentDeploymentSyncs: 10,
DeploymentControllerSyncPeriod: metav1.Duration{Duration: 45 * time.Second}, DeploymentControllerSyncPeriod: metav1.Duration{Duration: 45 * time.Second},
}, },
...@@ -204,21 +223,21 @@ func TestAddFlags(t *testing.T) { ...@@ -204,21 +223,21 @@ func TestAddFlags(t *testing.T) {
}, },
}, },
EndpointController: &EndpointControllerOptions{ EndpointController: &EndpointControllerOptions{
&kubectrlmgrconfig.EndpointControllerConfiguration{ &endpointconfig.EndpointControllerConfiguration{
ConcurrentEndpointSyncs: 10, ConcurrentEndpointSyncs: 10,
}, },
}, },
GarbageCollectorController: &GarbageCollectorControllerOptions{ GarbageCollectorController: &GarbageCollectorControllerOptions{
&kubectrlmgrconfig.GarbageCollectorControllerConfiguration{ &garbagecollectorconfig.GarbageCollectorControllerConfiguration{
ConcurrentGCSyncs: 30, ConcurrentGCSyncs: 30,
GCIgnoredResources: []kubectrlmgrconfig.GroupResource{ GCIgnoredResources: []garbagecollectorconfig.GroupResource{
{Group: "", Resource: "events"}, {Group: "", Resource: "events"},
}, },
EnableGarbageCollector: false, EnableGarbageCollector: false,
}, },
}, },
HPAController: &HPAControllerOptions{ HPAController: &HPAControllerOptions{
&kubectrlmgrconfig.HPAControllerConfiguration{ &poautosclerconfig.HPAControllerConfiguration{
HorizontalPodAutoscalerSyncPeriod: metav1.Duration{Duration: 45 * time.Second}, HorizontalPodAutoscalerSyncPeriod: metav1.Duration{Duration: 45 * time.Second},
HorizontalPodAutoscalerUpscaleForbiddenWindow: metav1.Duration{Duration: 1 * time.Minute}, HorizontalPodAutoscalerUpscaleForbiddenWindow: metav1.Duration{Duration: 1 * time.Minute},
HorizontalPodAutoscalerDownscaleForbiddenWindow: metav1.Duration{Duration: 2 * time.Minute}, HorizontalPodAutoscalerDownscaleForbiddenWindow: metav1.Duration{Duration: 2 * time.Minute},
...@@ -230,23 +249,23 @@ func TestAddFlags(t *testing.T) { ...@@ -230,23 +249,23 @@ func TestAddFlags(t *testing.T) {
}, },
}, },
JobController: &JobControllerOptions{ JobController: &JobControllerOptions{
&kubectrlmgrconfig.JobControllerConfiguration{ &jobconfig.JobControllerConfiguration{
ConcurrentJobSyncs: 5, ConcurrentJobSyncs: 5,
}, },
}, },
NamespaceController: &NamespaceControllerOptions{ NamespaceController: &NamespaceControllerOptions{
&kubectrlmgrconfig.NamespaceControllerConfiguration{ &namespaceconfig.NamespaceControllerConfiguration{
NamespaceSyncPeriod: metav1.Duration{Duration: 10 * time.Minute}, NamespaceSyncPeriod: metav1.Duration{Duration: 10 * time.Minute},
ConcurrentNamespaceSyncs: 20, ConcurrentNamespaceSyncs: 20,
}, },
}, },
NodeIPAMController: &NodeIPAMControllerOptions{ NodeIPAMController: &NodeIPAMControllerOptions{
&kubectrlmgrconfig.NodeIPAMControllerConfiguration{ &nodeipamconfig.NodeIPAMControllerConfiguration{
NodeCIDRMaskSize: 48, NodeCIDRMaskSize: 48,
}, },
}, },
NodeLifecycleController: &NodeLifecycleControllerOptions{ NodeLifecycleController: &NodeLifecycleControllerOptions{
&kubectrlmgrconfig.NodeLifecycleControllerConfiguration{ &nodelifecycleconfig.NodeLifecycleControllerConfiguration{
EnableTaintManager: false, EnableTaintManager: false,
NodeEvictionRate: 0.2, NodeEvictionRate: 0.2,
SecondaryNodeEvictionRate: 0.05, SecondaryNodeEvictionRate: 0.05,
...@@ -258,13 +277,13 @@ func TestAddFlags(t *testing.T) { ...@@ -258,13 +277,13 @@ func TestAddFlags(t *testing.T) {
}, },
}, },
PersistentVolumeBinderController: &PersistentVolumeBinderControllerOptions{ PersistentVolumeBinderController: &PersistentVolumeBinderControllerOptions{
&kubectrlmgrconfig.PersistentVolumeBinderControllerConfiguration{ &persistentvolumeconfig.PersistentVolumeBinderControllerConfiguration{
PVClaimBinderSyncPeriod: metav1.Duration{Duration: 30 * time.Second}, PVClaimBinderSyncPeriod: metav1.Duration{Duration: 30 * time.Second},
VolumeConfiguration: kubectrlmgrconfig.VolumeConfiguration{ VolumeConfiguration: persistentvolumeconfig.VolumeConfiguration{
EnableDynamicProvisioning: false, EnableDynamicProvisioning: false,
EnableHostPathProvisioning: true, EnableHostPathProvisioning: true,
FlexVolumePluginDir: "/flex-volume-plugin", FlexVolumePluginDir: "/flex-volume-plugin",
PersistentVolumeRecyclerConfiguration: kubectrlmgrconfig.PersistentVolumeRecyclerConfiguration{ PersistentVolumeRecyclerConfiguration: persistentvolumeconfig.PersistentVolumeRecyclerConfiguration{
MaximumRetry: 3, MaximumRetry: 3,
MinimumTimeoutNFS: 200, MinimumTimeoutNFS: 200,
IncrementTimeoutNFS: 45, IncrementTimeoutNFS: 45,
...@@ -275,34 +294,34 @@ func TestAddFlags(t *testing.T) { ...@@ -275,34 +294,34 @@ func TestAddFlags(t *testing.T) {
}, },
}, },
PodGCController: &PodGCControllerOptions{ PodGCController: &PodGCControllerOptions{
&kubectrlmgrconfig.PodGCControllerConfiguration{ &podgcconfig.PodGCControllerConfiguration{
TerminatedPodGCThreshold: 12000, TerminatedPodGCThreshold: 12000,
}, },
}, },
ReplicaSetController: &ReplicaSetControllerOptions{ ReplicaSetController: &ReplicaSetControllerOptions{
&kubectrlmgrconfig.ReplicaSetControllerConfiguration{ &replicasetconfig.ReplicaSetControllerConfiguration{
ConcurrentRSSyncs: 10, ConcurrentRSSyncs: 10,
}, },
}, },
ReplicationController: &ReplicationControllerOptions{ ReplicationController: &ReplicationControllerOptions{
&kubectrlmgrconfig.ReplicationControllerConfiguration{ &replicationconfig.ReplicationControllerConfiguration{
ConcurrentRCSyncs: 10, ConcurrentRCSyncs: 10,
}, },
}, },
ResourceQuotaController: &ResourceQuotaControllerOptions{ ResourceQuotaController: &ResourceQuotaControllerOptions{
&kubectrlmgrconfig.ResourceQuotaControllerConfiguration{ &resourcequotaconfig.ResourceQuotaControllerConfiguration{
ResourceQuotaSyncPeriod: metav1.Duration{Duration: 10 * time.Minute}, ResourceQuotaSyncPeriod: metav1.Duration{Duration: 10 * time.Minute},
ConcurrentResourceQuotaSyncs: 10, ConcurrentResourceQuotaSyncs: 10,
}, },
}, },
SAController: &SAControllerOptions{ SAController: &SAControllerOptions{
&kubectrlmgrconfig.SAControllerConfiguration{ &serviceaccountconfig.SAControllerConfiguration{
ServiceAccountKeyFile: "/service-account-private-key", ServiceAccountKeyFile: "/service-account-private-key",
ConcurrentSATokenSyncs: 10, ConcurrentSATokenSyncs: 10,
}, },
}, },
TTLAfterFinishedController: &TTLAfterFinishedControllerOptions{ TTLAfterFinishedController: &TTLAfterFinishedControllerOptions{
&kubectrlmgrconfig.TTLAfterFinishedControllerConfiguration{ &ttlafterfinishedconfig.TTLAfterFinishedControllerConfiguration{
ConcurrentTTLSyncs: 8, ConcurrentTTLSyncs: 8,
}, },
}, },
...@@ -349,7 +368,7 @@ func TestAddFlags(t *testing.T) { ...@@ -349,7 +368,7 @@ func TestAddFlags(t *testing.T) {
} }
} }
type sortedGCIgnoredResources []kubectrlmgrconfig.GroupResource type sortedGCIgnoredResources []garbagecollectorconfig.GroupResource
func (r sortedGCIgnoredResources) Len() int { func (r sortedGCIgnoredResources) Len() int {
return len(r) return len(r)
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config"
) )
// PersistentVolumeBinderControllerOptions holds the PersistentVolumeBinderController options. // PersistentVolumeBinderControllerOptions holds the PersistentVolumeBinderController options.
type PersistentVolumeBinderControllerOptions struct { type PersistentVolumeBinderControllerOptions struct {
*kubectrlmgrconfig.PersistentVolumeBinderControllerConfiguration *persistentvolumeconfig.PersistentVolumeBinderControllerConfiguration
} }
// AddFlags adds flags related to PersistentVolumeBinderController for controller manager to the specified FlagSet. // AddFlags adds flags related to PersistentVolumeBinderController for controller manager to the specified FlagSet.
...@@ -46,7 +46,7 @@ func (o *PersistentVolumeBinderControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -46,7 +46,7 @@ func (o *PersistentVolumeBinderControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up PersistentVolumeBinderController config with options. // ApplyTo fills up PersistentVolumeBinderController config with options.
func (o *PersistentVolumeBinderControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.PersistentVolumeBinderControllerConfiguration) error { func (o *PersistentVolumeBinderControllerOptions) ApplyTo(cfg *persistentvolumeconfig.PersistentVolumeBinderControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" podgcconfig "k8s.io/kubernetes/pkg/controller/podgc/config"
) )
// PodGCControllerOptions holds the PodGCController options. // PodGCControllerOptions holds the PodGCController options.
type PodGCControllerOptions struct { type PodGCControllerOptions struct {
*kubectrlmgrconfig.PodGCControllerConfiguration *podgcconfig.PodGCControllerConfiguration
} }
// AddFlags adds flags related to PodGCController for controller manager to the specified FlagSet. // AddFlags adds flags related to PodGCController for controller manager to the specified FlagSet.
...@@ -37,7 +37,7 @@ func (o *PodGCControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -37,7 +37,7 @@ func (o *PodGCControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up PodGCController config with options. // ApplyTo fills up PodGCController config with options.
func (o *PodGCControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.PodGCControllerConfiguration) error { func (o *PodGCControllerOptions) ApplyTo(cfg *podgcconfig.PodGCControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" replicasetconfig "k8s.io/kubernetes/pkg/controller/replicaset/config"
) )
// ReplicaSetControllerOptions holds the ReplicaSetController options. // ReplicaSetControllerOptions holds the ReplicaSetController options.
type ReplicaSetControllerOptions struct { type ReplicaSetControllerOptions struct {
*kubectrlmgrconfig.ReplicaSetControllerConfiguration *replicasetconfig.ReplicaSetControllerConfiguration
} }
// AddFlags adds flags related to ReplicaSetController for controller manager to the specified FlagSet. // AddFlags adds flags related to ReplicaSetController for controller manager to the specified FlagSet.
...@@ -37,7 +37,7 @@ func (o *ReplicaSetControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -37,7 +37,7 @@ func (o *ReplicaSetControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up ReplicaSetController config with options. // ApplyTo fills up ReplicaSetController config with options.
func (o *ReplicaSetControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.ReplicaSetControllerConfiguration) error { func (o *ReplicaSetControllerOptions) ApplyTo(cfg *replicasetconfig.ReplicaSetControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" replicationconfig "k8s.io/kubernetes/pkg/controller/replication/config"
) )
// ReplicationControllerOptions holds the ReplicationController options. // ReplicationControllerOptions holds the ReplicationController options.
type ReplicationControllerOptions struct { type ReplicationControllerOptions struct {
*kubectrlmgrconfig.ReplicationControllerConfiguration *replicationconfig.ReplicationControllerConfiguration
} }
// AddFlags adds flags related to ReplicationController for controller manager to the specified FlagSet. // AddFlags adds flags related to ReplicationController for controller manager to the specified FlagSet.
...@@ -37,7 +37,7 @@ func (o *ReplicationControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -37,7 +37,7 @@ func (o *ReplicationControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up ReplicationController config with options. // ApplyTo fills up ReplicationController config with options.
func (o *ReplicationControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.ReplicationControllerConfiguration) error { func (o *ReplicationControllerOptions) ApplyTo(cfg *replicationconfig.ReplicationControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" resourcequotaconfig "k8s.io/kubernetes/pkg/controller/resourcequota/config"
) )
// ResourceQuotaControllerOptions holds the ResourceQuotaController options. // ResourceQuotaControllerOptions holds the ResourceQuotaController options.
type ResourceQuotaControllerOptions struct { type ResourceQuotaControllerOptions struct {
*kubectrlmgrconfig.ResourceQuotaControllerConfiguration *resourcequotaconfig.ResourceQuotaControllerConfiguration
} }
// AddFlags adds flags related to ResourceQuotaController for controller manager to the specified FlagSet. // AddFlags adds flags related to ResourceQuotaController for controller manager to the specified FlagSet.
...@@ -38,7 +38,7 @@ func (o *ResourceQuotaControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -38,7 +38,7 @@ func (o *ResourceQuotaControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up ResourceQuotaController config with options. // ApplyTo fills up ResourceQuotaController config with options.
func (o *ResourceQuotaControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.ResourceQuotaControllerConfiguration) error { func (o *ResourceQuotaControllerOptions) ApplyTo(cfg *resourcequotaconfig.ResourceQuotaControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" serviceaccountconfig "k8s.io/kubernetes/pkg/controller/serviceaccount/config"
) )
// SAControllerOptions holds the ServiceAccountController options. // SAControllerOptions holds the ServiceAccountController options.
type SAControllerOptions struct { type SAControllerOptions struct {
*kubectrlmgrconfig.SAControllerConfiguration *serviceaccountconfig.SAControllerConfiguration
} }
// AddFlags adds flags related to ServiceAccountController for controller manager to the specified FlagSet // AddFlags adds flags related to ServiceAccountController for controller manager to the specified FlagSet
...@@ -39,7 +39,7 @@ func (o *SAControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -39,7 +39,7 @@ func (o *SAControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up ServiceAccountController config with options. // ApplyTo fills up ServiceAccountController config with options.
func (o *SAControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.SAControllerConfiguration) error { func (o *SAControllerOptions) ApplyTo(cfg *serviceaccountconfig.SAControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -19,12 +19,12 @@ package options ...@@ -19,12 +19,12 @@ package options
import ( import (
"github.com/spf13/pflag" "github.com/spf13/pflag"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" ttlafterfinishedconfig "k8s.io/kubernetes/pkg/controller/ttlafterfinished/config"
) )
// TTLAfterFinishedControllerOptions holds the TTLAfterFinishedController options. // TTLAfterFinishedControllerOptions holds the TTLAfterFinishedController options.
type TTLAfterFinishedControllerOptions struct { type TTLAfterFinishedControllerOptions struct {
*kubectrlmgrconfig.TTLAfterFinishedControllerConfiguration *ttlafterfinishedconfig.TTLAfterFinishedControllerConfiguration
} }
// AddFlags adds flags related to TTLAfterFinishedController for controller manager to the specified FlagSet. // AddFlags adds flags related to TTLAfterFinishedController for controller manager to the specified FlagSet.
...@@ -37,7 +37,7 @@ func (o *TTLAfterFinishedControllerOptions) AddFlags(fs *pflag.FlagSet) { ...@@ -37,7 +37,7 @@ func (o *TTLAfterFinishedControllerOptions) AddFlags(fs *pflag.FlagSet) {
} }
// ApplyTo fills up TTLAfterFinishedController config with options. // ApplyTo fills up TTLAfterFinishedController config with options.
func (o *TTLAfterFinishedControllerOptions) ApplyTo(cfg *kubectrlmgrconfig.TTLAfterFinishedControllerConfiguration) error { func (o *TTLAfterFinishedControllerOptions) ApplyTo(cfg *ttlafterfinishedconfig.TTLAfterFinishedControllerConfiguration) error {
if o == nil { if o == nil {
return nil return nil
} }
......
...@@ -54,7 +54,7 @@ import ( ...@@ -54,7 +54,7 @@ import (
"k8s.io/kubernetes/pkg/volume/vsphere_volume" "k8s.io/kubernetes/pkg/volume/vsphere_volume"
utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature"
kubectrlmgrconfig "k8s.io/kubernetes/pkg/controller/apis/config" persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config"
"k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/features"
"k8s.io/utils/exec" "k8s.io/utils/exec"
) )
...@@ -87,12 +87,12 @@ func ProbeAttachableVolumePlugins() []volume.VolumePlugin { ...@@ -87,12 +87,12 @@ func ProbeAttachableVolumePlugins() []volume.VolumePlugin {
// GetDynamicPluginProber gets the probers of dynamically discoverable plugins // GetDynamicPluginProber gets the probers of dynamically discoverable plugins
// for the attach/detach controller. // for the attach/detach controller.
// Currently only Flexvolume plugins are dynamically discoverable. // Currently only Flexvolume plugins are dynamically discoverable.
func GetDynamicPluginProber(config kubectrlmgrconfig.VolumeConfiguration) volume.DynamicPluginProber { func GetDynamicPluginProber(config persistentvolumeconfig.VolumeConfiguration) volume.DynamicPluginProber {
return flexvolume.GetDynamicPluginProber(config.FlexVolumePluginDir, exec.New() /*exec.Interface*/) return flexvolume.GetDynamicPluginProber(config.FlexVolumePluginDir, exec.New() /*exec.Interface*/)
} }
// ProbeExpandableVolumePlugins returns volume plugins which are expandable // ProbeExpandableVolumePlugins returns volume plugins which are expandable
func ProbeExpandableVolumePlugins(config kubectrlmgrconfig.VolumeConfiguration) []volume.VolumePlugin { func ProbeExpandableVolumePlugins(config persistentvolumeconfig.VolumeConfiguration) []volume.VolumePlugin {
allPlugins := []volume.VolumePlugin{} allPlugins := []volume.VolumePlugin{}
allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...) allPlugins = append(allPlugins, awsebs.ProbeVolumePlugins()...)
...@@ -114,7 +114,7 @@ func ProbeExpandableVolumePlugins(config kubectrlmgrconfig.VolumeConfiguration) ...@@ -114,7 +114,7 @@ func ProbeExpandableVolumePlugins(config kubectrlmgrconfig.VolumeConfiguration)
// ProbeControllerVolumePlugins collects all persistent volume plugins into an // ProbeControllerVolumePlugins collects all persistent volume plugins into an
// easy to use list. Only volume plugins that implement any of // easy to use list. Only volume plugins that implement any of
// provisioner/recycler/deleter interface should be returned. // provisioner/recycler/deleter interface should be returned.
func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config kubectrlmgrconfig.VolumeConfiguration) []volume.VolumePlugin { func ProbeControllerVolumePlugins(cloud cloudprovider.Interface, config persistentvolumeconfig.VolumeConfiguration) []volume.VolumePlugin {
allPlugins := []volume.VolumePlugin{} allPlugins := []volume.VolumePlugin{}
// The list of plugins to probe is decided by this binary, not // The list of plugins to probe is decided by this binary, not
......
...@@ -78,34 +78,53 @@ pkg/controller/bootstrap ...@@ -78,34 +78,53 @@ pkg/controller/bootstrap
pkg/controller/certificates pkg/controller/certificates
pkg/controller/certificates/approver pkg/controller/certificates/approver
pkg/controller/certificates/signer pkg/controller/certificates/signer
pkg/controller/certificates/signer/config/v1alpha1
pkg/controller/cloud pkg/controller/cloud
pkg/controller/clusterroleaggregation pkg/controller/clusterroleaggregation
pkg/controller/cronjob pkg/controller/cronjob
pkg/controller/daemon pkg/controller/daemon
pkg/controller/daemon/config/v1alpha1
pkg/controller/deployment pkg/controller/deployment
pkg/controller/deployment/config/v1alpha1
pkg/controller/disruption pkg/controller/disruption
pkg/controller/endpoint pkg/controller/endpoint
pkg/controller/endpoint/config/v1alpha1
pkg/controller/garbagecollector pkg/controller/garbagecollector
pkg/controller/garbagecollector/config/v1alpha1
pkg/controller/job pkg/controller/job
pkg/controller/job/config/v1alpha1
pkg/controller/namespace pkg/controller/namespace
pkg/controller/namespace/config/v1alpha1
pkg/controller/namespace/deletion pkg/controller/namespace/deletion
pkg/controller/nodeipam/config/v1alpha1
pkg/controller/nodelifecycle/config/v1alpha1
pkg/controller/podautoscaler pkg/controller/podautoscaler
pkg/controller/podautoscaler/config/v1alpha1
pkg/controller/podautoscaler/metrics pkg/controller/podautoscaler/metrics
pkg/controller/podgc pkg/controller/podgc
pkg/controller/podgc/config/v1alpha1
pkg/controller/replicaset pkg/controller/replicaset
pkg/controller/replicaset/config/v1alpha1
pkg/controller/replication pkg/controller/replication
pkg/controller/replication/config/v1alpha1
pkg/controller/resourcequota pkg/controller/resourcequota
pkg/controller/resourcequota/config/v1alpha1
pkg/controller/route pkg/controller/route
pkg/controller/service pkg/controller/service
pkg/controller/service/config/v1alpha1
pkg/controller/serviceaccount pkg/controller/serviceaccount
pkg/controller/serviceaccount/config/v1alpha1
pkg/controller/statefulset pkg/controller/statefulset
pkg/controller/ttl pkg/controller/ttl
pkg/controller/ttlafterfinished/config/v1alpha1
pkg/controller/volume/attachdetach pkg/controller/volume/attachdetach
pkg/controller/volume/attachdetach/config/v1alpha1
pkg/controller/volume/attachdetach/statusupdater pkg/controller/volume/attachdetach/statusupdater
pkg/controller/volume/attachdetach/testing pkg/controller/volume/attachdetach/testing
pkg/controller/volume/events pkg/controller/volume/events
pkg/controller/volume/expand pkg/controller/volume/expand
pkg/controller/volume/persistentvolume pkg/controller/volume/persistentvolume
pkg/controller/volume/persistentvolume/config/v1alpha1
pkg/controller/volume/persistentvolume/options pkg/controller/volume/persistentvolume/options
pkg/credentialprovider pkg/credentialprovider
pkg/credentialprovider/gcp pkg/credentialprovider/gcp
......
...@@ -11,6 +11,25 @@ go_library( ...@@ -11,6 +11,25 @@ go_library(
importpath = "k8s.io/kubernetes/pkg/controller/apis/config", importpath = "k8s.io/kubernetes/pkg/controller/apis/config",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//pkg/controller/certificates/signer/config:go_default_library",
"//pkg/controller/daemon/config:go_default_library",
"//pkg/controller/deployment/config:go_default_library",
"//pkg/controller/endpoint/config:go_default_library",
"//pkg/controller/garbagecollector/config:go_default_library",
"//pkg/controller/job/config:go_default_library",
"//pkg/controller/namespace/config:go_default_library",
"//pkg/controller/nodeipam/config:go_default_library",
"//pkg/controller/nodelifecycle/config:go_default_library",
"//pkg/controller/podautoscaler/config:go_default_library",
"//pkg/controller/podgc/config:go_default_library",
"//pkg/controller/replicaset/config:go_default_library",
"//pkg/controller/replication/config:go_default_library",
"//pkg/controller/resourcequota/config:go_default_library",
"//pkg/controller/service/config:go_default_library",
"//pkg/controller/serviceaccount/config:go_default_library",
"//pkg/controller/ttlafterfinished/config:go_default_library",
"//pkg/controller/volume/attachdetach/config:go_default_library",
"//pkg/controller/volume/persistentvolume/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
......
...@@ -15,6 +15,25 @@ go_library( ...@@ -15,6 +15,25 @@ go_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//pkg/controller/apis/config:go_default_library", "//pkg/controller/apis/config:go_default_library",
"//pkg/controller/certificates/signer/config/v1alpha1:go_default_library",
"//pkg/controller/daemon/config/v1alpha1:go_default_library",
"//pkg/controller/deployment/config/v1alpha1:go_default_library",
"//pkg/controller/endpoint/config/v1alpha1:go_default_library",
"//pkg/controller/garbagecollector/config/v1alpha1:go_default_library",
"//pkg/controller/job/config/v1alpha1:go_default_library",
"//pkg/controller/namespace/config/v1alpha1:go_default_library",
"//pkg/controller/nodeipam/config/v1alpha1:go_default_library",
"//pkg/controller/nodelifecycle/config/v1alpha1:go_default_library",
"//pkg/controller/podautoscaler/config/v1alpha1:go_default_library",
"//pkg/controller/podgc/config/v1alpha1:go_default_library",
"//pkg/controller/replicaset/config/v1alpha1:go_default_library",
"//pkg/controller/replication/config/v1alpha1:go_default_library",
"//pkg/controller/resourcequota/config/v1alpha1:go_default_library",
"//pkg/controller/service/config/v1alpha1:go_default_library",
"//pkg/controller/serviceaccount/config/v1alpha1:go_default_library",
"//pkg/controller/ttlafterfinished/config/v1alpha1:go_default_library",
"//pkg/controller/volume/attachdetach/config/v1alpha1:go_default_library",
"//pkg/controller/volume/persistentvolume/config/v1alpha1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library", "//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
......
...@@ -48,13 +48,3 @@ func Convert_v1alpha1_KubeCloudSharedConfiguration_To_config_KubeCloudSharedConf ...@@ -48,13 +48,3 @@ func Convert_v1alpha1_KubeCloudSharedConfiguration_To_config_KubeCloudSharedConf
func Convert_config_KubeCloudSharedConfiguration_To_v1alpha1_KubeCloudSharedConfiguration(in *config.KubeCloudSharedConfiguration, out *v1alpha1.KubeCloudSharedConfiguration, s conversion.Scope) error { func Convert_config_KubeCloudSharedConfiguration_To_v1alpha1_KubeCloudSharedConfiguration(in *config.KubeCloudSharedConfiguration, out *v1alpha1.KubeCloudSharedConfiguration, s conversion.Scope) error {
return autoConvert_config_KubeCloudSharedConfiguration_To_v1alpha1_KubeCloudSharedConfiguration(in, out, s) return autoConvert_config_KubeCloudSharedConfiguration_To_v1alpha1_KubeCloudSharedConfiguration(in, out, s)
} }
// Convert_v1alpha1_ServiceControllerConfiguration_To_config_ServiceControllerConfiguration is an autogenerated conversion function.
func Convert_v1alpha1_ServiceControllerConfiguration_To_config_ServiceControllerConfiguration(in *v1alpha1.ServiceControllerConfiguration, out *config.ServiceControllerConfiguration, s conversion.Scope) error {
return autoConvert_v1alpha1_ServiceControllerConfiguration_To_config_ServiceControllerConfiguration(in, out, s)
}
// Convert_config_ServiceControllerConfiguration_To_v1alpha1_ServiceControllerConfiguration is an autogenerated conversion function.
func Convert_config_ServiceControllerConfiguration_To_v1alpha1_ServiceControllerConfiguration(in *config.ServiceControllerConfiguration, out *v1alpha1.ServiceControllerConfiguration, s conversion.Scope) error {
return autoConvert_config_ServiceControllerConfiguration_To_v1alpha1_ServiceControllerConfiguration(in, out, s)
}
...@@ -16,6 +16,26 @@ limitations under the License. ...@@ -16,6 +16,26 @@ limitations under the License.
// +k8s:deepcopy-gen=package // +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/apis/config // +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/apis/config
// +k8s:conversion-gen=k8s.io/component-base/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/garbagecollector/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/job/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/namespace/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/nodeipam/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/nodelifecycle/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/podautoscaler/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/podgc/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/replicaset/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/replication/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/resourcequota/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/service/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/serviceaccount/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/ttlafterfinished/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/volume/attachdetach/config/v1alpha1
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config/v1alpha1
// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1 // +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1
// +k8s:defaulter-gen=TypeMeta // +k8s:defaulter-gen=TypeMeta
// +k8s:defaulter-gen-input=../../../../../vendor/k8s.io/kube-controller-manager/config/v1alpha1 // +k8s:defaulter-gen-input=../../../../../vendor/k8s.io/kube-controller-manager/config/v1alpha1
......
...@@ -38,20 +38,4 @@ func RegisterDefaults(scheme *runtime.Scheme) error { ...@@ -38,20 +38,4 @@ func RegisterDefaults(scheme *runtime.Scheme) error {
func SetObjectDefaults_KubeControllerManagerConfiguration(in *v1alpha1.KubeControllerManagerConfiguration) { func SetObjectDefaults_KubeControllerManagerConfiguration(in *v1alpha1.KubeControllerManagerConfiguration) {
SetDefaults_KubeControllerManagerConfiguration(in) SetDefaults_KubeControllerManagerConfiguration(in)
SetDefaults_KubeCloudSharedConfiguration(&in.KubeCloudShared) SetDefaults_KubeCloudSharedConfiguration(&in.KubeCloudShared)
SetDefaults_CSRSigningControllerConfiguration(&in.CSRSigningController)
SetDefaults_DaemonSetControllerConfiguration(&in.DaemonSetController)
SetDefaults_DeploymentControllerConfiguration(&in.DeploymentController)
SetDefaults_EndpointControllerConfiguration(&in.EndpointController)
SetDefaults_GarbageCollectorControllerConfiguration(&in.GarbageCollectorController)
SetDefaults_HPAControllerConfiguration(&in.HPAController)
SetDefaults_JobControllerConfiguration(&in.JobController)
SetDefaults_NamespaceControllerConfiguration(&in.NamespaceController)
SetDefaults_NodeLifecycleControllerConfiguration(&in.NodeLifecycleController)
SetDefaults_VolumeConfiguration(&in.PersistentVolumeBinderController.VolumeConfiguration)
SetDefaults_PersistentVolumeRecyclerConfiguration(&in.PersistentVolumeBinderController.VolumeConfiguration.PersistentVolumeRecyclerConfiguration)
SetDefaults_PodGCControllerConfiguration(&in.PodGCController)
SetDefaults_ReplicaSetControllerConfiguration(&in.ReplicaSetController)
SetDefaults_ReplicationControllerConfiguration(&in.ReplicationController)
SetDefaults_ResourceQuotaControllerConfiguration(&in.ResourceQuotaController)
SetDefaults_ServiceControllerConfiguration(&in.ServiceController)
} }
...@@ -46,6 +46,9 @@ filegroup( ...@@ -46,6 +46,9 @@ filegroup(
filegroup( filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [
":package-srcs",
"//pkg/controller/certificates/signer/config:all-srcs",
],
tags = ["automanaged"], tags = ["automanaged"],
) )
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"types.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/certificates/signer/config",
visibility = ["//visibility:public"],
deps = ["//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/controller/certificates/signer/config/v1alpha1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
package config // import "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// CSRSigningControllerConfiguration contains elements describing CSRSigningController.
type CSRSigningControllerConfiguration struct {
// clusterSigningCertFile is the filename containing a PEM-encoded
// X509 CA certificate used to issue cluster-scoped certificates
ClusterSigningCertFile string
// clusterSigningCertFile is the filename containing a PEM-encoded
// RSA or ECDSA private key used to issue cluster-scoped certificates
ClusterSigningKeyFile string
// clusterSigningDuration is the length of duration signed certificates
// will be given.
ClusterSigningDuration metav1.Duration
}
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//pkg/controller/certificates/signer/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/kube-controller-manager/config/v1alpha1"
csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
)
// Important! The public back-and-forth conversion functions for the types in this package
// with CSRSigningControllerConfiguration types need to be manually exposed like this in order for
// other packages that reference this package to be able to call these conversion functions
// in an autogenerated manner.
// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions
// in autogenerated code as well.
// Convert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration is an autogenerated conversion function.
func Convert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration(in *v1alpha1.CSRSigningControllerConfiguration, out *csrsigningconfig.CSRSigningControllerConfiguration, s conversion.Scope) error {
return autoConvert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration(in, out, s)
}
// Convert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration is an autogenerated conversion function.
func Convert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration(in *csrsigningconfig.CSRSigningControllerConfiguration, out *v1alpha1.CSRSigningControllerConfiguration, s conversion.Scope) error {
return autoConvert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration(in, out, s)
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
)
// RecommendedDefaultCSRSigningControllerConfiguration defaults a pointer to a
// CSRSigningControllerConfiguration struct. This will set the recommended default
// values, but they may be subject to change between API versions. This function
// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo`
// function to allow consumers of this type to set whatever defaults for their
// embedded configs. Forcing consumers to use these defaults would be problematic
// as defaulting in the scheme is done as part of the conversion, and there would
// be no easy way to opt-out. Instead, if you want to use this defaulting method
// run it in your wrapper struct of this type in its `SetDefaults_` method.
func RecommendedDefaultCSRSigningControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.CSRSigningControllerConfiguration) {
zero := metav1.Duration{}
if obj.ClusterSigningCertFile == "" {
obj.ClusterSigningCertFile = "/etc/kubernetes/ca/ca.pem"
}
if obj.ClusterSigningKeyFile == "" {
obj.ClusterSigningKeyFile = "/etc/kubernetes/ca/ca.key"
}
if obj.ClusterSigningDuration == zero {
obj.ClusterSigningDuration = metav1.Duration{Duration: 365 * 24 * time.Hour}
}
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/certificates/signer/config
// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1
package v1alpha1 // import "k8s.io/kubernetes/pkg/controller/certificates/signer/config/v1alpha1"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime"
)
var (
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
SchemeBuilder runtime.SchemeBuilder
// localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package,
// defaulting and conversion init funcs are registered as well.
localSchemeBuilder = &SchemeBuilder
// AddToScheme is a global function that registers this API group & version to a scheme
AddToScheme = localSchemeBuilder.AddToScheme
)
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by conversion-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
config "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha1.CSRSigningControllerConfiguration)(nil), (*config.CSRSigningControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration(a.(*v1alpha1.CSRSigningControllerConfiguration), b.(*config.CSRSigningControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*config.CSRSigningControllerConfiguration)(nil), (*v1alpha1.CSRSigningControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration(a.(*config.CSRSigningControllerConfiguration), b.(*v1alpha1.CSRSigningControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.GroupResource)(nil), (*v1alpha1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_GroupResource_To_v1alpha1_GroupResource(a.(*v1.GroupResource), b.(*v1alpha1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*config.CSRSigningControllerConfiguration)(nil), (*v1alpha1.CSRSigningControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration(a.(*config.CSRSigningControllerConfiguration), b.(*v1alpha1.CSRSigningControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*v1alpha1.CSRSigningControllerConfiguration)(nil), (*config.CSRSigningControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration(a.(*v1alpha1.CSRSigningControllerConfiguration), b.(*config.CSRSigningControllerConfiguration), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_CSRSigningControllerConfiguration_To_config_CSRSigningControllerConfiguration(in *v1alpha1.CSRSigningControllerConfiguration, out *config.CSRSigningControllerConfiguration, s conversion.Scope) error {
out.ClusterSigningCertFile = in.ClusterSigningCertFile
out.ClusterSigningKeyFile = in.ClusterSigningKeyFile
out.ClusterSigningDuration = in.ClusterSigningDuration
return nil
}
func autoConvert_config_CSRSigningControllerConfiguration_To_v1alpha1_CSRSigningControllerConfiguration(in *config.CSRSigningControllerConfiguration, out *v1alpha1.CSRSigningControllerConfiguration, s conversion.Scope) error {
out.ClusterSigningCertFile = in.ClusterSigningCertFile
out.ClusterSigningKeyFile = in.ClusterSigningKeyFile
out.ClusterSigningDuration = in.ClusterSigningDuration
return nil
}
func autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1alpha1_GroupResource_To_v1_GroupResource is an autogenerated conversion function.
func Convert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
return autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in, out, s)
}
func autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1_GroupResource_To_v1alpha1_GroupResource is an autogenerated conversion function.
func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
return autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in, out, s)
}
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package config
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *CSRSigningControllerConfiguration) DeepCopyInto(out *CSRSigningControllerConfiguration) {
*out = *in
out.ClusterSigningDuration = in.ClusterSigningDuration
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSRSigningControllerConfiguration.
func (in *CSRSigningControllerConfiguration) DeepCopy() *CSRSigningControllerConfiguration {
if in == nil {
return nil
}
out := new(CSRSigningControllerConfiguration)
in.DeepCopyInto(out)
return out
}
...@@ -104,6 +104,7 @@ filegroup( ...@@ -104,6 +104,7 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [ srcs = [
":package-srcs", ":package-srcs",
"//pkg/controller/daemon/config:all-srcs",
"//pkg/controller/daemon/util:all-srcs", "//pkg/controller/daemon/util:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
......
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"types.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/daemon/config",
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/controller/daemon/config/v1alpha1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
approvers:
- api-approvers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
reviewers:
- api-reviewers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
package config // import "k8s.io/kubernetes/pkg/controller/daemon/config"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
// DaemonSetControllerConfiguration contains elements describing DaemonSetController.
type DaemonSetControllerConfiguration struct {
// concurrentDaemonSetSyncs is the number of daemonset objects that are
// allowed to sync concurrently. Larger number = more responsive daemonset,
// but more CPU (and network) load.
ConcurrentDaemonSetSyncs int32
}
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//pkg/controller/daemon/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/kube-controller-manager/config/v1alpha1"
daemonconfig "k8s.io/kubernetes/pkg/controller/daemon/config"
)
// Important! The public back-and-forth conversion functions for the types in this epackage
// with DaemonSetControllerConfiguration types need to be manually exposed like this in order for
// other packages that reference this package to be able to call these conversion functions
// in an autogenerated manner.
// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions
// in autogenerated code as well.
// Convert_v1alpha1_DaemonSetControllerConfiguration_To_config_DaemonSetControllerConfiguration is an autogenerated conversion function.
func Convert_v1alpha1_DaemonSetControllerConfiguration_To_config_DaemonSetControllerConfiguration(in *v1alpha1.DaemonSetControllerConfiguration, out *daemonconfig.DaemonSetControllerConfiguration, s conversion.Scope) error {
return autoConvert_v1alpha1_DaemonSetControllerConfiguration_To_config_DaemonSetControllerConfiguration(in, out, s)
}
// Convert_config_DaemonSetControllerConfiguration_To_v1alpha1_DaemonSetControllerConfiguration is an autogenerated conversion function.
func Convert_config_DaemonSetControllerConfiguration_To_v1alpha1_DaemonSetControllerConfiguration(in *daemonconfig.DaemonSetControllerConfiguration, out *v1alpha1.DaemonSetControllerConfiguration, s conversion.Scope) error {
return autoConvert_config_DaemonSetControllerConfiguration_To_v1alpha1_DaemonSetControllerConfiguration(in, out, s)
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
)
// RecommendedDefaultDaemonSetControllerConfiguration defaults a pointer to a
// DaemonSetControllerConfiguration struct. This will set the recommended default
// values, but they may be subject to change between API versions. This function
// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo`
// function to allow consumers of this type to set whatever defaults for their
// embedded configs. Forcing consumers to use these defaults would be problematic
// as defaulting in the scheme is done as part of the conversion, and there would
// be no easy way to opt-out. Instead, if you want to use this defaulting method
// run it in your wrapper struct of this type in its `SetDefaults_` method.
func RecommendedDefaultDaemonSetControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.DaemonSetControllerConfiguration) {
if obj.ConcurrentDaemonSetSyncs == 0 {
obj.ConcurrentDaemonSetSyncs = 2
}
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/daemon/config
// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1
package v1alpha1 // import "k8s.io/kubernetes/pkg/controller/daemon/config/v1alpha1"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime"
)
var (
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
SchemeBuilder runtime.SchemeBuilder
// localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package,
// defaulting and conversion init funcs are registered as well.
localSchemeBuilder = &SchemeBuilder
// AddToScheme is a global function that registers this API group & version to a scheme
AddToScheme = localSchemeBuilder.AddToScheme
)
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by conversion-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
config "k8s.io/kubernetes/pkg/controller/daemon/config"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha1.DaemonSetControllerConfiguration)(nil), (*config.DaemonSetControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_DaemonSetControllerConfiguration_To_config_DaemonSetControllerConfiguration(a.(*v1alpha1.DaemonSetControllerConfiguration), b.(*config.DaemonSetControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*config.DaemonSetControllerConfiguration)(nil), (*v1alpha1.DaemonSetControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_DaemonSetControllerConfiguration_To_v1alpha1_DaemonSetControllerConfiguration(a.(*config.DaemonSetControllerConfiguration), b.(*v1alpha1.DaemonSetControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.GroupResource)(nil), (*v1alpha1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_GroupResource_To_v1alpha1_GroupResource(a.(*v1.GroupResource), b.(*v1alpha1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*config.DaemonSetControllerConfiguration)(nil), (*v1alpha1.DaemonSetControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_DaemonSetControllerConfiguration_To_v1alpha1_DaemonSetControllerConfiguration(a.(*config.DaemonSetControllerConfiguration), b.(*v1alpha1.DaemonSetControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*v1alpha1.DaemonSetControllerConfiguration)(nil), (*config.DaemonSetControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_DaemonSetControllerConfiguration_To_config_DaemonSetControllerConfiguration(a.(*v1alpha1.DaemonSetControllerConfiguration), b.(*config.DaemonSetControllerConfiguration), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_DaemonSetControllerConfiguration_To_config_DaemonSetControllerConfiguration(in *v1alpha1.DaemonSetControllerConfiguration, out *config.DaemonSetControllerConfiguration, s conversion.Scope) error {
out.ConcurrentDaemonSetSyncs = in.ConcurrentDaemonSetSyncs
return nil
}
func autoConvert_config_DaemonSetControllerConfiguration_To_v1alpha1_DaemonSetControllerConfiguration(in *config.DaemonSetControllerConfiguration, out *v1alpha1.DaemonSetControllerConfiguration, s conversion.Scope) error {
out.ConcurrentDaemonSetSyncs = in.ConcurrentDaemonSetSyncs
return nil
}
func autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1alpha1_GroupResource_To_v1_GroupResource is an autogenerated conversion function.
func Convert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
return autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in, out, s)
}
func autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1_GroupResource_To_v1alpha1_GroupResource is an autogenerated conversion function.
func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
return autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in, out, s)
}
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package config
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DaemonSetControllerConfiguration) DeepCopyInto(out *DaemonSetControllerConfiguration) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetControllerConfiguration.
func (in *DaemonSetControllerConfiguration) DeepCopy() *DaemonSetControllerConfiguration {
if in == nil {
return nil
}
out := new(DaemonSetControllerConfiguration)
in.DeepCopyInto(out)
return out
}
...@@ -99,6 +99,7 @@ filegroup( ...@@ -99,6 +99,7 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [ srcs = [
":package-srcs", ":package-srcs",
"//pkg/controller/deployment/config:all-srcs",
"//pkg/controller/deployment/util:all-srcs", "//pkg/controller/deployment/util:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
......
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"types.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/deployment/config",
visibility = ["//visibility:public"],
deps = ["//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/controller/deployment/config/v1alpha1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
approvers:
- api-approvers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
reviewers:
- api-reviewers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
package config // import "k8s.io/kubernetes/pkg/controller/deployment/config"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// DeploymentControllerConfiguration contains elements describing DeploymentController.
type DeploymentControllerConfiguration struct {
// concurrentDeploymentSyncs is the number of deployment objects that are
// allowed to sync concurrently. Larger number = more responsive deployments,
// but more CPU (and network) load.
ConcurrentDeploymentSyncs int32
// deploymentControllerSyncPeriod is the period for syncing the deployments.
DeploymentControllerSyncPeriod metav1.Duration
}
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//pkg/controller/deployment/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/kube-controller-manager/config/v1alpha1"
deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config"
)
// Important! The public back-and-forth conversion functions for the types in this package
// with DeploymentControllerConfiguration types need to be manually exposed like this in order for
// other packages that reference this package to be able to call these conversion functions
// in an autogenerated manner.
// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions
// in autogenerated code as well.
// Convert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration is an autogenerated conversion function.
func Convert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(in *v1alpha1.DeploymentControllerConfiguration, out *deploymentconfig.DeploymentControllerConfiguration, s conversion.Scope) error {
return autoConvert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(in, out, s)
}
// Convert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration is an autogenerated conversion function.
func Convert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(in *deploymentconfig.DeploymentControllerConfiguration, out *v1alpha1.DeploymentControllerConfiguration, s conversion.Scope) error {
return autoConvert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(in, out, s)
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
)
// RecommendedDefaultDeploymentControllerConfiguration defaults a pointer to a
// DeploymentControllerConfiguration struct. This will set the recommended default
// values, but they may be subject to change between API versions. This function
// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo`
// function to allow consumers of this type to set whatever defaults for their
// embedded configs. Forcing consumers to use these defaults would be problematic
// as defaulting in the scheme is done as part of the conversion, and there would
// be no easy way to opt-out. Instead, if you want to use this defaulting method
// run it in your wrapper struct of this type in its `SetDefaults_` method.
func RecommendedDefaultDeploymentControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.DeploymentControllerConfiguration) {
zero := metav1.Duration{}
if obj.ConcurrentDeploymentSyncs == 0 {
obj.ConcurrentDeploymentSyncs = 5
}
if obj.DeploymentControllerSyncPeriod == zero {
obj.DeploymentControllerSyncPeriod = metav1.Duration{Duration: 30 * time.Second}
}
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/deployment/config
// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1
package v1alpha1 // import "k8s.io/kubernetes/pkg/controller/deployment/config/v1alpha1"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime"
)
var (
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
SchemeBuilder runtime.SchemeBuilder
// localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package,
// defaulting and conversion init funcs are registered as well.
localSchemeBuilder = &SchemeBuilder
// AddToScheme is a global function that registers this API group & version to a scheme
AddToScheme = localSchemeBuilder.AddToScheme
)
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by conversion-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
config "k8s.io/kubernetes/pkg/controller/deployment/config"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha1.DeploymentControllerConfiguration)(nil), (*config.DeploymentControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(a.(*v1alpha1.DeploymentControllerConfiguration), b.(*config.DeploymentControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*config.DeploymentControllerConfiguration)(nil), (*v1alpha1.DeploymentControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(a.(*config.DeploymentControllerConfiguration), b.(*v1alpha1.DeploymentControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.GroupResource)(nil), (*v1alpha1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_GroupResource_To_v1alpha1_GroupResource(a.(*v1.GroupResource), b.(*v1alpha1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*config.DeploymentControllerConfiguration)(nil), (*v1alpha1.DeploymentControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(a.(*config.DeploymentControllerConfiguration), b.(*v1alpha1.DeploymentControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*v1alpha1.DeploymentControllerConfiguration)(nil), (*config.DeploymentControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(a.(*v1alpha1.DeploymentControllerConfiguration), b.(*config.DeploymentControllerConfiguration), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_DeploymentControllerConfiguration_To_config_DeploymentControllerConfiguration(in *v1alpha1.DeploymentControllerConfiguration, out *config.DeploymentControllerConfiguration, s conversion.Scope) error {
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return nil
}
func autoConvert_config_DeploymentControllerConfiguration_To_v1alpha1_DeploymentControllerConfiguration(in *config.DeploymentControllerConfiguration, out *v1alpha1.DeploymentControllerConfiguration, s conversion.Scope) error {
out.ConcurrentDeploymentSyncs = in.ConcurrentDeploymentSyncs
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return nil
}
func autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1alpha1_GroupResource_To_v1_GroupResource is an autogenerated conversion function.
func Convert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
return autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in, out, s)
}
func autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1_GroupResource_To_v1alpha1_GroupResource is an autogenerated conversion function.
func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
return autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in, out, s)
}
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package config
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DeploymentControllerConfiguration) DeepCopyInto(out *DeploymentControllerConfiguration) {
*out = *in
out.DeploymentControllerSyncPeriod = in.DeploymentControllerSyncPeriod
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentControllerConfiguration.
func (in *DeploymentControllerConfiguration) DeepCopy() *DeploymentControllerConfiguration {
if in == nil {
return nil
}
out := new(DeploymentControllerConfiguration)
in.DeepCopyInto(out)
return out
}
...@@ -77,6 +77,9 @@ filegroup( ...@@ -77,6 +77,9 @@ filegroup(
filegroup( filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [":package-srcs"], srcs = [
":package-srcs",
"//pkg/controller/endpoint/config:all-srcs",
],
tags = ["automanaged"], tags = ["automanaged"],
) )
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"types.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/endpoint/config",
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/controller/endpoint/config/v1alpha1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
approvers:
- api-approvers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
reviewers:
- api-reviewers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
package config // import "k8s.io/kubernetes/pkg/controller/endpoint/config"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
// EndpointControllerConfiguration contains elements describing EndpointController.
type EndpointControllerConfiguration struct {
// concurrentEndpointSyncs is the number of endpoint syncing operations
// that will be done concurrently. Larger number = faster endpoint updating,
// but more CPU (and network) load.
ConcurrentEndpointSyncs int32
}
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"conversion.go",
"defaults.go",
"doc.go",
"register.go",
"zz_generated.conversion.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//pkg/controller/endpoint/config:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/kube-controller-manager/config/v1alpha1:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/conversion"
"k8s.io/kube-controller-manager/config/v1alpha1"
endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config"
)
// Important! The public back-and-forth conversion functions for the types in this package
// with EndpointControllerConfiguration types need to be manually exposed like this in order for
// other packages that reference this package to be able to call these conversion functions
// in an autogenerated manner.
// TODO: Fix the bug in conversion-gen so it automatically discovers these Convert_* functions
// in autogenerated code as well.
// Convert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration is an autogenerated conversion function.
func Convert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration(in *v1alpha1.EndpointControllerConfiguration, out *endpointconfig.EndpointControllerConfiguration, s conversion.Scope) error {
return autoConvert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration(in, out, s)
}
// Convert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration is an autogenerated conversion function.
func Convert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration(in *endpointconfig.EndpointControllerConfiguration, out *v1alpha1.EndpointControllerConfiguration, s conversion.Scope) error {
return autoConvert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration(in, out, s)
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
kubectrlmgrconfigv1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
)
// RecommendedDefaultEndpointControllerConfiguration defaults a pointer to a
// EndpointControllerConfiguration struct. This will set the recommended default
// values, but they may be subject to change between API versions. This function
// is intentionally not registered in the scheme as a "normal" `SetDefaults_Foo`
// function to allow consumers of this type to set whatever defaults for their
// embedded configs. Forcing consumers to use these defaults would be problematic
// as defaulting in the scheme is done as part of the conversion, and there would
// be no easy way to opt-out. Instead, if you want to use this defaulting method
// run it in your wrapper struct of this type in its `SetDefaults_` method.
func RecommendedDefaultEndpointControllerConfiguration(obj *kubectrlmgrconfigv1alpha1.EndpointControllerConfiguration) {
if obj.ConcurrentEndpointSyncs == 0 {
obj.ConcurrentEndpointSyncs = 5
}
}
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/kubernetes/pkg/controller/endpoint/config
// +k8s:conversion-gen-external-types=k8s.io/kube-controller-manager/config/v1alpha1
package v1alpha1 // import "k8s.io/kubernetes/pkg/controller/endpoint/config/v1alpha1"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime"
)
var (
// SchemeBuilder is the scheme builder with scheme init functions to run for this API package
SchemeBuilder runtime.SchemeBuilder
// localSchemeBuilder extends the SchemeBuilder instance with the external types. In this package,
// defaulting and conversion init funcs are registered as well.
localSchemeBuilder = &SchemeBuilder
// AddToScheme is a global function that registers this API group & version to a scheme
AddToScheme = localSchemeBuilder.AddToScheme
)
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by conversion-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
v1alpha1 "k8s.io/kube-controller-manager/config/v1alpha1"
config "k8s.io/kubernetes/pkg/controller/endpoint/config"
)
func init() {
localSchemeBuilder.Register(RegisterConversions)
}
// RegisterConversions adds conversion functions to the given scheme.
// Public to allow building arbitrary schemes.
func RegisterConversions(s *runtime.Scheme) error {
if err := s.AddGeneratedConversionFunc((*v1alpha1.EndpointControllerConfiguration)(nil), (*config.EndpointControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration(a.(*v1alpha1.EndpointControllerConfiguration), b.(*config.EndpointControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*config.EndpointControllerConfiguration)(nil), (*v1alpha1.EndpointControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration(a.(*config.EndpointControllerConfiguration), b.(*v1alpha1.EndpointControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1alpha1.GroupResource)(nil), (*v1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_GroupResource_To_v1_GroupResource(a.(*v1alpha1.GroupResource), b.(*v1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddGeneratedConversionFunc((*v1.GroupResource)(nil), (*v1alpha1.GroupResource)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1_GroupResource_To_v1alpha1_GroupResource(a.(*v1.GroupResource), b.(*v1alpha1.GroupResource), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*config.EndpointControllerConfiguration)(nil), (*v1alpha1.EndpointControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration(a.(*config.EndpointControllerConfiguration), b.(*v1alpha1.EndpointControllerConfiguration), scope)
}); err != nil {
return err
}
if err := s.AddConversionFunc((*v1alpha1.EndpointControllerConfiguration)(nil), (*config.EndpointControllerConfiguration)(nil), func(a, b interface{}, scope conversion.Scope) error {
return Convert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration(a.(*v1alpha1.EndpointControllerConfiguration), b.(*config.EndpointControllerConfiguration), scope)
}); err != nil {
return err
}
return nil
}
func autoConvert_v1alpha1_EndpointControllerConfiguration_To_config_EndpointControllerConfiguration(in *v1alpha1.EndpointControllerConfiguration, out *config.EndpointControllerConfiguration, s conversion.Scope) error {
out.ConcurrentEndpointSyncs = in.ConcurrentEndpointSyncs
return nil
}
func autoConvert_config_EndpointControllerConfiguration_To_v1alpha1_EndpointControllerConfiguration(in *config.EndpointControllerConfiguration, out *v1alpha1.EndpointControllerConfiguration, s conversion.Scope) error {
out.ConcurrentEndpointSyncs = in.ConcurrentEndpointSyncs
return nil
}
func autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1alpha1_GroupResource_To_v1_GroupResource is an autogenerated conversion function.
func Convert_v1alpha1_GroupResource_To_v1_GroupResource(in *v1alpha1.GroupResource, out *v1.GroupResource, s conversion.Scope) error {
return autoConvert_v1alpha1_GroupResource_To_v1_GroupResource(in, out, s)
}
func autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
out.Group = in.Group
out.Resource = in.Resource
return nil
}
// Convert_v1_GroupResource_To_v1alpha1_GroupResource is an autogenerated conversion function.
func Convert_v1_GroupResource_To_v1alpha1_GroupResource(in *v1.GroupResource, out *v1alpha1.GroupResource, s conversion.Scope) error {
return autoConvert_v1_GroupResource_To_v1alpha1_GroupResource(in, out, s)
}
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package v1alpha1
// +build !ignore_autogenerated
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
package config
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EndpointControllerConfiguration) DeepCopyInto(out *EndpointControllerConfiguration) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointControllerConfiguration.
func (in *EndpointControllerConfiguration) DeepCopy() *EndpointControllerConfiguration {
if in == nil {
return nil
}
out := new(EndpointControllerConfiguration)
in.DeepCopyInto(out)
return out
}
...@@ -94,6 +94,7 @@ filegroup( ...@@ -94,6 +94,7 @@ filegroup(
name = "all-srcs", name = "all-srcs",
srcs = [ srcs = [
":package-srcs", ":package-srcs",
"//pkg/controller/garbagecollector/config:all-srcs",
"//pkg/controller/garbagecollector/metaonly:all-srcs", "//pkg/controller/garbagecollector/metaonly:all-srcs",
], ],
tags = ["automanaged"], tags = ["automanaged"],
......
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"types.go",
"zz_generated.deepcopy.go",
],
importpath = "k8s.io/kubernetes/pkg/controller/garbagecollector/config",
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/controller/garbagecollector/config/v1alpha1:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
approvers:
- api-approvers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
reviewers:
- api-reviewers
- deads2k
- luxas
- mtaufen
- sttts
- stewart-yu
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// +k8s:deepcopy-gen=package
package config // import "k8s.io/kubernetes/pkg/controller/garbagecollector/config"
/*
Copyright 2019 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package config
// GroupResource describes an group resource.
type GroupResource struct {
// group is the group portion of the GroupResource.
Group string
// resource is the resource portion of the GroupResource.
Resource string
}
// GarbageCollectorControllerConfiguration contains elements describing GarbageCollectorController.
type GarbageCollectorControllerConfiguration struct {
// enables the generic garbage collector. MUST be synced with the
// corresponding flag of the kube-apiserver. WARNING: the generic garbage
// collector is an alpha feature.
EnableGarbageCollector bool
// concurrentGCSyncs is the number of garbage collector workers that are
// allowed to sync concurrently.
ConcurrentGCSyncs int32
// gcIgnoredResources is the list of GroupResources that garbage collection should ignore.
GCIgnoredResources []GroupResource
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment