@@ -168,33 +168,35 @@ region = {{ .Values.aws.region }}
168
168
{ {- end -} }
169
169
{ {- end -} }
170
170
171
+
171
172
{ {- define " external-dns.azure-credentials" -} }
172
- {
173
- {{- if .Values.azure.cloud } }
174
- "cloud": "{ { .Values.azure.cloud } }",
175
- { {- end } }
176
- { {- if .Values.azure.tenantId } }
177
- "tenantId": "{ { .Values.azure.tenantId } }",
178
- { {- end } }
179
- { {- if .Values.azure.subscriptionId } }
180
- "subscriptionId": "{ { .Values.azure.subscriptionId } }",
181
- { {- end } }
182
- "resourceGroup": "{ { .Values.azure.resourceGroup } }",
183
- { {- if not (or .Values.azure.useManagedIdentityExtension .Values.azure.useWorkloadIdentityExtension) } }
184
- "aadClientId": "{ { .Values.azure.aadClientId } }",
185
- "aadClientSecret": "{ { .Values.azure.aadClientSecret } }"
186
- { {- end } }
187
- { {- if .Values.azure.useWorkloadIdentityExtension } }
188
- "useWorkloadIdentityExtension": true,
189
- { {- end } }
190
- { {- if and .Values.azure.useManagedIdentityExtension .Values.azure.userAssignedIdentityID } }
191
- "useManagedIdentityExtension": true,
192
- "userAssignedIdentityID": "{ { .Values.azure.userAssignedIdentityID } }"
193
- { {- else if and .Values.azure.useManagedIdentityExtension (not .Values.azure.userAssignedIdentityID) } }
194
- "useManagedIdentityExtension": true
195
- { {- end } }
196
- }
197
- { { end } }
173
+ { {- $credentials := dict -} }
174
+ { {- if .Values.azure.cloud -} }
175
+ { {- $_ := set $credentials " cloud" .Values.azure.cloud -} }
176
+ { {- end -} }
177
+ { {- if .Values.azure.tenantId -} }
178
+ { {- $_ := set $credentials " tenantId" .Values.azure.tenantId -} }
179
+ { {- end -} }
180
+ { {- if .Values.azure.subscriptionId -} }
181
+ { {- $_ := set $credentials " subscriptionId" .Values.azure.subscriptionId -} }
182
+ { {- end -} }
183
+ { {- $_ := set $credentials " resourceGroup" .Values.azure.resourceGroup -} }
184
+ { {- if not (or .Values.azure.useManagedIdentityExtension .Values.azure.useWorkloadIdentityExtension) -} }
185
+ { {- $_ := set $credentials " aadClientId" .Values.azure.aadClientId -} }
186
+ { {- $_ := set $credentials " aadClientSecret" .Values.azure.aadClientSecret -} }
187
+ { {- end -} }
188
+ { {- if .Values.azure.useWorkloadIdentityExtension -} }
189
+ { {- $_ := set $credentials " useWorkloadIdentityExtension" true -} }
190
+ { {- end -} }
191
+ { {- if and .Values.azure.useManagedIdentityExtension .Values.azure.userAssignedIdentityID -} }
192
+ { {- $_ := set $credentials " useManagedIdentityExtension" true -} }
193
+ { {- $_ := set $credentials " userAssignedIdentityID" .Values.azure.userAssignedIdentityID -} }
194
+ { {- else if and .Values.azure.useManagedIdentityExtension (not .Values.azure.userAssignedIdentityID) -} }
195
+ { {- $_ := set $credentials " useManagedIdentityExtension" true -} }
196
+ { {- end -} }
197
+ { {- $credentials | toJson -} }
198
+ { {- end -} }
199
+
198
200
{ {- define " external-dns.oci-credentials" -} }
199
201
{ {- if .Values.oci.useWorkloadIdentity } }
200
202
auth:
0 commit comments