Skip to content

Commit

Permalink
Merge pull request #9704 from nckturner/aws-cloud-controller
Browse files Browse the repository at this point in the history
Add aws-cloud-controller-manager config to addons
  • Loading branch information
k8s-ci-robot authored Dec 2, 2020
2 parents 091f066 + c9feb36 commit 4435674
Show file tree
Hide file tree
Showing 13 changed files with 704 additions and 0 deletions.
3 changes: 3 additions & 0 deletions k8s/crds/kops.k8s.io_clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,9 @@ spec:
experimentalClusterSigningDuration:
description: ExperimentalClusterSigningDuration is the duration that determines the length of duration that the signed certificates will be given. (default 8760h0m0s)
type: string
externalCloudVolumePlugin:
description: ExternalCloudVolumePlugin is a fallback mechanism that allows a legacy, in-tree cloudprovider to be used for volume plugins even when an external cloud controller manager is being used. This can be used instead of installing CSI. The value should be the same as is used for the --cloud-provider flag, i.e. "aws".
type: string
featureGates:
additionalProperties:
type: string
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/kops/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@ type KubeControllerManagerConfig struct {
AuthorizationKubeconfig string `json:"authorizationKubeconfig,omitempty" flag:"authorization-kubeconfig"`
// AuthorizationAlwaysAllowPaths is the list of HTTP paths to skip during authorization
AuthorizationAlwaysAllowPaths []string `json:"authorizationAlwaysAllowPaths,omitempty" flag:"authorization-always-allow-paths"`
// ExternalCloudVolumePlugin is a fallback mechanism that allows a legacy, in-tree cloudprovider to be used for volume plugins
// even when an external cloud controller manager is being used. This can be used instead of installing CSI. The value should
// be the same as is used for the --cloud-provider flag, i.e. "aws".
ExternalCloudVolumePlugin string `json:"externalCloudVolumePlugin,omitempty" flag:"external-cloud-volume-plugin"`

// EnableProfiling enables profiling via web interface host:port/debug/pprof/
EnableProfiling *bool `json:"enableProfiling,omitempty" flag:"profiling"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/componentconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,8 @@ type KubeControllerManagerConfig struct {
AuthorizationKubeconfig string `json:"authorizationKubeconfig,omitempty" flag:"authorization-kubeconfig"`
// AuthorizationAlwaysAllowPaths is the list of HTTP paths to skip during authorization
AuthorizationAlwaysAllowPaths []string `json:"authorizationAlwaysAllowPaths,omitempty" flag:"authorization-always-allow-paths"`
// ExternalCloudVolumePlugin is a fallback mechanism that allows a legacy, in-tree cloudprovider to be used for volume plugins even when an external cloud controller manager is being used. This can be used instead of installing CSI. The value should be the same as is used for the --cloud-provider flag, i.e. "aws".
ExternalCloudVolumePlugin string `json:"externalCloudVolumePlugin,omitempty" flag:"external-cloud-volume-plugin"`

// EnableProfiling enables profiling via web interface host:port/debug/pprof/
EnableProfiling *bool `json:"enableProfiling,omitempty" flag:"profiling"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions pkg/model/components/kubecontrollermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ func (b *KubeControllerManagerOptionsBuilder) BuildOptions(o interface{}) error

if clusterSpec.ExternalCloudControllerManager != nil {
kcm.CloudProvider = "external"

// External cloud provider disables KCM volume controllers, so
// most users would want to either install CSI or pass
// --external-cloud-volume-plugin to the KCM, which runs the
// KCM volume controllers.
if kcm.ExternalCloudVolumePlugin == "" {
klog.Infof("An external cloud controller manager is configured, but ExternalCloudVolumePlugin is not configured for the KCM. This means a CSI plugin must be installed by the user or else volume management might not work.")
}
}

kcm.LogLevel = 2
Expand Down
184 changes: 184 additions & 0 deletions upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4435674

Please sign in to comment.