Skip to content

Commit

Permalink
Bumped default Kubernetes version to v1.23 (#144)
Browse files Browse the repository at this point in the history
* Bumped default Kubernetes version to v1.23

Signed-off-by: Marcus Noble <[email protected]>

* Fixed immutable AWSMachineTemplate

Signed-off-by: Marcus Noble <[email protected]>

Signed-off-by: Marcus Noble <[email protected]>
  • Loading branch information
AverageMarcus authored Nov 3, 2022
1 parent bca8360 commit 2342c5e
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 52 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Bumped Kubernetes to v1.23

### Fixed

- Immutable AWSMachineTemplate

## [0.13.2] - 2022-11-03

### Fixed
Expand Down
46 changes: 23 additions & 23 deletions helm/cluster-aws/templates/_bastion.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,28 @@ This function is used for both the `.Spec` value and as the data for the hash fu
Any changes to this will trigger the resource to be recreated rather than attempting to update in-place.
*/}}
{{- define "bastion-awsmachinetemplate-spec" -}}
instanceType: {{ .Values.bastion.instanceType }}
cloudInit:
insecureSkipSecretsManager: true
imageLookupFormat: Flatcar-stable-*
imageLookupOrg: "{{ .Values.flatcarAWSAccount }}"
publicIP: true
sshKeyName: ""
subnet:
filters:
- name: tag:sigs.k8s.io/cluster-api-provider-aws/role
values:
- public
- name: tag:sigs.k8s.io/cluster-api-provider-aws/cluster/{{ include "resource.default.name" $ }}
values:
- owned
uncompressedUserData: true
template:
metadata:
labels:
cluster.x-k8s.io/role: bastion
{{- include "labels.common" $ | nindent 6 }}
spec:
instanceType: {{ .Values.bastion.instanceType }}
cloudInit:
insecureSkipSecretsManager: true
imageLookupFormat: Flatcar-stable-*
imageLookupOrg: "{{ .Values.flatcarAWSAccount }}"
publicIP: true
sshKeyName: ""
subnet:
filters:
- name: tag:sigs.k8s.io/cluster-api-provider-aws/role
values:
- public
- name: tag:sigs.k8s.io/cluster-api-provider-aws/cluster/{{ include "resource.default.name" $ }}
values:
- owned
uncompressedUserData: true
{{- end }}

{{- define "bastion" }}
Expand Down Expand Up @@ -82,11 +88,5 @@ metadata:
{{- include "labels.common" $ | nindent 4 }}
name: {{ include "resource.default.name" $ }}-bastion-{{ include "hash" (dict "data" (include "bastion-awsmachinetemplate-spec" $) "global" .) }}
namespace: {{ .Release.Namespace }}
spec:
template:
metadata:
labels:
cluster.x-k8s.io/role: bastion
{{- include "labels.common" $ | nindent 8 }}
spec: {{ include "bastion-awsmachinetemplate-spec" $ | nindent 6 }}
spec: {{ include "bastion-awsmachinetemplate-spec" $ | nindent 2 }}
{{- end -}}
56 changes: 28 additions & 28 deletions helm/cluster-aws/templates/_control_plane.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,33 @@ This function is used for both the `.Spec` value and as the data for the hash fu
Any changes to this will trigger the resource to be recreated rather than attempting to update in-place.
*/}}
{{- define "controlplane-awsmachinetemplate-spec" -}}
{{- include "ami" $ }}
cloudInit: {}
instanceType: {{ .Values.controlPlane.instanceType }}
nonRootVolumes:
- deviceName: /dev/xvdc
encrypted: true
size: {{ .Values.controlPlane.etcdVolumeSizeGB }}
type: gp3
- deviceName: /dev/xvdd
encrypted: true
size: {{ .Values.controlPlane.containerdVolumeSizeGB }}
type: gp3
- deviceName: /dev/xvde
encrypted: true
size: {{ .Values.controlPlane.kubeletVolumeSizeGB }}
type: gp3
rootVolume:
size: {{ .Values.controlPlane.rootVolumeSizeGB }}
type: gp3
iamInstanceProfile: control-plane-{{ include "resource.default.name" $ }}
sshKeyName: ""
template:
metadata:
labels:
cluster.x-k8s.io/role: control-plane
{{- include "labels.common" $ | nindent 6 }}
spec:
{{- include "ami" $ | nindent 4 }}
cloudInit: {}
instanceType: {{ .Values.controlPlane.instanceType }}
nonRootVolumes:
- deviceName: /dev/xvdc
encrypted: true
size: {{ .Values.controlPlane.etcdVolumeSizeGB }}
type: gp3
- deviceName: /dev/xvdd
encrypted: true
size: {{ .Values.controlPlane.containerdVolumeSizeGB }}
type: gp3
- deviceName: /dev/xvde
encrypted: true
size: {{ .Values.controlPlane.kubeletVolumeSizeGB }}
type: gp3
rootVolume:
size: {{ .Values.controlPlane.rootVolumeSizeGB }}
type: gp3
iamInstanceProfile: control-plane-{{ include "resource.default.name" $ }}
sshKeyName: ""
{{- end }}

{{- define "control-plane" }}
Expand Down Expand Up @@ -155,11 +161,5 @@ metadata:
{{- include "labels.common" $ | nindent 4 }}
name: {{ include "resource.default.name" $ }}-control-plane-{{ include "hash" (dict "data" (include "bastion-awsmachinetemplate-spec" $) "global" .) }}
namespace: {{ $.Release.Namespace }}
spec:
template:
metadata:
labels:
cluster.x-k8s.io/role: control-plane
{{- include "labels.common" $ | nindent 8 }}
spec: {{ include "controlplane-awsmachinetemplate-spec" $ | nindent 6 }}
spec: {{ include "controlplane-awsmachinetemplate-spec" $ | nindent 2 }}
{{- end -}}
2 changes: 1 addition & 1 deletion helm/cluster-aws/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
clusterName: "" # Cluster name. Defaults to chart release name
clusterDescription: "test" # Cluster description used in metadata.
organization: "" # Organization in which to create the cluster.
kubernetesVersion: 1.22.15
kubernetesVersion: 1.23.13
releaseVersion: 20.0.0-alpha1
baseDomain: "example.com"

Expand Down

0 comments on commit 2342c5e

Please sign in to comment.