Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
3187f222
Unverified
Commit
3187f222
authored
Sep 02, 2018
by
Lucas Käldström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor the kube-controller-manager ComponentConfig structs to they can be moved out
parent
b38a8164
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
125 additions
and
133 deletions
+125
-133
violation_exceptions.list
api/api-rules/violation_exceptions.list
+0
-0
types.go
pkg/apis/componentconfig/types.go
+42
-50
defaults.go
pkg/apis/componentconfig/v1alpha1/defaults.go
+44
-34
types.go
pkg/apis/componentconfig/v1alpha1/types.go
+39
-49
No files found.
api/api-rules/violation_exceptions.list
View file @
3187f222
This diff is collapsed.
Click to expand it.
pkg/apis/componentconfig/types.go
View file @
3187f222
...
@@ -17,6 +17,7 @@ limitations under the License.
...
@@ -17,6 +17,7 @@ limitations under the License.
package
componentconfig
package
componentconfig
import
(
import
(
apimachineryconfig
"k8s.io/apimachinery/pkg/apis/config"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
apiserverconfig
"k8s.io/apiserver/pkg/apis/config"
apiserverconfig
"k8s.io/apiserver/pkg/apis/config"
)
)
...
@@ -33,13 +34,8 @@ type GroupResource struct {
...
@@ -33,13 +34,8 @@ type GroupResource struct {
type
KubeControllerManagerConfiguration
struct
{
type
KubeControllerManagerConfiguration
struct
{
metav1
.
TypeMeta
metav1
.
TypeMeta
// CloudProviderConfiguration holds configuration for CloudProvider related features.
// Generic holds configuration for a generic controller-manager
CloudProvider
CloudProviderConfiguration
Generic
GenericControllerManagerConfiguration
// DebuggingConfiguration holds configuration for Debugging related features.
Debugging
apiserverconfig
.
DebuggingConfiguration
// GenericComponentConfiguration holds configuration for GenericComponent
// related features both in cloud controller manager and kube-controller manager.
GenericComponent
GenericComponentConfiguration
// KubeCloudSharedConfiguration holds configuration for shared related features
// KubeCloudSharedConfiguration holds configuration for shared related features
// both in cloud controller manager and kube-controller manager.
// both in cloud controller manager and kube-controller manager.
KubeCloudShared
KubeCloudSharedConfiguration
KubeCloudShared
KubeCloudSharedConfiguration
...
@@ -59,9 +55,9 @@ type KubeControllerManagerConfiguration struct {
...
@@ -59,9 +55,9 @@ type KubeControllerManagerConfiguration struct {
// DeprecatedControllerConfiguration holds configuration for some deprecated
// DeprecatedControllerConfiguration holds configuration for some deprecated
// features.
// features.
DeprecatedController
DeprecatedControllerConfiguration
DeprecatedController
DeprecatedControllerConfiguration
// End
PointControllerConfiguration holds configuration for EndP
ointController
// End
pointControllerConfiguration holds configuration for Endp
ointController
// related features.
// related features.
End
PointController
EndP
ointControllerConfiguration
End
pointController
Endp
ointControllerConfiguration
// GarbageCollectorControllerConfiguration holds configuration for
// GarbageCollectorControllerConfiguration holds configuration for
// GarbageCollectorController related features.
// GarbageCollectorController related features.
GarbageCollectorController
GarbageCollectorControllerConfiguration
GarbageCollectorController
GarbageCollectorControllerConfiguration
...
@@ -69,12 +65,12 @@ type KubeControllerManagerConfiguration struct {
...
@@ -69,12 +65,12 @@ type KubeControllerManagerConfiguration struct {
HPAController
HPAControllerConfiguration
HPAController
HPAControllerConfiguration
// JobControllerConfiguration holds configuration for JobController related features.
// JobControllerConfiguration holds configuration for JobController related features.
JobController
JobControllerConfiguration
JobController
JobControllerConfiguration
// NamespaceControllerConfiguration holds configuration for
// NamespaceControllerConfiguration holds configuration for
NamespaceController
//
NamespaceController
related features.
// related features.
NamespaceController
NamespaceControllerConfiguration
NamespaceController
NamespaceControllerConfiguration
// NodeI
pamControllerConfiguration holds configuration for NodeIpam
Controller
// NodeI
PAMControllerConfiguration holds configuration for NodeIPAM
Controller
// related features.
// related features.
NodeI
pamController
NodeIpam
ControllerConfiguration
NodeI
PAMController
NodeIPAM
ControllerConfiguration
// NodeLifecycleControllerConfiguration holds configuration for
// NodeLifecycleControllerConfiguration holds configuration for
// NodeLifecycleController related features.
// NodeLifecycleController related features.
NodeLifecycleController
NodeLifecycleControllerConfiguration
NodeLifecycleController
NodeLifecycleControllerConfiguration
...
@@ -98,16 +94,6 @@ type KubeControllerManagerConfiguration struct {
...
@@ -98,16 +94,6 @@ type KubeControllerManagerConfiguration struct {
// ServiceControllerConfiguration holds configuration for ServiceController
// ServiceControllerConfiguration holds configuration for ServiceController
// related features.
// related features.
ServiceController
ServiceControllerConfiguration
ServiceController
ServiceControllerConfiguration
// Controllers is the list of controllers to enable or disable
// '*' means "all enabled by default controllers"
// 'foo' means "enable 'foo'"
// '-foo' means "disable 'foo'"
// first item for a particular name wins
Controllers
[]
string
// externalCloudVolumePlugin specifies the plugin to use when cloudProvider is "external".
// It is currently used by the in repo cloud providers to handle node and volume control in the KCM.
ExternalCloudVolumePlugin
string
}
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
...
@@ -115,16 +101,12 @@ type KubeControllerManagerConfiguration struct {
...
@@ -115,16 +101,12 @@ type KubeControllerManagerConfiguration struct {
type
CloudControllerManagerConfiguration
struct
{
type
CloudControllerManagerConfiguration
struct
{
metav1
.
TypeMeta
metav1
.
TypeMeta
// CloudProviderConfiguration holds configuration for CloudProvider related features.
// Generic holds configuration for a generic controller-manager
CloudProvider
CloudProviderConfiguration
Generic
GenericControllerManagerConfiguration
// DebuggingConfiguration holds configuration for Debugging related features.
Debugging
apiserverconfig
.
DebuggingConfiguration
// GenericComponentConfiguration holds configuration for GenericComponent
// related features both in cloud controller manager and kube-controller manager.
GenericComponent
GenericComponentConfiguration
// KubeCloudSharedConfiguration holds configuration for shared related features
// KubeCloudSharedConfiguration holds configuration for shared related features
// both in cloud controller manager and kube-controller manager.
// both in cloud controller manager and kube-controller manager.
KubeCloudShared
KubeCloudSharedConfiguration
KubeCloudShared
KubeCloudSharedConfiguration
// ServiceControllerConfiguration holds configuration for ServiceController
// ServiceControllerConfiguration holds configuration for ServiceController
// related features.
// related features.
ServiceController
ServiceControllerConfiguration
ServiceController
ServiceControllerConfiguration
...
@@ -132,34 +114,37 @@ type CloudControllerManagerConfiguration struct {
...
@@ -132,34 +114,37 @@ type CloudControllerManagerConfiguration struct {
NodeStatusUpdateFrequency
metav1
.
Duration
NodeStatusUpdateFrequency
metav1
.
Duration
}
}
type
CloudProviderConfiguration
struct
{
type
GenericControllerManagerConfiguration
struct
{
// Name is the provider for cloud services.
// port is the port that the controller-manager's http service runs on.
Name
string
Port
int32
// cloudConfigFile is the path to the cloud provider configuration file.
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
CloudConfigFile
string
Address
string
}
type
GenericComponentConfiguration
struct
{
// minResyncPeriod is the resync period in reflectors; will be random between
// minResyncPeriod is the resync period in reflectors; will be random between
// minResyncPeriod and 2*minResyncPeriod.
// minResyncPeriod and 2*minResyncPeriod.
MinResyncPeriod
metav1
.
Duration
MinResyncPeriod
metav1
.
Duration
// contentType is contentType of requests sent to apiserver.
// ClientConnection specifies the kubeconfig file and client connection
ContentType
string
// settings for the proxy server to use when communicating with the apiserver.
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
ClientConnection
apimachineryconfig
.
ClientConnectionConfiguration
KubeAPIQPS
float32
// kubeAPIBurst is the burst to use while talking with kubernetes apiserver.
KubeAPIBurst
int32
// How long to wait between starting controller managers
// How long to wait between starting controller managers
ControllerStartInterval
metav1
.
Duration
ControllerStartInterval
metav1
.
Duration
// leaderElection defines the configuration of leader election client.
// leaderElection defines the configuration of leader election client.
LeaderElection
apiserverconfig
.
LeaderElectionConfiguration
LeaderElection
apiserverconfig
.
LeaderElectionConfiguration
// Controllers is the list of controllers to enable or disable
// '*' means "all enabled by default controllers"
// 'foo' means "enable 'foo'"
// '-foo' means "disable 'foo'"
// first item for a particular name wins
Controllers
[]
string
// DebuggingConfiguration holds configuration for Debugging related features.
Debugging
apiserverconfig
.
DebuggingConfiguration
}
}
type
KubeCloudSharedConfiguration
struct
{
type
KubeCloudSharedConfiguration
struct
{
// port is the port that the controller-manager's http service runs on.
// CloudProviderConfiguration holds configuration for CloudProvider related features.
Port
int32
CloudProvider
CloudProviderConfiguration
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
// externalCloudVolumePlugin specifies the plugin to use when cloudProvider is "external".
Address
string
// It is currently used by the in repo cloud providers to handle node and volume control in the KCM.
ExternalCloudVolumePlugin
string
// useServiceAccountCredentials indicates whether controllers should be run with
// useServiceAccountCredentials indicates whether controllers should be run with
// individual service account credentials.
// individual service account credentials.
UseServiceAccountCredentials
bool
UseServiceAccountCredentials
bool
...
@@ -197,6 +182,13 @@ type AttachDetachControllerConfiguration struct {
...
@@ -197,6 +182,13 @@ type AttachDetachControllerConfiguration struct {
ReconcilerSyncLoopPeriod
metav1
.
Duration
ReconcilerSyncLoopPeriod
metav1
.
Duration
}
}
type
CloudProviderConfiguration
struct
{
// Name is the provider for cloud services.
Name
string
// cloudConfigFile is the path to the cloud provider configuration file.
CloudConfigFile
string
}
type
CSRSigningControllerConfiguration
struct
{
type
CSRSigningControllerConfiguration
struct
{
// clusterSigningCertFile is the filename containing a PEM-encoded
// clusterSigningCertFile is the filename containing a PEM-encoded
// X509 CA certificate used to issue cluster-scoped certificates
// X509 CA certificate used to issue cluster-scoped certificates
...
@@ -237,7 +229,7 @@ type DeprecatedControllerConfiguration struct {
...
@@ -237,7 +229,7 @@ type DeprecatedControllerConfiguration struct {
RegisterRetryCount
int32
RegisterRetryCount
int32
}
}
type
End
P
ointControllerConfiguration
struct
{
type
End
p
ointControllerConfiguration
struct
{
// concurrentEndpointSyncs is the number of endpoint syncing operations
// concurrentEndpointSyncs is the number of endpoint syncing operations
// that will be done concurrently. Larger number = faster endpoint updating,
// that will be done concurrently. Larger number = faster endpoint updating,
// but more CPU (and network) load.
// but more CPU (and network) load.
...
@@ -297,7 +289,7 @@ type NamespaceControllerConfiguration struct {
...
@@ -297,7 +289,7 @@ type NamespaceControllerConfiguration struct {
ConcurrentNamespaceSyncs
int32
ConcurrentNamespaceSyncs
int32
}
}
type
NodeI
pam
ControllerConfiguration
struct
{
type
NodeI
PAM
ControllerConfiguration
struct
{
// serviceCIDR is CIDR Range for Services in cluster.
// serviceCIDR is CIDR Range for Services in cluster.
ServiceCIDR
string
ServiceCIDR
string
// NodeCIDRMaskSize is the mask size for node cidr in cluster.
// NodeCIDRMaskSize is the mask size for node cidr in cluster.
...
...
pkg/apis/componentconfig/v1alpha1/defaults.go
View file @
3187f222
...
@@ -19,6 +19,7 @@ package v1alpha1
...
@@ -19,6 +19,7 @@ package v1alpha1
import
(
import
(
"time"
"time"
apimachineryconfigv1alpha1
"k8s.io/apimachinery/pkg/apis/config/v1alpha1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
kruntime
"k8s.io/apimachinery/pkg/runtime"
kruntime
"k8s.io/apimachinery/pkg/runtime"
apiserverconfigv1alpha1
"k8s.io/apiserver/pkg/apis/config/v1alpha1"
apiserverconfigv1alpha1
"k8s.io/apiserver/pkg/apis/config/v1alpha1"
...
@@ -29,23 +30,10 @@ func addDefaultingFuncs(scheme *kruntime.Scheme) error {
...
@@ -29,23 +30,10 @@ func addDefaultingFuncs(scheme *kruntime.Scheme) error {
return
RegisterDefaults
(
scheme
)
return
RegisterDefaults
(
scheme
)
}
}
func
SetDefaults_CloudControllerManagerConfiguration
(
obj
*
CloudControllerManagerConfiguration
)
{
zero
:=
metav1
.
Duration
{}
if
obj
.
ServiceController
.
ConcurrentServiceSyncs
==
0
{
obj
.
ServiceController
.
ConcurrentServiceSyncs
=
1
}
if
obj
.
NodeStatusUpdateFrequency
==
zero
{
obj
.
NodeStatusUpdateFrequency
=
metav1
.
Duration
{
Duration
:
5
*
time
.
Minute
}
}
}
func
SetDefaults_KubeControllerManagerConfiguration
(
obj
*
KubeControllerManagerConfiguration
)
{
func
SetDefaults_KubeControllerManagerConfiguration
(
obj
*
KubeControllerManagerConfiguration
)
{
zero
:=
metav1
.
Duration
{}
zero
:=
metav1
.
Duration
{}
if
len
(
obj
.
Controllers
)
==
0
{
if
obj
.
EndpointController
.
ConcurrentEndpointSyncs
==
0
{
obj
.
Controllers
=
[]
string
{
"*"
}
obj
.
EndpointController
.
ConcurrentEndpointSyncs
=
5
}
if
obj
.
EndPointController
.
ConcurrentEndpointSyncs
==
0
{
obj
.
EndPointController
.
ConcurrentEndpointSyncs
=
5
}
}
if
obj
.
ServiceController
.
ConcurrentServiceSyncs
==
0
{
if
obj
.
ServiceController
.
ConcurrentServiceSyncs
==
0
{
obj
.
ServiceController
.
ConcurrentServiceSyncs
=
1
obj
.
ServiceController
.
ConcurrentServiceSyncs
=
1
...
@@ -116,8 +104,8 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *KubeControllerManagerCo
...
@@ -116,8 +104,8 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *KubeControllerManagerCo
if
obj
.
NodeLifecycleController
.
NodeStartupGracePeriod
==
zero
{
if
obj
.
NodeLifecycleController
.
NodeStartupGracePeriod
==
zero
{
obj
.
NodeLifecycleController
.
NodeStartupGracePeriod
=
metav1
.
Duration
{
Duration
:
60
*
time
.
Second
}
obj
.
NodeLifecycleController
.
NodeStartupGracePeriod
=
metav1
.
Duration
{
Duration
:
60
*
time
.
Second
}
}
}
if
obj
.
NodeI
pam
Controller
.
NodeCIDRMaskSize
==
0
{
if
obj
.
NodeI
PAM
Controller
.
NodeCIDRMaskSize
==
0
{
obj
.
NodeI
pam
Controller
.
NodeCIDRMaskSize
=
24
obj
.
NodeI
PAM
Controller
.
NodeCIDRMaskSize
=
24
}
}
if
obj
.
PodGCController
.
TerminatedPodGCThreshold
==
0
{
if
obj
.
PodGCController
.
TerminatedPodGCThreshold
==
0
{
obj
.
PodGCController
.
TerminatedPodGCThreshold
=
12500
obj
.
PodGCController
.
TerminatedPodGCThreshold
=
12500
...
@@ -146,39 +134,58 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *KubeControllerManagerCo
...
@@ -146,39 +134,58 @@ func SetDefaults_KubeControllerManagerConfiguration(obj *KubeControllerManagerCo
if
obj
.
HPAController
.
HorizontalPodAutoscalerUseRESTClients
==
nil
{
if
obj
.
HPAController
.
HorizontalPodAutoscalerUseRESTClients
==
nil
{
obj
.
HPAController
.
HorizontalPodAutoscalerUseRESTClients
=
utilpointer
.
BoolPtr
(
true
)
obj
.
HPAController
.
HorizontalPodAutoscalerUseRESTClients
=
utilpointer
.
BoolPtr
(
true
)
}
}
// These defaults override the recommended defaults from the apimachineryconfigv1alpha1 package that are applied automatically
// These client-connection defaults are specific to the kube-controller-manager
if
obj
.
Generic
.
ClientConnection
.
QPS
==
0.0
{
obj
.
Generic
.
ClientConnection
.
QPS
=
50.0
}
if
obj
.
Generic
.
ClientConnection
.
Burst
==
0
{
obj
.
Generic
.
ClientConnection
.
Burst
=
100
}
}
}
func
SetDefaults_
GenericComponentConfiguration
(
obj
*
GenericComponent
Configuration
)
{
func
SetDefaults_
CloudControllerManagerConfiguration
(
obj
*
CloudControllerManager
Configuration
)
{
zero
:=
metav1
.
Duration
{}
zero
:=
metav1
.
Duration
{}
if
obj
.
MinResyncPeriod
==
zero
{
if
obj
.
ServiceController
.
ConcurrentServiceSyncs
==
0
{
obj
.
MinResyncPeriod
=
metav1
.
Duration
{
Duration
:
12
*
time
.
Hour
}
obj
.
ServiceController
.
ConcurrentServiceSyncs
=
1
}
}
if
obj
.
ContentType
==
""
{
if
obj
.
NodeStatusUpdateFrequency
==
zero
{
obj
.
ContentType
=
"application/vnd.kubernetes.protobuf"
obj
.
NodeStatusUpdateFrequency
=
metav1
.
Duration
{
Duration
:
5
*
time
.
Minute
}
}
}
if
obj
.
KubeAPIQPS
==
0
{
// These defaults override the recommended defaults from the apimachineryconfigv1alpha1 package that are applied automatically
obj
.
KubeAPIQPS
=
20.0
// These client-connection defaults are specific to the cloud-controller-manager
if
obj
.
Generic
.
ClientConnection
.
QPS
==
0
{
obj
.
Generic
.
ClientConnection
.
QPS
=
20
}
}
if
obj
.
KubeAPIBurst
==
0
{
if
obj
.
Generic
.
ClientConnection
.
Burst
==
0
{
obj
.
KubeAPIBurst
=
30
obj
.
Generic
.
ClientConnection
.
Burst
=
30
}
}
func
SetDefaults_GenericControllerManagerConfiguration
(
obj
*
GenericControllerManagerConfiguration
)
{
zero
:=
metav1
.
Duration
{}
if
obj
.
Address
==
""
{
obj
.
Address
=
"0.0.0.0"
}
if
obj
.
MinResyncPeriod
==
zero
{
obj
.
MinResyncPeriod
=
metav1
.
Duration
{
Duration
:
12
*
time
.
Hour
}
}
}
if
obj
.
ControllerStartInterval
==
zero
{
if
obj
.
ControllerStartInterval
==
zero
{
obj
.
ControllerStartInterval
=
metav1
.
Duration
{
Duration
:
0
*
time
.
Second
}
obj
.
ControllerStartInterval
=
metav1
.
Duration
{
Duration
:
0
*
time
.
Second
}
}
}
if
len
(
obj
.
Controllers
)
==
0
{
obj
.
Controllers
=
[]
string
{
"*"
}
}
// Use the default LeaderElectionConfiguration options
// Use the default ClientConnectionConfiguration and LeaderElectionConfiguration options
apimachineryconfigv1alpha1
.
RecommendedDefaultClientConnectionConfiguration
(
&
obj
.
ClientConnection
)
apiserverconfigv1alpha1
.
RecommendedDefaultLeaderElectionConfiguration
(
&
obj
.
LeaderElection
)
apiserverconfigv1alpha1
.
RecommendedDefaultLeaderElectionConfiguration
(
&
obj
.
LeaderElection
)
}
}
func
SetDefaults_KubeCloudSharedConfiguration
(
obj
*
KubeCloudSharedConfiguration
)
{
func
SetDefaults_KubeCloudSharedConfiguration
(
obj
*
KubeCloudSharedConfiguration
)
{
zero
:=
metav1
.
Duration
{}
zero
:=
metav1
.
Duration
{}
// Port
if
obj
.
Address
==
""
{
obj
.
Address
=
"0.0.0.0"
}
if
obj
.
RouteReconciliationPeriod
==
zero
{
obj
.
RouteReconciliationPeriod
=
metav1
.
Duration
{
Duration
:
10
*
time
.
Second
}
}
if
obj
.
NodeMonitorPeriod
==
zero
{
if
obj
.
NodeMonitorPeriod
==
zero
{
obj
.
NodeMonitorPeriod
=
metav1
.
Duration
{
Duration
:
5
*
time
.
Second
}
obj
.
NodeMonitorPeriod
=
metav1
.
Duration
{
Duration
:
5
*
time
.
Second
}
}
}
...
@@ -188,6 +195,9 @@ func SetDefaults_KubeCloudSharedConfiguration(obj *KubeCloudSharedConfiguration)
...
@@ -188,6 +195,9 @@ func SetDefaults_KubeCloudSharedConfiguration(obj *KubeCloudSharedConfiguration)
if
obj
.
ConfigureCloudRoutes
==
nil
{
if
obj
.
ConfigureCloudRoutes
==
nil
{
obj
.
ConfigureCloudRoutes
=
utilpointer
.
BoolPtr
(
true
)
obj
.
ConfigureCloudRoutes
=
utilpointer
.
BoolPtr
(
true
)
}
}
if
obj
.
RouteReconciliationPeriod
==
zero
{
obj
.
RouteReconciliationPeriod
=
metav1
.
Duration
{
Duration
:
10
*
time
.
Second
}
}
}
}
func
SetDefaults_PersistentVolumeRecyclerConfiguration
(
obj
*
PersistentVolumeRecyclerConfiguration
)
{
func
SetDefaults_PersistentVolumeRecyclerConfiguration
(
obj
*
PersistentVolumeRecyclerConfiguration
)
{
...
...
pkg/apis/componentconfig/v1alpha1/types.go
View file @
3187f222
...
@@ -17,6 +17,7 @@ limitations under the License.
...
@@ -17,6 +17,7 @@ limitations under the License.
package
v1alpha1
package
v1alpha1
import
(
import
(
apimachineryconfigv1alpha1
"k8s.io/apimachinery/pkg/apis/config/v1alpha1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
metav1
"k8s.io/apimachinery/pkg/apis/meta/v1"
apiserverconfigv1alpha1
"k8s.io/apiserver/pkg/apis/config/v1alpha1"
apiserverconfigv1alpha1
"k8s.io/apiserver/pkg/apis/config/v1alpha1"
)
)
...
@@ -81,13 +82,8 @@ type GroupResource struct {
...
@@ -81,13 +82,8 @@ type GroupResource struct {
type
KubeControllerManagerConfiguration
struct
{
type
KubeControllerManagerConfiguration
struct
{
metav1
.
TypeMeta
`json:",inline"`
metav1
.
TypeMeta
`json:",inline"`
// CloudProviderConfiguration holds configuration for CloudProvider related features.
// Generic holds configuration for a generic controller-manager
CloudProvider
CloudProviderConfiguration
Generic
GenericControllerManagerConfiguration
// DebuggingConfiguration holds configuration for Debugging related features.
Debugging
apiserverconfigv1alpha1
.
DebuggingConfiguration
// GenericComponentConfiguration holds configuration for GenericComponent
// related features both in cloud controller manager and kube-controller manager.
GenericComponent
GenericComponentConfiguration
// KubeCloudSharedConfiguration holds configuration for shared related features
// KubeCloudSharedConfiguration holds configuration for shared related features
// both in cloud controller manager and kube-controller manager.
// both in cloud controller manager and kube-controller manager.
KubeCloudShared
KubeCloudSharedConfiguration
KubeCloudShared
KubeCloudSharedConfiguration
...
@@ -107,9 +103,9 @@ type KubeControllerManagerConfiguration struct {
...
@@ -107,9 +103,9 @@ type KubeControllerManagerConfiguration struct {
// DeprecatedControllerConfiguration holds configuration for some deprecated
// DeprecatedControllerConfiguration holds configuration for some deprecated
// features.
// features.
DeprecatedController
DeprecatedControllerConfiguration
DeprecatedController
DeprecatedControllerConfiguration
// End
PointControllerConfiguration holds configuration for EndP
ointController
// End
pointControllerConfiguration holds configuration for Endp
ointController
// related features.
// related features.
End
PointController
EndP
ointControllerConfiguration
End
pointController
Endp
ointControllerConfiguration
// GarbageCollectorControllerConfiguration holds configuration for
// GarbageCollectorControllerConfiguration holds configuration for
// GarbageCollectorController related features.
// GarbageCollectorController related features.
GarbageCollectorController
GarbageCollectorControllerConfiguration
GarbageCollectorController
GarbageCollectorControllerConfiguration
...
@@ -120,9 +116,9 @@ type KubeControllerManagerConfiguration struct {
...
@@ -120,9 +116,9 @@ type KubeControllerManagerConfiguration struct {
// NamespaceControllerConfiguration holds configuration for NamespaceController
// NamespaceControllerConfiguration holds configuration for NamespaceController
// related features.
// related features.
NamespaceController
NamespaceControllerConfiguration
NamespaceController
NamespaceControllerConfiguration
// NodeI
pamControllerConfiguration holds configuration for NodeIpam
Controller
// NodeI
PAMControllerConfiguration holds configuration for NodeIPAM
Controller
// related features.
// related features.
NodeI
pamController
NodeIpam
ControllerConfiguration
NodeI
PAMController
NodeIPAM
ControllerConfiguration
// NodeLifecycleControllerConfiguration holds configuration for
// NodeLifecycleControllerConfiguration holds configuration for
// NodeLifecycleController related features.
// NodeLifecycleController related features.
NodeLifecycleController
NodeLifecycleControllerConfiguration
NodeLifecycleController
NodeLifecycleControllerConfiguration
...
@@ -146,16 +142,6 @@ type KubeControllerManagerConfiguration struct {
...
@@ -146,16 +142,6 @@ type KubeControllerManagerConfiguration struct {
// ServiceControllerConfiguration holds configuration for ServiceController
// ServiceControllerConfiguration holds configuration for ServiceController
// related features.
// related features.
ServiceController
ServiceControllerConfiguration
ServiceController
ServiceControllerConfiguration
// Controllers is the list of controllers to enable or disable
// '*' means "all enabled by default controllers"
// 'foo' means "enable 'foo'"
// '-foo' means "disable 'foo'"
// first item for a particular name wins
Controllers
[]
string
// externalCloudVolumePlugin specifies the plugin to use when cloudProvider is "external".
// It is currently used by the in repo cloud providers to handle node and volume control in the KCM.
ExternalCloudVolumePlugin
string
}
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
...
@@ -163,13 +149,8 @@ type KubeControllerManagerConfiguration struct {
...
@@ -163,13 +149,8 @@ type KubeControllerManagerConfiguration struct {
type
CloudControllerManagerConfiguration
struct
{
type
CloudControllerManagerConfiguration
struct
{
metav1
.
TypeMeta
`json:",inline"`
metav1
.
TypeMeta
`json:",inline"`
// CloudProviderConfiguration holds configuration for CloudProvider related features.
// Generic holds configuration for a generic controller-manager
CloudProvider
CloudProviderConfiguration
Generic
GenericControllerManagerConfiguration
// DebuggingConfiguration holds configuration for Debugging related features.
Debugging
apiserverconfigv1alpha1
.
DebuggingConfiguration
// GenericComponentConfiguration holds configuration for GenericComponent
// related features both in cloud controller manager and kube-controller manager.
GenericComponent
GenericComponentConfiguration
// KubeCloudSharedConfiguration holds configuration for shared related features
// KubeCloudSharedConfiguration holds configuration for shared related features
// both in cloud controller manager and kube-controller manager.
// both in cloud controller manager and kube-controller manager.
KubeCloudShared
KubeCloudSharedConfiguration
KubeCloudShared
KubeCloudSharedConfiguration
...
@@ -180,35 +161,37 @@ type CloudControllerManagerConfiguration struct {
...
@@ -180,35 +161,37 @@ type CloudControllerManagerConfiguration struct {
NodeStatusUpdateFrequency
metav1
.
Duration
NodeStatusUpdateFrequency
metav1
.
Duration
}
}
type
CloudProviderConfiguration
struct
{
type
GenericControllerManagerConfiguration
struct
{
// Name is the provider for cloud services.
// port is the port that the controller-manager's http service runs on.
Name
string
Port
int32
// cloudConfigFile is the path to the cloud provider configuration file.
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
CloudConfigFile
string
Address
string
}
type
GenericComponentConfiguration
struct
{
// minResyncPeriod is the resync period in reflectors; will be random between
// minResyncPeriod is the resync period in reflectors; will be random between
// minResyncPeriod and 2*minResyncPeriod.
// minResyncPeriod and 2*minResyncPeriod.
MinResyncPeriod
metav1
.
Duration
MinResyncPeriod
metav1
.
Duration
// contentType is contentType of requests sent to apiserver.
// ClientConnection specifies the kubeconfig file and client connection
ContentType
string
// settings for the proxy server to use when communicating with the apiserver.
// kubeAPIQPS is the QPS to use while talking with kubernetes apiserver.
ClientConnection
apimachineryconfigv1alpha1
.
ClientConnectionConfiguration
KubeAPIQPS
float32
// kubeAPIBurst is the burst to use while talking with kubernetes apiserver.
KubeAPIBurst
int32
// How long to wait between starting controller managers
// How long to wait between starting controller managers
ControllerStartInterval
metav1
.
Duration
ControllerStartInterval
metav1
.
Duration
// leaderElection defines the configuration of leader election client.
// leaderElection defines the configuration of leader election client.
LeaderElection
apiserverconfigv1alpha1
.
LeaderElectionConfiguration
LeaderElection
apiserverconfigv1alpha1
.
LeaderElectionConfiguration
// Controllers is the list of controllers to enable or disable
// '*' means "all enabled by default controllers"
// 'foo' means "enable 'foo'"
// '-foo' means "disable 'foo'"
// first item for a particular name wins
Controllers
[]
string
// DebuggingConfiguration holds configuration for Debugging related features.
Debugging
apiserverconfigv1alpha1
.
DebuggingConfiguration
}
}
type
KubeCloudSharedConfiguration
struct
{
type
KubeCloudSharedConfiguration
struct
{
// port is the port that the controller-manager's http service runs on.
// CloudProviderConfiguration holds configuration for CloudProvider related features.
Port
int32
CloudProvider
CloudProviderConfiguration
// address is the IP address to serve on (set to 0.0.0.0 for all interfaces).
// externalCloudVolumePlugin specifies the plugin to use when cloudProvider is "external".
Address
string
// It is currently used by the in repo cloud providers to handle node and volume control in the KCM.
ExternalCloudVolumePlugin
string
// useServiceAccountCredentials indicates whether controllers should be run with
// useServiceAccountCredentials indicates whether controllers should be run with
// individual service account credentials.
// individual service account credentials.
UseServiceAccountCredentials
bool
UseServiceAccountCredentials
bool
...
@@ -246,6 +229,13 @@ type AttachDetachControllerConfiguration struct {
...
@@ -246,6 +229,13 @@ type AttachDetachControllerConfiguration struct {
ReconcilerSyncLoopPeriod
metav1
.
Duration
ReconcilerSyncLoopPeriod
metav1
.
Duration
}
}
type
CloudProviderConfiguration
struct
{
// Name is the provider for cloud services.
Name
string
// cloudConfigFile is the path to the cloud provider configuration file.
CloudConfigFile
string
}
type
CSRSigningControllerConfiguration
struct
{
type
CSRSigningControllerConfiguration
struct
{
// clusterSigningCertFile is the filename containing a PEM-encoded
// clusterSigningCertFile is the filename containing a PEM-encoded
// X509 CA certificate used to issue cluster-scoped certificates
// X509 CA certificate used to issue cluster-scoped certificates
...
@@ -286,7 +276,7 @@ type DeprecatedControllerConfiguration struct {
...
@@ -286,7 +276,7 @@ type DeprecatedControllerConfiguration struct {
RegisterRetryCount
int32
RegisterRetryCount
int32
}
}
type
End
P
ointControllerConfiguration
struct
{
type
End
p
ointControllerConfiguration
struct
{
// concurrentEndpointSyncs is the number of endpoint syncing operations
// concurrentEndpointSyncs is the number of endpoint syncing operations
// that will be done concurrently. Larger number = faster endpoint updating,
// that will be done concurrently. Larger number = faster endpoint updating,
// but more CPU (and network) load.
// but more CPU (and network) load.
...
@@ -346,7 +336,7 @@ type NamespaceControllerConfiguration struct {
...
@@ -346,7 +336,7 @@ type NamespaceControllerConfiguration struct {
ConcurrentNamespaceSyncs
int32
ConcurrentNamespaceSyncs
int32
}
}
type
NodeI
pam
ControllerConfiguration
struct
{
type
NodeI
PAM
ControllerConfiguration
struct
{
// serviceCIDR is CIDR Range for Services in cluster.
// serviceCIDR is CIDR Range for Services in cluster.
ServiceCIDR
string
ServiceCIDR
string
// NodeCIDRMaskSize is the mask size for node cidr in cluster.
// NodeCIDRMaskSize is the mask size for node cidr in cluster.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment