From f6d5c0897bb0addb987c92b96b181411ec08ea4b Mon Sep 17 00:00:00 2001 From: Jugwan Eom Date: Mon, 19 Jun 2023 06:35:13 +0000 Subject: [PATCH] cluster-api-aws: add additional nodegroup IAM role policy --- cluster-api-aws/Chart.yaml | 2 +- cluster-api-aws/templates/machine-pool.yaml | 4 ++++ cluster-api-aws/values.yaml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cluster-api-aws/Chart.yaml b/cluster-api-aws/Chart.yaml index 33141813..c172ef0e 100644 --- a/cluster-api-aws/Chart.yaml +++ b/cluster-api-aws/Chart.yaml @@ -4,6 +4,6 @@ description: A chart to install Kubernetes cluster using Cluster API Provider AW type: application -version: 0.8.2 +version: 0.8.3 appVersion: "1.0.0" diff --git a/cluster-api-aws/templates/machine-pool.yaml b/cluster-api-aws/templates/machine-pool.yaml index 0f6c4f5c..867c6a5a 100644 --- a/cluster-api-aws/templates/machine-pool.yaml +++ b/cluster-api-aws/templates/machine-pool.yaml @@ -53,6 +53,10 @@ spec: minSize: {{ .minSize }} remoteAccess: sshKeyName: {{ $envAll.Values.sshKeyName }} + {{- with .roleAdditionalPolicies }} + roleAdditionalPolicies: + {{- toYaml . | nindent 2 }} + {{- end }} {{- else }} kind: AWSMachinePool metadata: diff --git a/cluster-api-aws/values.yaml b/cluster-api-aws/values.yaml index 848b3127..64d803ff 100644 --- a/cluster-api-aws/values.yaml +++ b/cluster-api-aws/values.yaml @@ -79,6 +79,8 @@ machinePool: [] # size: 200 # subnets: [] # labels: [] +# roleAdditionalPolicies: +# - "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy" # **this version dosen't support the spot instance, because the aws cluster api provider doesn't support it in awsmachinpool** # useSpotInstance: #spotMarketOptions: # enabled: false