1/*
2Copyright 2018 The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17package config
18
19import (
20	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
21	cpconfig "k8s.io/cloud-provider/config"
22	serviceconfig "k8s.io/cloud-provider/controllers/service/config"
23	cmconfig "k8s.io/controller-manager/config"
24	csrsigningconfig "k8s.io/kubernetes/pkg/controller/certificates/signer/config"
25	cronjobconfig "k8s.io/kubernetes/pkg/controller/cronjob/config"
26	daemonconfig "k8s.io/kubernetes/pkg/controller/daemon/config"
27	deploymentconfig "k8s.io/kubernetes/pkg/controller/deployment/config"
28	endpointconfig "k8s.io/kubernetes/pkg/controller/endpoint/config"
29	endpointsliceconfig "k8s.io/kubernetes/pkg/controller/endpointslice/config"
30	endpointslicemirroringconfig "k8s.io/kubernetes/pkg/controller/endpointslicemirroring/config"
31	garbagecollectorconfig "k8s.io/kubernetes/pkg/controller/garbagecollector/config"
32	jobconfig "k8s.io/kubernetes/pkg/controller/job/config"
33	namespaceconfig "k8s.io/kubernetes/pkg/controller/namespace/config"
34	nodeipamconfig "k8s.io/kubernetes/pkg/controller/nodeipam/config"
35	nodelifecycleconfig "k8s.io/kubernetes/pkg/controller/nodelifecycle/config"
36	poautosclerconfig "k8s.io/kubernetes/pkg/controller/podautoscaler/config"
37	podgcconfig "k8s.io/kubernetes/pkg/controller/podgc/config"
38	replicasetconfig "k8s.io/kubernetes/pkg/controller/replicaset/config"
39	replicationconfig "k8s.io/kubernetes/pkg/controller/replication/config"
40	resourcequotaconfig "k8s.io/kubernetes/pkg/controller/resourcequota/config"
41	serviceaccountconfig "k8s.io/kubernetes/pkg/controller/serviceaccount/config"
42	statefulsetconfig "k8s.io/kubernetes/pkg/controller/statefulset/config"
43	ttlafterfinishedconfig "k8s.io/kubernetes/pkg/controller/ttlafterfinished/config"
44	attachdetachconfig "k8s.io/kubernetes/pkg/controller/volume/attachdetach/config"
45	persistentvolumeconfig "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/config"
46)
47
48// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
49
50// KubeControllerManagerConfiguration contains elements describing kube-controller manager.
51type KubeControllerManagerConfiguration struct {
52	metav1.TypeMeta
53
54	// Generic holds configuration for a generic controller-manager
55	Generic cmconfig.GenericControllerManagerConfiguration
56	// KubeCloudSharedConfiguration holds configuration for shared related features
57	// both in cloud controller manager and kube-controller manager.
58	KubeCloudShared cpconfig.KubeCloudSharedConfiguration
59
60	// AttachDetachControllerConfiguration holds configuration for
61	// AttachDetachController related features.
62	AttachDetachController attachdetachconfig.AttachDetachControllerConfiguration
63	// CSRSigningControllerConfiguration holds configuration for
64	// CSRSigningController related features.
65	CSRSigningController csrsigningconfig.CSRSigningControllerConfiguration
66	// DaemonSetControllerConfiguration holds configuration for DaemonSetController
67	// related features.
68	DaemonSetController daemonconfig.DaemonSetControllerConfiguration
69	// DeploymentControllerConfiguration holds configuration for
70	// DeploymentController related features.
71	DeploymentController deploymentconfig.DeploymentControllerConfiguration
72	// StatefulSetControllerConfiguration holds configuration for
73	// StatefulSetController related features.
74	StatefulSetController statefulsetconfig.StatefulSetControllerConfiguration
75	// DeprecatedControllerConfiguration holds configuration for some deprecated
76	// features.
77	DeprecatedController DeprecatedControllerConfiguration
78	// EndpointControllerConfiguration holds configuration for EndpointController
79	// related features.
80	EndpointController endpointconfig.EndpointControllerConfiguration
81	// EndpointSliceControllerConfiguration holds configuration for
82	// EndpointSliceController related features.
83	EndpointSliceController endpointsliceconfig.EndpointSliceControllerConfiguration
84	// EndpointSliceMirroringControllerConfiguration holds configuration for
85	// EndpointSliceMirroringController related features.
86	EndpointSliceMirroringController endpointslicemirroringconfig.EndpointSliceMirroringControllerConfiguration
87	// GarbageCollectorControllerConfiguration holds configuration for
88	// GarbageCollectorController related features.
89	GarbageCollectorController garbagecollectorconfig.GarbageCollectorControllerConfiguration
90	// HPAControllerConfiguration holds configuration for HPAController related features.
91	HPAController poautosclerconfig.HPAControllerConfiguration
92	// JobControllerConfiguration holds configuration for JobController related features.
93	JobController jobconfig.JobControllerConfiguration
94	// CronJobControllerConfiguration holds configuration for CronJobController
95	// related features.
96	CronJobController cronjobconfig.CronJobControllerConfiguration
97	// NamespaceControllerConfiguration holds configuration for NamespaceController
98	// related features.
99	NamespaceController namespaceconfig.NamespaceControllerConfiguration
100	// NodeIPAMControllerConfiguration holds configuration for NodeIPAMController
101	// related features.
102	NodeIPAMController nodeipamconfig.NodeIPAMControllerConfiguration
103	// NodeLifecycleControllerConfiguration holds configuration for
104	// NodeLifecycleController related features.
105	NodeLifecycleController nodelifecycleconfig.NodeLifecycleControllerConfiguration
106	// PersistentVolumeBinderControllerConfiguration holds configuration for
107	// PersistentVolumeBinderController related features.
108	PersistentVolumeBinderController persistentvolumeconfig.PersistentVolumeBinderControllerConfiguration
109	// PodGCControllerConfiguration holds configuration for PodGCController
110	// related features.
111	PodGCController podgcconfig.PodGCControllerConfiguration
112	// ReplicaSetControllerConfiguration holds configuration for ReplicaSet related features.
113	ReplicaSetController replicasetconfig.ReplicaSetControllerConfiguration
114	// ReplicationControllerConfiguration holds configuration for
115	// ReplicationController related features.
116	ReplicationController replicationconfig.ReplicationControllerConfiguration
117	// ResourceQuotaControllerConfiguration holds configuration for
118	// ResourceQuotaController related features.
119	ResourceQuotaController resourcequotaconfig.ResourceQuotaControllerConfiguration
120	// SAControllerConfiguration holds configuration for ServiceAccountController
121	// related features.
122	SAController serviceaccountconfig.SAControllerConfiguration
123	// ServiceControllerConfiguration holds configuration for ServiceController
124	// related features.
125	ServiceController serviceconfig.ServiceControllerConfiguration
126	// TTLAfterFinishedControllerConfiguration holds configuration for
127	// TTLAfterFinishedController related features.
128	TTLAfterFinishedController ttlafterfinishedconfig.TTLAfterFinishedControllerConfiguration
129}
130
131// DeprecatedControllerConfiguration contains elements be deprecated.
132type DeprecatedControllerConfiguration struct {
133	// DEPRECATED: deletingPodsQps is the number of nodes per second on which pods are deleted in
134	// case of node failure.
135	DeletingPodsQPS float32
136	// DEPRECATED: deletingPodsBurst is the number of nodes on which pods are bursty deleted in
137	// case of node failure. For more details look into RateLimiter.
138	DeletingPodsBurst int32
139	// registerRetryCount is the number of retries for initial node registration.
140	// Retry interval equals node-sync-period.
141	RegisterRetryCount int32
142}
143