From 2b69a01852f492a70e45f5b6bd598ea8644aa188 Mon Sep 17 00:00:00 2001 From: Aleksei Sizov Date: Fri, 9 Aug 2024 17:54:12 -0500 Subject: [PATCH] Make root volume size configurable --- templates/aws-hosted-cp/templates/awsmachinetemplate.yaml | 2 ++ templates/aws-hosted-cp/values.yaml | 1 + .../templates/awsmachinetemplate-controlplane.yaml | 2 ++ .../templates/awsmachinetemplate-worker.yaml | 2 ++ templates/aws-standalone-cp/values.schema.json | 8 ++++++++ templates/aws-standalone-cp/values.yaml | 2 ++ 6 files changed, 17 insertions(+) diff --git a/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml b/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml index 227946e40..b54567db8 100644 --- a/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml +++ b/templates/aws-hosted-cp/templates/awsmachinetemplate.yaml @@ -22,3 +22,5 @@ spec: sshKeyName: {{ .Values.sshKeyName | quote }} {{- end }} publicIP: {{ .Values.publicIP }} + rootVolume: + size: {{ .Values.rootVolumeSize }} diff --git a/templates/aws-hosted-cp/values.yaml b/templates/aws-hosted-cp/values.yaml index 70ebaa10f..bd9b4c591 100644 --- a/templates/aws-hosted-cp/values.yaml +++ b/templates/aws-hosted-cp/values.yaml @@ -23,6 +23,7 @@ amiID: "" iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io instanceType: "" securityGroupIDs: [] +rootVolumeSize: 8 # K0smotron parameters k0smotron: diff --git a/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml b/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml index 0c8dd1dcb..69246a0fa 100644 --- a/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml +++ b/templates/aws-standalone-cp/templates/awsmachinetemplate-controlplane.yaml @@ -18,3 +18,5 @@ spec: sshKeyName: {{ .Values.sshKeyName | quote }} {{- end }} publicIP: {{ .Values.publicIP }} + rootVolume: + size: {{ .Values.controlPlane.rootVolumeSize }} diff --git a/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml b/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml index 5d28a16e6..b22fc18ca 100644 --- a/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml +++ b/templates/aws-standalone-cp/templates/awsmachinetemplate-worker.yaml @@ -18,3 +18,5 @@ spec: sshKeyName: {{ .Values.sshKeyName | quote }} {{- end }} publicIP: {{ .Values.publicIP }} + rootVolume: + size: {{ .Values.worker.rootVolumeSize }} diff --git a/templates/aws-standalone-cp/values.schema.json b/templates/aws-standalone-cp/values.schema.json index 6bd605ef9..e62d6525e 100644 --- a/templates/aws-standalone-cp/values.schema.json +++ b/templates/aws-standalone-cp/values.schema.json @@ -88,6 +88,10 @@ "items": { "type": "string" } + }, + "rootVolumeSize": { + "description": "The size of the root volume of the instance (GB)", + "type": "integer" } } }, @@ -115,6 +119,10 @@ "additionalSecurityGroupIDs": { "description": "An array of references to security groups that should be applied to the instance", "type": "array" + }, + "rootVolumeSize": { + "description": "The size of the root volume of the instance (GB)", + "type": "integer" } } }, diff --git a/templates/aws-standalone-cp/values.yaml b/templates/aws-standalone-cp/values.yaml index 970480ac8..06cfaffe1 100644 --- a/templates/aws-standalone-cp/values.yaml +++ b/templates/aws-standalone-cp/values.yaml @@ -20,11 +20,13 @@ controlPlane: amiID: "" iamInstanceProfile: control-plane.cluster-api-provider-aws.sigs.k8s.io instanceType: "" + rootVolumeSize: 8 worker: amiID: "" iamInstanceProfile: nodes.cluster-api-provider-aws.sigs.k8s.io instanceType: "" + rootVolumeSize: 8 # K0s parameters k0s: