Remove more non-configurable fields from v1alpha3 componentconfig

This commit is contained in:
John Gardiner Myers 2021-10-10 16:24:56 -07:00
parent 18f8b0149c
commit b2a55e3421
4 changed files with 13 additions and 36 deletions

View File

@ -3260,10 +3260,9 @@ spec:
maxPersistentVolumes: maxPersistentVolumes:
description: 'MaxPersistentVolumes changes the maximum number description: 'MaxPersistentVolumes changes the maximum number
of persistent volumes the scheduler will scheduler onto the of persistent volumes the scheduler will scheduler onto the
same node. Only takes into affect if value is positive. This same node. Only takes effect if value is positive. This corresponds
corresponds to the KUBE_MAX_PD_VOLS environment variable, which to the KUBE_MAX_PD_VOLS environment variable. The default depends
has been supported as far back as Kubernetes 1.7. The default on the version and the cloud provider as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/'
depends on the version and the cloud provider as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/'
format: int32 format: int32
type: integer type: integer
qps: qps:

View File

@ -698,8 +698,8 @@ type KubeSchedulerConfig struct {
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features. // FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"` FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
// MaxPersistentVolumes changes the maximum number of persistent volumes the scheduler will scheduler onto the same // MaxPersistentVolumes changes the maximum number of persistent volumes the scheduler will scheduler onto the same
// node. Only takes into affect if value is positive. This corresponds to the KUBE_MAX_PD_VOLS environment variable, // node. Only takes effect if value is positive. This corresponds to the KUBE_MAX_PD_VOLS environment variable.
// which has been supported as far back as Kubernetes 1.7. The default depends on the version and the cloud provider // The default depends on the version and the cloud provider
// as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/ // as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/
MaxPersistentVolumes *int32 `json:"maxPersistentVolumes,omitempty"` MaxPersistentVolumes *int32 `json:"maxPersistentVolumes,omitempty"`
// Qps sets the maximum qps to send to apiserver after the burst quota is exhausted // Qps sets the maximum qps to send to apiserver after the burst quota is exhausted

View File

@ -697,8 +697,8 @@ type KubeSchedulerConfig struct {
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features. // FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"` FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
// MaxPersistentVolumes changes the maximum number of persistent volumes the scheduler will scheduler onto the same // MaxPersistentVolumes changes the maximum number of persistent volumes the scheduler will scheduler onto the same
// node. Only takes into affect if value is positive. This corresponds to the KUBE_MAX_PD_VOLS environment variable, // node. Only takes effect if value is positive. This corresponds to the KUBE_MAX_PD_VOLS environment variable.
// which has been supported as far back as Kubernetes 1.7. The default depends on the version and the cloud provider // The default depends on the version and the cloud provider
// as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/ // as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/
MaxPersistentVolumes *int32 `json:"maxPersistentVolumes,omitempty"` MaxPersistentVolumes *int32 `json:"maxPersistentVolumes,omitempty"`
// Qps sets the maximum qps to send to apiserver after the burst quota is exhausted // Qps sets the maximum qps to send to apiserver after the burst quota is exhausted

View File

@ -527,8 +527,8 @@ type KubeControllerManagerConfig struct {
LogFormat string `json:"logFormat,omitempty" flag:"logging-format" flag-empty:"text"` LogFormat string `json:"logFormat,omitempty" flag:"logging-format" flag-empty:"text"`
// LogLevel is the defined logLevel // LogLevel is the defined logLevel
LogLevel int32 `json:"logLevel,omitempty" flag:"v" flag-empty:"0"` LogLevel int32 `json:"logLevel,omitempty" flag:"v" flag-empty:"0"`
// ServiceAccountPrivateKeyFile is the location of the private key for service account token signing. // ServiceAccountPrivateKeyFile is not admin-configurable.
ServiceAccountPrivateKeyFile string `json:"serviceAccountPrivateKeyFile,omitempty" flag:"service-account-private-key-file"` ServiceAccountPrivateKeyFile string `json:"-"`
// Image is the docker image to use // Image is the docker image to use
Image string `json:"image,omitempty"` Image string `json:"image,omitempty"`
// CloudProvider is the provider for cloud services. // CloudProvider is the provider for cloud services.
@ -547,8 +547,8 @@ type KubeControllerManagerConfig struct {
Controllers []string `json:"controllers,omitempty" flag:"controllers"` Controllers []string `json:"controllers,omitempty" flag:"controllers"`
// CIDRAllocatorType specifies the type of CIDR allocator to use. // CIDRAllocatorType specifies the type of CIDR allocator to use.
CIDRAllocatorType *string `json:"cidrAllocatorType,omitempty" flag:"cidr-allocator-type"` CIDRAllocatorType *string `json:"cidrAllocatorType,omitempty" flag:"cidr-allocator-type"`
// rootCAFile is the root certificate authority will be included in service account's token secret. This must be a valid PEM-encoded CA bundle. // RootCAFile is not admin-configurable.
RootCAFile string `json:"rootCAFile,omitempty" flag:"root-ca-file"` RootCAFile string `json:"-"`
// LeaderElection defines the configuration of leader election client. // LeaderElection defines the configuration of leader election client.
LeaderElection *LeaderElectionConfiguration `json:"leaderElection,omitempty"` LeaderElection *LeaderElectionConfiguration `json:"leaderElection,omitempty"`
// ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop // ReconcilerSyncLoopPeriod is the amount of time the reconciler sync states loop
@ -695,8 +695,8 @@ type KubeSchedulerConfig struct {
// FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features. // FeatureGates is set of key=value pairs that describe feature gates for alpha/experimental features.
FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"` FeatureGates map[string]string `json:"featureGates,omitempty" flag:"feature-gates"`
// MaxPersistentVolumes changes the maximum number of persistent volumes the scheduler will scheduler onto the same // MaxPersistentVolumes changes the maximum number of persistent volumes the scheduler will scheduler onto the same
// node. Only takes into affect if value is positive. This corresponds to the KUBE_MAX_PD_VOLS environment variable, // node. Only takes effect if value is positive. This corresponds to the KUBE_MAX_PD_VOLS environment variable.
// which has been supported as far back as Kubernetes 1.7. The default depends on the version and the cloud provider // The default depends on the version and the cloud provider
// as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/ // as outlined: https://kubernetes.io/docs/concepts/storage/storage-limits/
MaxPersistentVolumes *int32 `json:"maxPersistentVolumes,omitempty"` MaxPersistentVolumes *int32 `json:"maxPersistentVolumes,omitempty"`
// Qps sets the maximum qps to send to apiserver after the burst quota is exhausted // Qps sets the maximum qps to send to apiserver after the burst quota is exhausted
@ -1031,25 +1031,3 @@ type AWSLoadBalancerControllerConfig struct {
// Version is the container image tag used. // Version is the container image tag used.
Version *string `json:"version,omitempty"` Version *string `json:"version,omitempty"`
} }
// HasAdmissionController checks if a specific admission controller is enabled
func (c *KubeAPIServerConfig) HasAdmissionController(name string) bool {
for _, x := range c.AdmissionControl {
if x == name {
return true
}
}
for _, x := range c.DisableAdmissionPlugins {
if x == name {
return false
}
}
for _, x := range c.EnableAdmissionPlugins {
if x == name {
return true
}
}
return false
}