Enable AWS EBS CSI driver by default

This commit is contained in:
Ole Markus With 2021-05-26 08:45:38 +02:00
parent a0f2d62f57
commit 04b15e404e
3 changed files with 17 additions and 0 deletions

View File

@ -6,6 +6,8 @@ This is a document to gather the release notes prior to the release.
# Significant changes
* New clusters running Kubernetes 1.22 will have AWS EBS CSI driver enabled by default.
# Breaking changes
* Support for Kubernetes versions 1.15 and 1.16 has been removed.

View File

@ -9,6 +9,9 @@ spec:
authorization:
rbac: {}
channel: stable
cloudConfig:
awsEBSCSIDriver:
enabled: true
cloudProvider: aws
configBase: memfs://tests/minimal.example.com
etcdClusters:

View File

@ -250,6 +250,18 @@ func NewCluster(opt *NewClusterOptions, clientset simple.Clientset) (*NewCluster
}
}
if api.CloudProviderID(cluster.Spec.CloudProvider) == api.CloudProviderAWS && cluster.IsKubernetesGTE("1.22") {
if cluster.Spec.CloudConfig == nil {
cluster.Spec.CloudConfig = &api.CloudConfiguration{}
}
if cluster.Spec.CloudConfig.AWSEBSCSIDriver == nil {
cluster.Spec.CloudConfig.AWSEBSCSIDriver = &api.AWSEBSCSIDriver{}
}
if cluster.Spec.CloudConfig.AWSEBSCSIDriver.Enabled == nil {
cluster.Spec.CloudConfig.AWSEBSCSIDriver.Enabled = fi.Bool(true)
}
}
err = setupVPC(opt, &cluster)
if err != nil {
return nil, err