mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-09 19:16:56 +02:00
Provide config secret and use tpl function for providers and extraArgs
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
parent
00752b4b63
commit
4d67573e5b
@ -70,3 +70,6 @@ The following table lists the configurable parameters of the _ExternalDNS_ chart
|
|||||||
| `provider` | DNS provider where the DNS records will be created, for the available providers and how to configure them see the [README](https://github.com/kubernetes-sigs/external-dns#deploying-to-a-cluster). | `aws` |
|
| `provider` | DNS provider where the DNS records will be created, for the available providers and how to configure them see the [README](https://github.com/kubernetes-sigs/external-dns#deploying-to-a-cluster). | `aws` |
|
||||||
| `extraArgs` | Extra arguments to pass to the _external-dns_ container, these are needed for provider specific arguments. | `[]` |
|
| `extraArgs` | Extra arguments to pass to the _external-dns_ container, these are needed for provider specific arguments. | `[]` |
|
||||||
| `deploymentStrategy` | .spec.strategy of the external-dns Deployment. Defaults to 'Recreate' since multiple external-dns pods may conflict with each other. | `{type: Recreate}` |
|
| `deploymentStrategy` | .spec.strategy of the external-dns Deployment. Defaults to 'Recreate' since multiple external-dns pods may conflict with each other. | `{type: Recreate}` |
|
||||||
|
| `secretConfiguration.enabled` | Enable additional secret configuration | `{type: Recreate}` |
|
||||||
|
| `secretConfiguration.mountPath` | Mount path of secret configuration | `{type: Recreate}` |
|
||||||
|
| `secretConfiguration.data` | Additional secret configuration. Can be used to store dns provider credentials | `{type: Recreate}` |
|
||||||
|
@ -23,10 +23,15 @@ spec:
|
|||||||
{{- with .Values.podLabels }}
|
{{- with .Values.podLabels }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.podAnnotations }}
|
{{- if or .Values.secretConfiguration.enabled .Values.podAnnotations }}
|
||||||
annotations:
|
annotations:
|
||||||
|
{{- if .Values.secretConfiguration.enabled }}
|
||||||
|
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
{{- with .Values.imagePullSecrets }}
|
{{- with .Values.imagePullSecrets }}
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
@ -87,9 +92,9 @@ spec:
|
|||||||
{{- range .Values.domainFilters }}
|
{{- range .Values.domainFilters }}
|
||||||
- --domain-filter={{ . }}
|
- --domain-filter={{ . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
- --provider={{ .Values.provider }}
|
- --provider={{ tpl .Values.provider $ }}
|
||||||
{{- range .Values.extraArgs }}
|
{{- range .Values.extraArgs }}
|
||||||
- {{ . }}
|
- {{ tpl . $ }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@ -99,18 +104,31 @@ spec:
|
|||||||
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
{{- toYaml .Values.livenessProbe | nindent 12 }}
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
{{- toYaml .Values.readinessProbe | nindent 12 }}
|
||||||
{{- with .Values.extraVolumeMounts }}
|
{{- if or .Values.secretConfiguration.enabled .Values.extraVolumeMounts }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
{{- if .Values.secretConfiguration.enabled }}
|
||||||
|
- name: secrets
|
||||||
|
mountPath: {{ tpl .Values.secretConfiguration.mountPath $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraVolumeMounts }}
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.resources }}
|
{{- with .Values.resources }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml . | nindent 12 }}
|
{{- toYaml . | nindent 12 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.extraVolumes }}
|
{{- if or .Values.secretConfiguration.enabled .Values.extraVolumes }}
|
||||||
volumes:
|
volumes:
|
||||||
|
{{- if .Values.secretConfiguration.enabled }}
|
||||||
|
- name: secrets
|
||||||
|
secret:
|
||||||
|
secretName: {{ include "external-dns.fullname" . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.extraVolumes }}
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- with .Values.nodeSelector }}
|
{{- with .Values.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
13
charts/external-dns/templates/secret.yaml
Normal file
13
charts/external-dns/templates/secret.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{- if .Values.secretConfiguration.enabled }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ include "external-dns.fullname" . }}
|
||||||
|
namespace: {{ .Release.Namespace }}
|
||||||
|
labels:
|
||||||
|
{{- include "external-dns.labels" . | nindent 4 }}
|
||||||
|
data:
|
||||||
|
{{- range $key, $value := .Values.secretConfiguration.data }}
|
||||||
|
{{ $key }}: {{ tpl $value $ | b64enc | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
31
charts/external-dns/values.schema.json
Normal file
31
charts/external-dns/values.schema.json
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"provider": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"extraArgs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"secretConfiguration": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"mountPath": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"type": "object",
|
||||||
|
"patternProperties": {
|
||||||
|
".+": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -126,5 +126,10 @@ provider: aws
|
|||||||
|
|
||||||
extraArgs: []
|
extraArgs: []
|
||||||
|
|
||||||
|
secretConfiguration:
|
||||||
|
enabled: false
|
||||||
|
mountPath: /.aws/credentials
|
||||||
|
data: {}
|
||||||
|
|
||||||
deploymentStrategy:
|
deploymentStrategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
|
Loading…
Reference in New Issue
Block a user