Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of secret based AuthN/Z for Route53 #1422

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion chart/k8gb/templates/external-dns/external-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
- --txt-owner-id={{ include "k8gb.extdnsOwnerID" . }}
- --txt-prefix=k8gb-{{ .Values.k8gb.clusterGeoTag }}- # add custom prefix to TXT records, critical for Cloudflare NS record creation
- --provider={{ include "k8gb.extdnsProvider" . }}
{{- if .Values.route53.assumeRoleArn }}
{{- if and .Values.route53.assumeRoleArn (not .Values.route53.secret) }}
- --aws-assume-role={{ .Values.route53.assumeRoleArn }}
{{- end }}
{{ include "k8gb.extdnsProviderOpts" . }}
Expand All @@ -45,6 +45,19 @@ spec:
cpu: "500m"
securityContext:
readOnlyRootFilesystem: true
{{- if .Values.route53.secret }}
env:
- name: AWS_SHARED_CREDENTIALS_FILE
value: /.aws/credentials
volumeMounts:
- name: aws-credentials
mountPath: /.aws
readOnly: true
volumes:
- name: aws-credentials
secret:
secretName: {{ .Values.route53.secret }}
{{- end }}
{{- if .Values.rfc2136.rfc2136auth.gssTsig.enabled }}
volumeMounts:
- mountPath: /etc/krb5.conf
Expand Down
11 changes: 11 additions & 0 deletions chart/k8gb/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,17 @@
}
]
},
"secret": {
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"assumeRoleArn": {
"oneOf": [
{
Expand Down
4 changes: 4 additions & 0 deletions chart/k8gb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ route53:
irsaRole: arn:aws:iam::111111:role/external-dns
# -- specify IRSA Role in AWS ARN format for assume role permissions or disable it by setting to `null`
assumeRoleArn: null
# -- alternatively specify the secret name with static credentials for IAM user (make sure this user has limited privileges)
# this can be useful when IRSA is not present or when using say Azure cluster and Route53
# docs: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#create-iam-user-and-attach-the-policy
secret: null

ns1:
# -- Enable NS1 provider
Expand Down
Loading