|
15 | 15 | { |
16 | 16 | "Effect": "Allow", |
17 | 17 | "Principal": { |
18 | | - "Service": "ec2.amazonaws.com{{- if hasPrefix "cn-" .Values.awsRegion }}.cn{{- end }}" |
| 18 | + "Service": "ec2.amazonaws.com{{- if hasPrefix "cn-" (include "aws-region" .) }}.cn{{- end }}" |
19 | 19 | }, |
20 | 20 | "Action": "sts:AssumeRole" |
21 | 21 | } |
@@ -86,34 +86,35 @@ spec: |
86 | 86 | name: {{ include "resource.default.name" $ }} |
87 | 87 | --- |
88 | 88 | apiVersion: iam.aws.upbound.io/v1beta1 |
89 | | -kind: InstanceProfile |
| 89 | +kind: RolePolicyAttachment |
90 | 90 | metadata: |
91 | 91 | name: {{ include "resource.default.name" $ }}-worker |
92 | 92 | labels: |
93 | 93 | {{- include "labels.common" $ | nindent 4 }} |
94 | 94 | app.kubernetes.io/version: {{ .Chart.Version | quote }} |
95 | 95 | spec: |
96 | 96 | forProvider: |
97 | | - tags: |
98 | | - managed-by: "cluster-aws" |
99 | | - giantswarm.io/cluster: {{ include "resource.default.name" $ }} |
100 | | - giantswarm.io/installation: {{ .Values.global.managementCluster }} |
101 | | - {{- if .Values.global.providerSpecific.additionalResourceTags -}}{{- toYaml .Values.global.providerSpecific.additionalResourceTags | nindent 4 }}{{- end}} |
| 97 | + roleRef: |
| 98 | + name: {{ include "resource.default.name" $ }}-worker |
| 99 | + policyArnRef: |
| 100 | + name: {{ include "resource.default.name" $ }}-worker |
102 | 101 | providerConfigRef: |
103 | 102 | name: {{ include "resource.default.name" $ }} |
104 | 103 | --- |
105 | 104 | apiVersion: iam.aws.upbound.io/v1beta1 |
106 | | -kind: RolePolicyAttachment |
| 105 | +kind: InstanceProfile |
107 | 106 | metadata: |
108 | 107 | name: {{ include "resource.default.name" $ }}-worker |
109 | 108 | labels: |
110 | 109 | {{- include "labels.common" $ | nindent 4 }} |
111 | 110 | app.kubernetes.io/version: {{ .Chart.Version | quote }} |
112 | 111 | spec: |
113 | 112 | forProvider: |
114 | | - roleRef: |
115 | | - name: {{ include "resource.default.name" $ }}-worker |
116 | | - instanceProfileRef: |
117 | | - name: {{ include "resource.default.name" $ }}-worker |
| 113 | + role: {{ include "resource.default.name" $ }}-worker |
| 114 | + tags: |
| 115 | + managed-by: "cluster-aws" |
| 116 | + giantswarm.io/cluster: {{ include "resource.default.name" $ }} |
| 117 | + giantswarm.io/installation: {{ .Values.global.managementCluster }} |
| 118 | + {{- if .Values.global.providerSpecific.additionalResourceTags -}}{{- toYaml .Values.global.providerSpecific.additionalResourceTags | nindent 4 }}{{- end}} |
118 | 119 | providerConfigRef: |
119 | 120 | name: {{ include "resource.default.name" $ }} |
0 commit comments