Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update AWS CCM tags #12104

Merged
merged 3 commits into from
Sep 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pkg/model/components/awscloudcontrollermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,24 @@ func (b *AWSCloudControllerManagerOptionsBuilder) BuildOptions(o interface{}) er
return fmt.Errorf("no networking mode set")
}

if eccm.Image == "" {
var tag string
switch b.KubernetesVersion.Minor {
case 18:
tag = "v1.18.0-alpha.1"
case 19:
tag = "v1.19.0-alpha.1"
case 20:
tag = "v1.20.0-alpha.0"
case 21:
tag = "v1.21.0-alpha.0"
default:
// There is no latest tag, so default to the latest that exists
// See https://console.cloud.google.com/gcr/images/k8s-artifacts-prod/us/provider-aws/cloud-controller-manager
tag = "v1.22.0-alpha.0"
}
eccm.Image = fmt.Sprintf("k8s.gcr.io/provider-aws/cloud-controller-manager:%v", tag)
}

return nil
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ spec:
enabled: true
version: v1.2.0
manageStorageClasses: true
cloudControllerManager: {}
cloudControllerManager:
allocateNodeCIDRs: true
cloudProvider: aws
clusterCIDR: 172.20.0.0/16
clusterName: minimal.example.com
configureCloudRoutes: false
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
cloudProvider: aws
clusterAutoscaler:
awsUseStaticInstanceList: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ spec:
- args:
- --v=2
- --cloud-provider=aws
- --cluster-name=minimal.example.com
- --cluster-cidr=172.20.0.0/16
- --allocate-node-cidrs=true
- --configure-cloud-routes=false
- --use-service-account-credentials=true
- --cloud-config=/etc/kubernetes/cloud.config
env:
Expand All @@ -31,7 +35,7 @@ spec:
value: arn:aws-test:iam::123456789012:role/aws-cloud-controller-manager.kube-system.sa.minimal.example.com
- name: AWS_WEB_IDENTITY_TOKEN_FILE
value: /var/run/secrets/amazonaws.com/token
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:latest
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
imagePullPolicy: IfNotPresent
name: aws-cloud-controller-manager
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
role.kubernetes.io/networking: "1"
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: ed1e84215046c72cb056e9352a18c0f7616154e87338fd46f0fd64330850fc07
manifestHash: 21f67dfab1631085a7bf58b0627a53350c996ee471971ed02326893a3ba9b988
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
awsEBSCSIDriver:
enabled: true
cloudControllerManager:
provider: aws
cloudProvider: aws
cloudProvider: aws
configBase: memfs://clusters.example.com/minimal.example.com
etcdClusters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ spec:
enabled: true
version: v1.2.0
manageStorageClasses: true
cloudControllerManager: {}
cloudControllerManager:
allocateNodeCIDRs: true
cloudProvider: aws
clusterCIDR: 172.20.0.0/16
clusterName: minimal.example.com
configureCloudRoutes: false
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
cloudProvider: aws
clusterAutoscaler:
awsUseStaticInstanceList: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ spec:
- args:
- --v=2
- --cloud-provider=aws
- --cluster-name=minimal.example.com
- --cluster-cidr=172.20.0.0/16
- --allocate-node-cidrs=true
- --configure-cloud-routes=false
- --use-service-account-credentials=true
- --cloud-config=/etc/kubernetes/cloud.config
env:
- name: KUBERNETES_SERVICE_HOST
value: 127.0.0.1
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:latest
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.21.0-alpha.0
imagePullPolicy: IfNotPresent
name: aws-cloud-controller-manager
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ spec:
role.kubernetes.io/networking: "1"
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 19399435675417abed033f230cd7dc0f7e0f51a04a6430f7ff1ccc6b4ed41d2a
manifestHash: 1d3a554dad2c3190ab871ed36d310499783e89dbf355fc128e7e6a69d06d075d
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
awsEBSCSIDriver:
enabled: true
cloudControllerManager:
provider: aws
cloudProvider: aws
cloudProvider: aws
configBase: memfs://clusters.example.com/minimal.example.com
etcdClusters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
serviceAccountName: aws-cloud-controller-manager
containers:
- name: aws-cloud-controller-manager
image: {{ if .ExternalCloudControllerManager.Image }}{{ .ExternalCloudControllerManager.Image }}{{ else }}gcr.io/k8s-staging-provider-aws/cloud-controller-manager:{{AWSCCMTag}}{{ end }}
image: {{ .ExternalCloudControllerManager.Image }}
imagePullPolicy: IfNotPresent
args:
{{- range $arg := CloudControllerConfigArgv }}
Expand Down
23 changes: 0 additions & 23 deletions upup/pkg/fi/cloudup/template_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS

// will return openstack external ccm image location for current kubernetes version
dest["OpenStackCCMTag"] = tf.OpenStackCCMTag
dest["AWSCCMTag"] = tf.AWSCCMTag
dest["ProxyEnv"] = tf.ProxyEnv

dest["KopsSystemEnv"] = tf.KopsSystemEnv
Expand Down Expand Up @@ -659,28 +658,6 @@ func (tf *TemplateFunctions) OpenStackCCMTag() string {
return tag
}

// AWSCCMTag returns the correct tag for the cloud controller manager based on
// the Kubernetes Version
func (tf *TemplateFunctions) AWSCCMTag() (string, error) {
var tag string
parsed, err := util.ParseKubernetesVersion(tf.Cluster.Spec.KubernetesVersion)
if err != nil {
return "", fmt.Errorf("failed to parse Kubernetes version from cluster spec: %q", err)
}

// Update when we have stable releases
switch parsed.Minor {
case 18:
tag = "v1.18.0-alpha.1"
case 19:
tag = "v1.19.0-alpha.1"
default:
tag = "latest"
}

return tag, nil
}

// GetNodeInstanceGroups returns a map containing the defined instance groups of role "Node".
func (tf *TemplateFunctions) GetNodeInstanceGroups() map[string]kops.InstanceGroupSpec {
nodegroups := make(map[string]kops.InstanceGroupSpec)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
env:
- name: KUBERNETES_SERVICE_HOST
value: 127.0.0.1
image: gcr.io/k8s-staging-provider-aws/cloud-controller-manager:latest
image: k8s.gcr.io/provider-aws/cloud-controller-manager:v1.20.0-alpha.0
imagePullPolicy: IfNotPresent
name: aws-cloud-controller-manager
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ spec:
k8s-addon: storage-aws.addons.k8s.io
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 3928bc84d82fc372a0f5279d4cddbf2d59df6dd0c78460ac5ca7e446872fb42b
manifestHash: ef8dfd3eea151466da553999bd400f52f5017a6dc2b94e53ad8368600c6384c7
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down