Skip to content

Commit

Permalink
Merge pull request #11605 from olemarkus/enable-aws-csi-by-default
Browse files Browse the repository at this point in the history
Enable AWS EBS CSI driver by default
  • Loading branch information
k8s-ci-robot authored May 27, 2021
2 parents 7a143b9 + 04b15e4 commit 46e1616
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/releases/1.22-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ spec:
authorization:
rbac: {}
channel: stable
cloudConfig:
awsEBSCSIDriver:
enabled: true
cloudProvider: aws
configBase: memfs://tests/minimal.example.com
etcdClusters:
Expand Down
12 changes: 12 additions & 0 deletions upup/pkg/fi/cloudup/new_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46e1616

Please sign in to comment.