Skip to content

Commit

Permalink
Merge pull request #204 from cookpad/ee/upgrade-1-19
Browse files Browse the repository at this point in the history
Initial 1.19 support upgrade
  • Loading branch information
ettiee authored Mar 29, 2021
2 parents b6ba534 + cf8dbc5 commit 8b749a9
Show file tree
Hide file tree
Showing 17 changed files with 237 additions and 158 deletions.
6 changes: 4 additions & 2 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@

## 1.18 -> 1.19

- [#195](https://github.com/cookpad/terraform-aws-eks/pull/195) upgrades `aws-alb-ingress-controller` to [`aws-load-balancer-controller`](https://github.com/cookpad/terraform-aws-eks/pull/195) (the project was renamed with the v2 release). Check the [upgrade guide for this project](https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.0/guide/upgrade/migrate_v1_v2/) if you are using `aws-alb-ingress-controller`, you may need to update your ingress definitions.
- [#203](https://github.com/cookpad/terraform-aws-eks/pull/203) removes `failure-domain.beta.kubernetes.io/zone` label which is deprecated in favour of `topology.kubernetes.io/zone`. Use the new label in any affinity specs.
[#195](https://github.com/cookpad/terraform-aws-eks/pull/195) upgrades `aws-alb-ingress-controller` to [`aws-load-balancer-controller`](https://github.com/cookpad/terraform-aws-eks/pull/195) (the project was renamed with the v2 release). Check the [upgrade guide for this project](https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.0/guide/upgrade/migrate_v1_v2/) if you are using `aws-alb-ingress-controller`, you may need to update your ingress definitions.
[#204](https://github.com/cookpad/terraform-aws-eks/pull/204) EKS no longer adds `kubernetes.io/cluster/<cluster-name>` to subnets. They will not be removed on upgrading to 1.19, but we recommend to codify the tags yourself for completeness if you are not using the vpc module and you want to keep using auto-discovery with eks-load-balancer-controller.
[#203](https://github.com/cookpad/terraform-aws-eks/pull/203) removes `failure-domain.beta.kubernetes.io/zone` label which is deprecated in favour of `topology.kubernetes.io/zone`. Use the new label in any affinity specs.


## 1.17 -> 1.18

Expand Down
1 change: 1 addition & 0 deletions examples/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ module "vpc" {
name = var.vpc_name
cidr_block = var.cidr_block
availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c"]
cluster_names = var.cluster_names
}
6 changes: 6 additions & 0 deletions examples/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ variable "cidr_block" {
type = string
default = "10.0.0.0/18"
}

variable "cluster_names" {
description = "Names of the EKS clusters deployed in this VPC."
type = list(string)
default = []
}
6 changes: 3 additions & 3 deletions hack/generate_addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ kustomize_build() {
}

helm_template eks aws-node-termination-handler 0.13.3
helm_template autoscaler cluster-autoscaler 1.0.4 -chart
helm_template autoscaler cluster-autoscaler 9.1
helm_template nvdp nvidia-device-plugin 0.8.2
helm_template eks aws-load-balancer-controller 1.1.5

curl -o $ADDONS_DIR/kustomize/overlays/metrics-server/resources/metrics-server.yaml -L https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.7/components.yaml
curl -o $ADDONS_DIR/kustomize/overlays/metrics-server/resources/metrics-server.yaml -L https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.4.2/components.yaml
kustomize_build metrics-server
curl -o $ADDONS_DIR/kustomize/overlays/aws-ebs-csi-driver/resources/crd_snapshotter.yaml -L https://raw.githubusercontent.com/kubernetes-sigs/aws-ebs-csi-driver/v0.7.0/deploy/kubernetes/cluster/crd_snapshotter.yaml
curl -o $ADDONS_DIR/kustomize/overlays/aws-ebs-csi-driver/resources/crd_snapshotter.yaml -L https://raw.githubusercontent.com/kubernetes-sigs/aws-ebs-csi-driver/v0.8.2/deploy/kubernetes/cluster/crd_snapshotter.yaml
kustomize_build aws-ebs-csi-driver
kustomize_build aws-load-balancer-controller-crds
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module "vpc" {
name = var.cluster_name
cidr_block = var.cidr_block
availability_zones = var.availability_zones
cluster_names = var.cluster_names
}

module "iam" {
Expand Down
2 changes: 1 addition & 1 deletion modules/asg_node_group/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ variable "cluster_config" {
}

variable "k8s_version" {
default = "1.18"
default = "1.19"
}

variable "name" {
Expand Down
14 changes: 7 additions & 7 deletions modules/cluster/addons/aws-load-balancer-controller.yaml

Large diffs are not rendered by default.

39 changes: 19 additions & 20 deletions modules/cluster/addons/cluster-autoscaler.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
# Source: cluster-autoscaler-chart/templates/podsecuritypolicy.yaml
# Source: cluster-autoscaler/templates/podsecuritypolicy.yaml
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: cluster-autoscaler
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
spec:
# Prevents running in privileged mode
privileged: false
Expand Down Expand Up @@ -43,14 +43,14 @@ spec:
max: 65535
readOnlyRootFilesystem: false
---
# Source: cluster-autoscaler-chart/templates/pdb.yaml
# Source: cluster-autoscaler/templates/pdb.yaml
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
spec:
selector:
Expand All @@ -60,26 +60,26 @@ spec:

maxUnavailable: 1
---
# Source: cluster-autoscaler-chart/templates/serviceaccount.yaml
# Source: cluster-autoscaler/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
annotations:
eks.amazonaws.com/role-arn: ${iam_role_arn}
---
# Source: cluster-autoscaler-chart/templates/clusterrole.yaml
# Source: cluster-autoscaler/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
rules:
- apiGroups:
Expand Down Expand Up @@ -218,14 +218,14 @@ rules:
verbs:
- use
---
# Source: cluster-autoscaler-chart/templates/clusterrolebinding.yaml
# Source: cluster-autoscaler/templates/clusterrolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -236,14 +236,14 @@ subjects:
name: cluster-autoscaler
namespace: kube-system
---
# Source: cluster-autoscaler-chart/templates/role.yaml
# Source: cluster-autoscaler/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
rules:
- apiGroups:
Expand All @@ -263,14 +263,14 @@ rules:
- get
- update
---
# Source: cluster-autoscaler-chart/templates/rolebinding.yaml
# Source: cluster-autoscaler/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -281,14 +281,14 @@ subjects:
name: cluster-autoscaler
namespace: kube-system
---
# Source: cluster-autoscaler-chart/templates/service.yaml
# Source: cluster-autoscaler/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
spec:
ports:
Expand All @@ -301,14 +301,14 @@ spec:
app.kubernetes.io/name: "aws-cluster-autoscaler"
type: "ClusterIP"
---
# Source: cluster-autoscaler-chart/templates/deployment.yaml
# Source: cluster-autoscaler/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/instance: "cluster-autoscaler"
app.kubernetes.io/name: "aws-cluster-autoscaler"
helm.sh/chart: "cluster-autoscaler-chart-1.0.4"
helm.sh/chart: "cluster-autoscaler-9.1.0"
name: cluster-autoscaler
spec:
replicas: 1
Expand All @@ -325,7 +325,7 @@ spec:
dnsPolicy: "ClusterFirst"
containers:
- name: aws-cluster-autoscaler
image: "us.gcr.io/k8s-artifacts-prod/autoscaling/cluster-autoscaler:v1.18.2"
image: "us.gcr.io/k8s-artifacts-prod/autoscaling/cluster-autoscaler:v1.19.1"
imagePullPolicy: "IfNotPresent"
command:
- ./cluster-autoscaler
Expand All @@ -339,7 +339,6 @@ spec:
- --skip-nodes-with-local-storage=false
- --stderrthreshold=info
- --v=4

env:
- name: AWS_REGION
value: "${aws_region}"
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster/addons/coredns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spec:
operator: "Exists"
containers:
- name: coredns
image: 602401143452.dkr.ecr.${aws_region}.amazonaws.com/eks/coredns:v1.7.0-eksbuild.1
image: 602401143452.dkr.ecr.${aws_region}.amazonaws.com/eks/coredns:v1.8.0-eksbuild.1
imagePullPolicy: IfNotPresent
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster/addons/helm/cluster-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extraArgs:
balance-similar-node-groups: true
image:
repository: us.gcr.io/k8s-artifacts-prod/autoscaling/cluster-autoscaler
tag: v1.18.2
tag: v1.19.1
fullnameOverride: cluster-autoscaler
nameOverride: aws-cluster-autoscaler
resources:
Expand Down
2 changes: 1 addition & 1 deletion modules/cluster/addons/kube-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ spec:
- /bin/sh
- -c
- kube-proxy --v=2 --config=/var/lib/kube-proxy-config/config
image: 602401143452.dkr.ecr.${aws_region}.amazonaws.com/eks/kube-proxy:v1.18.8-eksbuild.1
image: 602401143452.dkr.ecr.${aws_region}.amazonaws.com/eks/kube-proxy:v1.19.6-eksbuild.1
imagePullPolicy: IfNotPresent
name: kube-proxy
resources:
Expand Down
Loading

0 comments on commit 8b749a9

Please sign in to comment.