diff --git a/hack/e2e-apps/external-dns.bats b/hack/e2e-apps/external-dns.bats new file mode 100644 index 00000000..ca114af8 --- /dev/null +++ b/hack/e2e-apps/external-dns.bats @@ -0,0 +1,50 @@ +#!/usr/bin/env bats + +teardown() { + kubectl -n tenant-test delete externaldns.apps.cozystack.io --all --ignore-not-found 2>/dev/null || true +} + +@test "Create and Verify ExternalDNS with inmemory provider" { + name='test' + kubectl apply -f - < + + + + + + + + + + + + + + + + + + + diff --git a/packages/extra/external-dns/templates/dashboard-resourcemap.yaml b/packages/extra/external-dns/templates/dashboard-resourcemap.yaml new file mode 100644 index 00000000..edd96b74 --- /dev/null +++ b/packages/extra/external-dns/templates/dashboard-resourcemap.yaml @@ -0,0 +1,23 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ .Release.Name }}-dashboard-resources +rules: +- apiGroups: + - helm.toolkit.fluxcd.io + resources: + - helmreleases + resourceNames: + - {{ .Release.Name }} + verbs: ["get", "list", "watch"] +--- +kind: RoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: {{ .Release.Name }}-dashboard-resources +subjects: +{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "admin" .Release.Namespace) }} +roleRef: + kind: Role + name: {{ .Release.Name }}-dashboard-resources + apiGroup: rbac.authorization.k8s.io diff --git a/packages/extra/external-dns/templates/external-dns.yaml b/packages/extra/external-dns/templates/external-dns.yaml new file mode 100644 index 00000000..cdfb8901 --- /dev/null +++ b/packages/extra/external-dns/templates/external-dns.yaml @@ -0,0 +1,169 @@ +{{- if not .Values.provider }} +{{- fail "provider is required: set it to one of cloudflare, aws, azure, google, digitalocean, linode, ovh, exoscale, godaddy, inmemory" }} +{{- end }} +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: {{ .Release.Name }}-system + labels: + app.kubernetes.io/instance: {{ .Release.Name }}-system + app.kubernetes.io/managed-by: {{ .Release.Service }} +spec: + chartRef: + kind: ExternalArtifact + name: cozystack-external-dns-application-default-external-dns-system + namespace: cozy-system + interval: 5m + timeout: 10m + install: + remediation: + retries: -1 + upgrade: + force: true + remediation: + retries: -1 + values: + external-dns: + namespaced: true + txtOwnerId: {{ .Release.Namespace | quote }} + policy: {{ .Values.policy | quote }} + {{- if .Values.annotationPrefix }} + annotationPrefix: {{ .Values.annotationPrefix | quote }} + {{- end }} + provider: + name: {{ .Values.provider | quote }} + sources: + - ingress + - service + {{- if .Values.gatewayAPI }} + - gateway-httproute + {{- end }} + {{- with .Values.domainFilters }} + domainFilters: + {{- toYaml . | nindent 8 }} + {{- end }} + + {{- /* Provider-specific credentials and config */}} + + {{- if eq .Values.provider "cloudflare" }} + {{- if or .Values.cloudflare.apiToken (and .Values.cloudflare.apiKey .Values.cloudflare.apiEmail) }} + env: + {{- if .Values.cloudflare.apiToken }} + - name: CF_API_TOKEN + value: {{ .Values.cloudflare.apiToken | quote }} + {{- else }} + - name: CF_API_KEY + value: {{ .Values.cloudflare.apiKey | quote }} + - name: CF_API_EMAIL + value: {{ .Values.cloudflare.apiEmail | quote }} + {{- end }} + {{- end }} + {{- if .Values.cloudflare.proxied }} + cloudflare: + proxied: true + {{- end }} + {{- end }} + + {{- if eq .Values.provider "aws" }} + {{- if or .Values.aws.accessKeyId .Values.aws.secretAccessKey .Values.aws.region }} + env: + {{- if .Values.aws.accessKeyId }} + - name: AWS_ACCESS_KEY_ID + value: {{ .Values.aws.accessKeyId | quote }} + {{- end }} + {{- if .Values.aws.secretAccessKey }} + - name: AWS_SECRET_ACCESS_KEY + value: {{ .Values.aws.secretAccessKey | quote }} + {{- end }} + {{- if .Values.aws.region }} + - name: AWS_DEFAULT_REGION + value: {{ .Values.aws.region | quote }} + {{- end }} + {{- end }} + {{- if .Values.aws.zoneType }} + aws: + zoneType: {{ .Values.aws.zoneType | quote }} + {{- end }} + {{- end }} + + {{- if eq .Values.provider "azure" }} + {{- if or .Values.azure.tenantId .Values.azure.subscriptionId .Values.azure.resourceGroup .Values.azure.aadClientId .Values.azure.aadClientSecret }} + azure: + tenantId: {{ .Values.azure.tenantId | quote }} + subscriptionId: {{ .Values.azure.subscriptionId | quote }} + resourceGroup: {{ .Values.azure.resourceGroup | quote }} + aadClientId: {{ .Values.azure.aadClientId | quote }} + aadClientSecret: {{ .Values.azure.aadClientSecret | quote }} + {{- end }} + {{- end }} + + {{- if eq .Values.provider "digitalocean" }} + {{- if .Values.digitalocean.token }} + env: + - name: DO_TOKEN + value: {{ .Values.digitalocean.token | quote }} + {{- end }} + {{- end }} + + {{- if eq .Values.provider "google" }} + {{- if or .Values.google.project .Values.google.serviceAccountKey }} + google: + project: {{ .Values.google.project | quote }} + {{- if .Values.google.serviceAccountKey }} + serviceAccountKey: {{ .Values.google.serviceAccountKey | quote }} + {{- end }} + {{- end }} + {{- end }} + + {{- if eq .Values.provider "linode" }} + {{- if .Values.linode.token }} + env: + - name: LINODE_TOKEN + value: {{ .Values.linode.token | quote }} + {{- end }} + {{- end }} + + {{- if eq .Values.provider "ovh" }} + {{- if or .Values.ovh.endpoint .Values.ovh.applicationKey .Values.ovh.applicationSecret .Values.ovh.consumerKey }} + env: + - name: OVH_ENDPOINT + value: {{ .Values.ovh.endpoint | quote }} + - name: OVH_APPLICATION_KEY + value: {{ .Values.ovh.applicationKey | quote }} + - name: OVH_APPLICATION_SECRET + value: {{ .Values.ovh.applicationSecret | quote }} + - name: OVH_CONSUMER_KEY + value: {{ .Values.ovh.consumerKey | quote }} + {{- end }} + {{- end }} + + {{- if eq .Values.provider "exoscale" }} + {{- if or .Values.exoscale.apiKey .Values.exoscale.apiSecret }} + env: + - name: EXOSCALE_API_KEY + value: {{ .Values.exoscale.apiKey | quote }} + - name: EXOSCALE_API_SECRET + value: {{ .Values.exoscale.apiSecret | quote }} + {{- end }} + {{- end }} + + {{- /* extraArgs: merge user-supplied args with provider-specific args (godaddy) */}} + {{- $godaddyArgs := list }} + {{- if eq .Values.provider "godaddy" }} + {{- if .Values.godaddy.apiKey }} + {{- $godaddyArgs = append $godaddyArgs (printf "--godaddy-api-key=%s" .Values.godaddy.apiKey) }} + {{- end }} + {{- if .Values.godaddy.apiSecret }} + {{- $godaddyArgs = append $godaddyArgs (printf "--godaddy-api-secret=%s" .Values.godaddy.apiSecret) }} + {{- end }} + {{- end }} + {{- $allArgs := concat (.Values.extraArgs | default list) $godaddyArgs }} + {{- with $allArgs }} + extraArgs: + {{- toYaml . | nindent 8 }} + {{- end }} + + {{- with (include "cozy-lib.resources.defaultingSanitize" (list .Values.resourcesPreset .Values.resources $)) }} + resources: + {{- . | nindent 8 }} + {{- end }} diff --git a/packages/extra/external-dns/values.schema.json b/packages/extra/external-dns/values.schema.json new file mode 100644 index 00000000..0ba69c9d --- /dev/null +++ b/packages/extra/external-dns/values.schema.json @@ -0,0 +1,193 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "annotationPrefix": { + "description": "Custom annotation prefix for external-dns (useful for running multiple instances).", + "type": "string", + "default": "" + }, + "aws": { + "description": "AWS Route53 provider credentials.", + "type": "object", + "default": { + "accessKeyId": "", + "region": "", + "secretAccessKey": "", + "zoneType": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "azure": { + "description": "Azure DNS provider credentials.", + "type": "object", + "default": { + "aadClientId": "", + "aadClientSecret": "", + "resourceGroup": "", + "subscriptionId": "", + "tenantId": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "cloudflare": { + "description": "Cloudflare provider credentials.", + "type": "object", + "default": { + "apiEmail": "", + "apiKey": "", + "apiToken": "", + "proxied": false + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "digitalocean": { + "description": "DigitalOcean DNS provider credentials.", + "type": "object", + "default": { + "token": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "domainFilters": { + "description": "List of domains this external-dns instance can manage.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "exoscale": { + "description": "Exoscale DNS provider credentials.", + "type": "object", + "default": { + "apiKey": "", + "apiSecret": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "extraArgs": { + "description": "Extra arguments for external-dns.", + "type": "array", + "default": [], + "items": { + "type": "string" + } + }, + "gatewayAPI": { + "description": "Enable Gateway API HTTPRoute as a source for DNS records.", + "type": "boolean", + "default": false + }, + "godaddy": { + "description": "GoDaddy DNS provider credentials.", + "type": "object", + "default": { + "apiKey": "", + "apiSecret": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "google": { + "description": "Google Cloud DNS provider credentials.", + "type": "object", + "default": { + "project": "", + "serviceAccountKey": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "linode": { + "description": "Linode DNS provider credentials.", + "type": "object", + "default": { + "token": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "ovh": { + "description": "OVH DNS provider credentials.", + "type": "object", + "default": { + "applicationKey": "", + "applicationSecret": "", + "consumerKey": "", + "endpoint": "" + }, + "x-kubernetes-preserve-unknown-fields": true + }, + "policy": { + "description": "How DNS records are synchronized.", + "type": "string", + "default": "upsert-only", + "enum": [ + "create-only", + "sync", + "upsert-only" + ] + }, + "provider": { + "description": "DNS provider name.", + "type": "string", + "enum": [ + "cloudflare", + "aws", + "azure", + "google", + "digitalocean", + "linode", + "ovh", + "exoscale", + "godaddy", + "inmemory" + ] + }, + "resources": { + "description": "Explicit CPU and memory configuration. When omitted, the preset defined in `resourcesPreset` is applied.", + "type": "object", + "default": {}, + "properties": { + "cpu": { + "description": "CPU available to each replica.", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "x-kubernetes-int-or-string": true + }, + "memory": { + "description": "Memory (RAM) available to each replica.", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], + "x-kubernetes-int-or-string": true + } + } + }, + "resourcesPreset": { + "description": "Default sizing preset used when `resources` is omitted.", + "type": "string", + "default": "nano", + "enum": [ + "nano", + "micro", + "small", + "medium", + "large", + "xlarge", + "2xlarge" + ] + } + } +} \ No newline at end of file diff --git a/packages/extra/external-dns/values.yaml b/packages/extra/external-dns/values.yaml new file mode 100644 index 00000000..c40d2dff --- /dev/null +++ b/packages/extra/external-dns/values.yaml @@ -0,0 +1,149 @@ +## +## @section Common parameters +## + +## @enum {string} Provider - DNS provider. +## @value cloudflare +## @value aws +## @value azure +## @value google +## @value digitalocean +## @value linode +## @value ovh +## @value exoscale +## @value godaddy +## @value inmemory + +## @param {Provider} provider - DNS provider name. +# provider: + +## @param {[]string} domainFilters - List of domains this external-dns instance can manage. +domainFilters: [] + +## @enum {string} Policy - How DNS records are synchronized. +## @value create-only +## @value sync +## @value upsert-only + +## @param {Policy} policy="upsert-only" - How DNS records are synchronized. +policy: "upsert-only" + +## @param {[]string} extraArgs - Extra arguments for external-dns. +extraArgs: [] + +## @param {bool} gatewayAPI=false - Enable Gateway API HTTPRoute as a source for DNS records. +gatewayAPI: false + +## @param {string} [annotationPrefix] - Custom annotation prefix for external-dns (useful for running multiple instances). +annotationPrefix: "" + +## +## @section Cloudflare +## + +## @param {object} cloudflare - Cloudflare provider credentials. +cloudflare: + apiToken: "" + apiKey: "" + apiEmail: "" + proxied: false + +## +## @section AWS +## + +## @param {object} aws - AWS Route53 provider credentials. +aws: + accessKeyId: "" + secretAccessKey: "" + region: "" + zoneType: "" + +## +## @section Azure +## + +## @param {object} azure - Azure DNS provider credentials. +azure: + tenantId: "" + subscriptionId: "" + resourceGroup: "" + aadClientId: "" + aadClientSecret: "" + +## +## @section Google +## + +## @param {object} google - Google Cloud DNS provider credentials. +google: + project: "" + serviceAccountKey: "" + +## +## @section DigitalOcean +## + +## @param {object} digitalocean - DigitalOcean DNS provider credentials. +digitalocean: + token: "" + +## +## @section Linode +## + +## @param {object} linode - Linode DNS provider credentials. +linode: + token: "" + +## +## @section OVH +## + +## @param {object} ovh - OVH DNS provider credentials. +ovh: + endpoint: "" + applicationKey: "" + applicationSecret: "" + consumerKey: "" + +## +## @section Exoscale +## + +## @param {object} exoscale - Exoscale DNS provider credentials. +exoscale: + apiKey: "" + apiSecret: "" + +## +## @section GoDaddy +## + +## @param {object} godaddy - GoDaddy DNS provider credentials. +godaddy: + apiKey: "" + apiSecret: "" + +## +## @section Resources +## + +## @typedef {struct} Resources - Explicit CPU and memory configuration. +## @field {quantity} [cpu] - CPU available to each replica. +## @field {quantity} [memory] - Memory (RAM) available to each replica. + +## @enum {string} ResourcesPreset - Default sizing preset. +## @value nano +## @value micro +## @value small +## @value medium +## @value large +## @value xlarge +## @value 2xlarge + +## @param {Resources} [resources] - Explicit CPU and memory configuration. When omitted, the preset defined in `resourcesPreset` is applied. +resources: {} + +## @param {ResourcesPreset} resourcesPreset="nano" - Default sizing preset used when `resources` is omitted. +resourcesPreset: "nano" diff --git a/packages/system/external-dns-rd/Chart.yaml b/packages/system/external-dns-rd/Chart.yaml new file mode 100644 index 00000000..b9575cd8 --- /dev/null +++ b/packages/system/external-dns-rd/Chart.yaml @@ -0,0 +1,3 @@ +apiVersion: v2 +name: external-dns-rd +version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process diff --git a/packages/system/external-dns-rd/Makefile b/packages/system/external-dns-rd/Makefile new file mode 100644 index 00000000..4abb36a6 --- /dev/null +++ b/packages/system/external-dns-rd/Makefile @@ -0,0 +1,4 @@ +export NAME=external-dns-rd +export NAMESPACE=cozy-system + +include ../../../hack/package.mk diff --git a/packages/system/external-dns-rd/cozyrds/external-dns.yaml b/packages/system/external-dns-rd/cozyrds/external-dns.yaml new file mode 100644 index 00000000..8792ca88 --- /dev/null +++ b/packages/system/external-dns-rd/cozyrds/external-dns.yaml @@ -0,0 +1,24 @@ +apiVersion: cozystack.io/v1alpha1 +kind: ApplicationDefinition +metadata: + name: external-dns +spec: + application: + kind: ExternalDNS + plural: externaldns + singular: externaldns + openAPISchema: |- + {"title":"Chart Values","type":"object","properties":{"annotationPrefix":{"description":"Custom annotation prefix for external-dns (useful for running multiple instances).","type":"string","default":""},"aws":{"description":"AWS Route53 provider credentials.","type":"object","default":{"accessKeyId":"","region":"","secretAccessKey":"","zoneType":""},"x-kubernetes-preserve-unknown-fields":true},"azure":{"description":"Azure DNS provider credentials.","type":"object","default":{"aadClientId":"","aadClientSecret":"","resourceGroup":"","subscriptionId":"","tenantId":""},"x-kubernetes-preserve-unknown-fields":true},"cloudflare":{"description":"Cloudflare provider credentials.","type":"object","default":{"apiEmail":"","apiKey":"","apiToken":"","proxied":false},"x-kubernetes-preserve-unknown-fields":true},"digitalocean":{"description":"DigitalOcean DNS provider credentials.","type":"object","default":{"token":""},"x-kubernetes-preserve-unknown-fields":true},"domainFilters":{"description":"List of domains this external-dns instance can manage.","type":"array","default":[],"items":{"type":"string"}},"exoscale":{"description":"Exoscale DNS provider credentials.","type":"object","default":{"apiKey":"","apiSecret":""},"x-kubernetes-preserve-unknown-fields":true},"extraArgs":{"description":"Extra arguments for external-dns.","type":"array","default":[],"items":{"type":"string"}},"gatewayAPI":{"description":"Enable Gateway API HTTPRoute as a source for DNS records.","type":"boolean","default":false},"godaddy":{"description":"GoDaddy DNS provider credentials.","type":"object","default":{"apiKey":"","apiSecret":""},"x-kubernetes-preserve-unknown-fields":true},"google":{"description":"Google Cloud DNS provider credentials.","type":"object","default":{"project":"","serviceAccountKey":""},"x-kubernetes-preserve-unknown-fields":true},"linode":{"description":"Linode DNS provider credentials.","type":"object","default":{"token":""},"x-kubernetes-preserve-unknown-fields":true},"ovh":{"description":"OVH DNS provider credentials.","type":"object","default":{"applicationKey":"","applicationSecret":"","consumerKey":"","endpoint":""},"x-kubernetes-preserve-unknown-fields":true},"policy":{"description":"How DNS records are synchronized.","type":"string","default":"upsert-only","enum":["create-only","sync","upsert-only"]},"provider":{"description":"DNS provider name.","type":"string","enum":["cloudflare","aws","azure","google","digitalocean","linode","ovh","exoscale","godaddy","inmemory"]},"resources":{"description":"Explicit CPU and memory configuration. When omitted, the preset defined in `resourcesPreset` is applied.","type":"object","default":{},"properties":{"cpu":{"description":"CPU available to each replica.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"memory":{"description":"Memory (RAM) available to each replica.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true}}},"resourcesPreset":{"description":"Default sizing preset used when `resources` is omitted.","type":"string","default":"nano","enum":["nano","micro","small","medium","large","xlarge","2xlarge"]}}} + release: + prefix: "" + chartRef: + kind: ExternalArtifact + name: cozystack-external-dns-application-default-external-dns + namespace: cozy-system + dashboard: + category: Networking + singular: External DNS + plural: External DNS + description: External DNS for automatic DNS record management + icon: PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNDQgMTQ0IiB3aWR0aD0iMTQ0IiBoZWlnaHQ9IjE0NCI+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9ImJnIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjEwMCUiIHkyPSIxMDAlIj4KICAgICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3R5bGU9InN0b3AtY29sb3I6IzNCODJGNiIvPgogICAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0eWxlPSJzdG9wLWNvbG9yOiMxRDRFRDgiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxNDQiIGhlaWdodD0iMTQ0IiByeD0iMjgiIGZpbGw9InVybCgjYmcpIi8+CiAgPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNzIsNzIpIiBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iNCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj4KICAgIDwhLS0gR2xvYmUgLS0+CiAgICA8Y2lyY2xlIGN4PSIwIiBjeT0iLTQiIHI9IjMyIi8+CiAgICA8ZWxsaXBzZSBjeD0iMCIgY3k9Ii00IiByeD0iMTQiIHJ5PSIzMiIvPgogICAgPGxpbmUgeDE9Ii0zMiIgeTE9Ii00IiB4Mj0iMzIiIHkyPSItNCIvPgogICAgPHBhdGggZD0iTS0yOCwxMiBRMCwxOCAyOCwxMiIvPgogICAgPHBhdGggZD0iTS0yOCwtMjAgUTAsLTE0IDI4LC0yMCIvPgogICAgPCEtLSBBcnJvdyBwb2ludGluZyBvdXQgLS0+CiAgICA8bGluZSB4MT0iMTgiIHkxPSIxOCIgeDI9IjM2IiB5Mj0iMzYiLz4KICAgIDxwb2x5bGluZSBwb2ludHM9IjI4LDM2IDM2LDM2IDM2LDI4Ii8+CiAgPC9nPgo8L3N2Zz4K + keysOrder: [["apiVersion"], ["appVersion"], ["kind"], ["metadata"], ["metadata", "name"], ["spec", "domainFilters"], ["spec", "policy"], ["spec", "extraArgs"], ["spec", "gatewayAPI"], ["spec", "annotationPrefix"], ["spec", "cloudflare"], ["spec", "cloudflare", "apiToken"], ["spec", "cloudflare", "apiKey"], ["spec", "cloudflare", "apiEmail"], ["spec", "cloudflare", "proxied"], ["spec", "aws"], ["spec", "aws", "accessKeyId"], ["spec", "aws", "secretAccessKey"], ["spec", "aws", "region"], ["spec", "aws", "zoneType"], ["spec", "azure"], ["spec", "azure", "tenantId"], ["spec", "azure", "subscriptionId"], ["spec", "azure", "resourceGroup"], ["spec", "azure", "aadClientId"], ["spec", "azure", "aadClientSecret"], ["spec", "google"], ["spec", "google", "project"], ["spec", "google", "serviceAccountKey"], ["spec", "digitalocean"], ["spec", "digitalocean", "token"], ["spec", "linode"], ["spec", "linode", "token"], ["spec", "ovh"], ["spec", "ovh", "endpoint"], ["spec", "ovh", "applicationKey"], ["spec", "ovh", "applicationSecret"], ["spec", "ovh", "consumerKey"], ["spec", "exoscale"], ["spec", "exoscale", "apiKey"], ["spec", "exoscale", "apiSecret"], ["spec", "godaddy"], ["spec", "godaddy", "apiKey"], ["spec", "godaddy", "apiSecret"], ["spec", "resources"], ["spec", "resourcesPreset"]] diff --git a/packages/system/external-dns-rd/templates/cozyrd.yaml b/packages/system/external-dns-rd/templates/cozyrd.yaml new file mode 100644 index 00000000..e079ddcf --- /dev/null +++ b/packages/system/external-dns-rd/templates/cozyrd.yaml @@ -0,0 +1,4 @@ +{{- range $path, $_ := .Files.Glob "cozyrds/*" }} +--- +{{ $.Files.Get $path }} +{{- end }} diff --git a/packages/system/external-dns-rd/values.yaml b/packages/system/external-dns-rd/values.yaml new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/packages/system/external-dns-rd/values.yaml @@ -0,0 +1 @@ +{} diff --git a/packages/system/external-dns/charts/external-dns/.helmignore b/packages/system/external-dns/charts/external-dns/.helmignore index 0e8a0eb3..e951b6fb 100644 --- a/packages/system/external-dns/charts/external-dns/.helmignore +++ b/packages/system/external-dns/charts/external-dns/.helmignore @@ -21,3 +21,7 @@ .idea/ *.tmproj .vscode/ +ci/ +schema/ +.schema.yaml +tests/ diff --git a/packages/system/external-dns/charts/external-dns/CHANGELOG.md b/packages/system/external-dns/charts/external-dns/CHANGELOG.md index 02b467e1..6b2401c2 100644 --- a/packages/system/external-dns/charts/external-dns/CHANGELOG.md +++ b/packages/system/external-dns/charts/external-dns/CHANGELOG.md @@ -18,11 +18,117 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UNRELEASED] -## [v1.15.0] - 2023-09-10 +## [v1.20.0] + +### Added + +- Add option to set `annotationPrefix` ([#5889](https://github.com/kubernetes-sigs/external-dns/pull/5889)) _@lexfrei_ ### Changed -- Updated _ExternalDNS_ OCI image version to [v0.15.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.15.0). ([#xxxx](https://github.com/kubernetes-sigs/external-dns/pull/xxxx)) _@stevehipwell_ +- Grant `networking.k8s.io/ingresses` and `gateway.solo.io/gateways` permissions when using `gloo-proxy` source. ([#5909](https://github.com/kubernetes-sigs/external-dns/pull/5909)) _@cucxabong_ +- Update _ExternalDNS_ OCI image version to [v0.20.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.20.0). ([#6005](https://github.com/kubernetes-sigs/external-dns/pull/6005)) _@vflaux_ + +### Fixed + +- Fixed the missing schema for `.provider.webhook.serviceMonitor` configs ([#5932](https://github.com/kubernetes-sigs/external-dns/pull/5932)) _@chrisbsmith_ +- Fixed incorrect indentation of selector labels under `spec.template.spec.topologySpreadConstraints` when `topologySpreadConstraints` is set. ([#6054](https://github.com/kubernetes-sigs/external-dns/pull/6054)) _@andylim0221_ + +## [v1.19.0] - 2025-09-08 + +### Added + +- Add option to configure `annotationFilter` via dedicated chart value. ([#5737](https://github.com/kubernetes-sigs/external-dns/pull/5737)) _@dshatokhin_ + +### Changed + +- Grant `discovery.k8s.io/endpointslices` permission only when using `service` source. ([#5746](https://github.com/kubernetes-sigs/external-dns/pull/5746)) _@vflaux_ +- Update _ExternalDNS_ OCI image version to [v0.19.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.19.0). ([#5819](https://github.com/kubernetes-sigs/external-dns/pull/5819)) _@stevehipwell_ + +## [v1.18.0] - 2025-07-14 + +### Changed + +- Update RBAC for `Service` source to support `EndpointSlices`. ([#5493](https://github.com/kubernetes-sigs/external-dns/pull/5493)) _@vflaux_ +- Update _ExternalDNS_ OCI image version to [v0.18.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.18.0). ([#5633](https://github.com/kubernetes-sigs/external-dns/pull/5633)) _@elafarge_ + +### Fixed + +- Fixed the lack of schema support for `create-only` dns policy in helm values ([#5627](https://github.com/kubernetes-sigs/external-dns/pull/5627)) _@coltonhughes_ +- Fixed the type of `.extraContainers` from `object` to `list` (array). ([#5564](https://github.com/kubernetes-sigs/external-dns/pull/5564)) _@svengreb_ + +## [v1.17.0] - 2025-06-04 + +### Changed + +- Allow extraArgs to also be a map enabling overrides of individual values. ([#5293](https://github.com/kubernetes-sigs/external-dns/pull/5293)) _@frittentheke_ +- Update CRD. ([#5287](https://github.com/kubernetes-sigs/external-dns/pull/5287)) _@mloiseleur_ +- Update CRD. ([#5446](https://github.com/kubernetes-sigs/external-dns/pull/5446)) _@mloiseleur_ +- Update _ExternalDNS_ OCI image version to [v0.17.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.17.0). ([#5479](https://github.com/kubernetes-sigs/external-dns/pull/5479)) _@stevehipwell_ + +### Fixed + +- Fix wrong type definitions for webhook probes. ([#5297](https://github.com/kubernetes-sigs/external-dns/pull/5297)) _@semnell_ +- Update schema with latest plugin release. ([#5510](https://github.com/kubernetes-sigs/external-dns/pull/5510)) _@mloiseleur + +## [v1.16.1] - 2025-04-10 + +### Changed + +- Set defaults for `automountServiceAccountToken` and `serviceAccount.automountServiceAccountToken` to `true` in Helm chart values. ([#5207](https://github.com/kubernetes-sigs/external-dns/pull/5207)) _@t3mi_ + +### Fixed + +- Correctly handle `txtPrefix` and `txtSuffix` arguments when both are provided. ([#5250](https://github.com/kubernetes-sigs/external-dns/pull/5250)) _@ivankatliarchuk_ +- Add missing types in the schema for empty values. ([#5228](https://github.com/kubernetes-sigs/external-dns/pull/5228)) _@ivankatliarchuk_ +- Add missing types in the schema for empty values. ([#5207](https://github.com/kubernetes-sigs/external-dns/pull/5207)) _@t3mi_ + +## [v1.16.0] - 2025-03-20 + +### Added + +- Add helm testing framework `helm plugin unittest`. ([#5137](https://github.com/kubernetes-sigs/external-dns/pull/5137)) _@ivankatliarchuk_ +- Add ability to generate schema with `helm plugin schema`. ([#5075](https://github.com/kubernetes-sigs/external-dns/pull/5075)) _@ivankatliarchuk_ +- Add `docs/contributing/dev-guide.md#helm-values` guide. ([#5075](https://github.com/kubernetes-sigs/external-dns/pull/5075)) _@ivankatliarchuk_ + +### Changed + +- Regenerate JSON schema with `helm-values-schema-json' plugin. ([#5075](https://github.com/kubernetes-sigs/external-dns/pull/5075)) _@ivankatliarchuk_ +- Update _ExternalDNS_ OCI image version to [v0.16.1](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.16.1). ([#5201](https://github.com/kubernetes-sigs/external-dns/pull/5201)) _@stevehipwell_ + +## [v1.15.2] - 2025-02-14 + +### Changed + +- Added `transportservers` resource to ClusterRole when specifying `f5-transportserver` or `f5-virtualserver` as a source. ([#5066](https://github.com/kubernetes-sigs/external-dns/pull/5066)) _@visokoo_ + +### Fixed + +- Fixed handling of non-string types in `serviceAccount.metadata.annotations` field. ([#5067](https://github.com/kubernetes-sigs/external-dns/pull/5067)) _@hjoshi123_ +- Fixed regression where `affinity.nodeAffinity` was being ignored. ([#5046](https://github.com/kubernetes-sigs/external-dns/pull/5046)) _@mkhpalm_ + +## [v1.15.1] - 2025-01-27 + +### Added + +- Added ability to configure `imagePullSecrets` via helm `global` value. ([#4667](https://github.com/kubernetes-sigs/external-dns/pull/4667)) _@jkroepke_ +- Added options to configure `labelFilter` and `managedRecordTypes` via dedicated helm values. ([#4849](https://github.com/kubernetes-sigs/external-dns/pull/4849)) _@abaguas_ + +### Changed + +- Allow templating `serviceaccount.annotations` keys and values, by rendering them using the `tpl` built-in function. ([#4958](https://github.com/kubernetes-sigs/external-dns/pull/4958)) _@fcrespofastly_ +- Updated _ExternalDNS_ OCI image version to [v0.15.1](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.15.1). ([#5028](https://github.com/kubernetes-sigs/external-dns/pull/5028)) _@stevehipwell_ + +### Fixed + +- Fixed automatic addition of pod selector labels to `affinity` and `topologySpreadConstraints` if not defined. ([#4666](https://github.com/kubernetes-sigs/external-dns/pull/4666)) _@pvickery-ParamountCommerce_ +- Fixed missing Ingress permissions when using Istio sources. ([#4845](https://github.com/kubernetes-sigs/external-dns/pull/4845)) _@joekhoobyar_ + +## [v1.15.0] - 2024-09-11 + +### Changed + +- Updated _ExternalDNS_ OCI image version to [v0.15.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.15.0). ([#4735](https://github.com/kubernetes-sigs/external-dns/pull/4735)) _@stevehipwell_ ### Fixed @@ -31,7 +137,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed to add correct webhook metric port to `Service` and `ServiceMonitor`. ([#4643](https://github.com/kubernetes-sigs/external-dns/pull/4643)) _@kimsondrup_ - Fixed to no longer require the unauthenticated webhook provider port to be exposed for health probes. ([#4691](https://github.com/kubernetes-sigs/external-dns/pull/4691)) _@kimsondrup_ & _@hatrx_ -## [v1.14.5] - 2023-06-10 +## [v1.14.5] - 2024-06-10 ### Added @@ -48,7 +154,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed the `ServiceMonitor` job name to correctly use the instance label. ([#4541](https://github.com/kubernetes-sigs/external-dns/pull/4541)) _@stevehipwell_ -## [v1.14.4] - 2023-04-03 +## [v1.14.4] - 2024-04-05 ### Added @@ -59,7 +165,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated _ExternalDNS_ OCI image version to [v0.14.1](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.14.1). ([#4357](https://github.com/kubernetes-sigs/external-dns/pull/4357)) _@stevehipwell_ -## [v1.14.3] - 2023-01-26 +## [v1.14.3] - 2024-01-26 ### Fixed @@ -73,7 +179,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Restore template support in `.Values.provider` and `.Values.provider.name` -## [v1.14.1] - 2024-01-11 +## [v1.14.1] - 2024-01-12 ### Fixed @@ -97,7 +203,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The `secretConfiguration` value has been deprecated in favour of creating secrets external to the Helm chart and configuring their use via the `extraVolumes` & `extraVolumeMounts` values. ([#4161](https://github.com/kubernetes-sigs/external-dns/pull/4161)) [@stevehipwell](https://github.com/stevehipwell) -## [v1.13.1] - 2023-09-07 +## [v1.13.1] - 2023-09-08 ### Added @@ -200,6 +306,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 RELEASE LINKS --> [UNRELEASED]: https://github.com/kubernetes-sigs/external-dns/tree/master/charts/external-dns +[v1.20.0]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.20.0 +[v1.19.0]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.19.0 +[v1.18.0]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.18.0 +[v1.17.0]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.17.0 +[v1.16.1]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.16.1 +[v1.16.0]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.16.0 +[v1.15.2]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.15.2 +[v1.15.1]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.15.1 [v1.15.0]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.15.0 [v1.14.5]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.14.5 [v1.14.4]: https://github.com/kubernetes-sigs/external-dns/releases/tag/external-dns-helm-chart-1.14.4 diff --git a/packages/system/external-dns/charts/external-dns/Chart.yaml b/packages/system/external-dns/charts/external-dns/Chart.yaml index c7245bd1..a03ace4e 100644 --- a/packages/system/external-dns/charts/external-dns/Chart.yaml +++ b/packages/system/external-dns/charts/external-dns/Chart.yaml @@ -1,28 +1,30 @@ annotations: - artifacthub.io/changes: | + artifacthub.io/changes: |- + - kind: added + description: "Add option to set annotationPrefix (#5889) @lexfrei." - kind: changed - description: "Updated _ExternalDNS_ OCI image version to [v0.15.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.15.0)." + description: "Grant networking.k8s.io/ingresses and gateway.solo.io/gateways permissions when using gloo-proxy source." + - kind: changed + description: "Update ExternalDNS OCI image version to v0.20.0." - kind: fixed - description: "Fixed `provider.webhook.resources` behavior to correctly leverage resource limits." + description: "Fixed the missing schema for .provider.webhook." - kind: fixed - description: "Fixed `provider.webhook.imagePullPolicy` behavior to correctly leverage pull policy." - - kind: fixed - description: "Fixed to add correct webhook metric port to `Service` and `ServiceMonitor`." - - kind: fixed - description: "Fixed to no longer require the unauthenticated webhook provider port to be exposed for health probes." + description: "Fixed incorrect indentation of selector labels under spec.template.spec.topologySpreadConstraints when topologySpreadConstraints is set." apiVersion: v2 -appVersion: 0.15.0 +appVersion: 0.20.0 description: ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. home: https://github.com/kubernetes-sigs/external-dns/ icon: https://github.com/kubernetes-sigs/external-dns/raw/master/docs/img/external-dns.png keywords: - kubernetes +- k8s - externaldns - external-dns - dns - service - ingress +- gateway maintainers: - email: steve.hipwell@gmail.com name: stevehipwell @@ -30,4 +32,4 @@ name: external-dns sources: - https://github.com/kubernetes-sigs/external-dns/ type: application -version: 1.15.0 +version: 1.20.0 diff --git a/packages/system/external-dns/charts/external-dns/README.md b/packages/system/external-dns/charts/external-dns/README.md index 9b21ecde..0bbae925 100644 --- a/packages/system/external-dns/charts/external-dns/README.md +++ b/packages/system/external-dns/charts/external-dns/README.md @@ -1,6 +1,6 @@ # external-dns -![Version: 1.15.0](https://img.shields.io/badge/Version-1.15.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.15.0](https://img.shields.io/badge/AppVersion-0.15.0-informational?style=flat-square) +![Version: 1.20.0](https://img.shields.io/badge/Version-1.20.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.20.0](https://img.shields.io/badge/AppVersion-0.20.0-informational?style=flat-square) ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. @@ -27,12 +27,15 @@ helm repo add external-dns https://kubernetes-sigs.github.io/external-dns/ After you've installed the repo you can install the chart. ```shell -helm upgrade --install external-dns external-dns/external-dns --version 1.15.0 +helm upgrade --install external-dns external-dns/external-dns --version 1.20.0 ``` ## Providers -Configuring the _ExternalDNS_ provider should be done via the `provider.name` value with provider specific configuration being set via the `provider..` values, where supported, and the `extraArgs` value. For legacy support `provider` can be set to the name of the provider with all additional configuration being set via the `extraArgs` value. +> Legacy support of setting `provider: ` is deprecated. + +Configuring the _ExternalDNS_ provider should be done via the `provider.name` value with provider specific configuration being set via the `provider..` values, where supported, and the `extraArgs` value. + See [documentation](https://kubernetes-sigs.github.io/external-dns/#new-providers) for more info on available providers and tutorials. ### Providers with Specific Configuration Support @@ -45,13 +48,13 @@ See [documentation](https://kubernetes-sigs.github.io/external-dns/#new-provider For set up for a specific provider using the Helm chart, see the following links: -- [AWS](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#using-helm-with-oidc) -- [akamai-edgedns](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/akamai-edgedns.md#using-helm) -- [cloudflare](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/cloudflare.md#using-helm) -- [digitalocean](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/digitalocean.md#using-helm) -- [godaddy](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/godaddy.md#using-helm) -- [ns1](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/ns1.md#using-helm) -- [plural](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/plural.md#using-helm) +* [AWS](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#using-helm-with-oidc) +* [akamai-edgedns](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/akamai-edgedns.md#using-helm) +* [cloudflare](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/cloudflare.md#using-helm) +* [digitalocean](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/digitalocean.md#using-helm) +* [godaddy](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/godaddy.md#using-helm) +* [ns1](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/ns1.md#using-helm) +* [plural](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/plural.md#using-helm) ## Namespaced Scoped Installation @@ -91,36 +94,43 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains | Key | Type | Default | Description | |-----|------|---------|-------------| | affinity | object | `{}` | Affinity settings for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. | -| automountServiceAccountToken | bool | `nil` | Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `Pod`. | +| annotationFilter | string | `nil` | Filter resources queried for endpoints by annotation selector. | +| annotationPrefix | string | `nil` | Annotation prefix for external-dns annotations (useful for split horizon DNS with multiple instances). | +| automountServiceAccountToken | bool | `true` | Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `Pod`. | | commonLabels | object | `{}` | Labels to add to all chart resources. | | deploymentAnnotations | object | `{}` | Annotations to add to the `Deployment`. | | deploymentStrategy | object | `{"type":"Recreate"}` | [Deployment Strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy). | | dnsConfig | object | `nil` | [DNS config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) for the pod, if not set the default will be used. | | dnsPolicy | string | `nil` | [DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) for the pod, if not set the default will be used. | -| domainFilters | list | `[]` | | +| domainFilters | list | `[]` | Limit possible target zones by domain suffixes. | +| enabled | bool | `nil` | No effect - reserved for use in sub-charting. | | env | list | `[]` | [Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `external-dns` container. | -| excludeDomains | list | `[]` | | -| extraArgs | list | `[]` | Extra arguments to provide to _ExternalDNS_. | -| extraContainers | object | `{}` | Extra containers to add to the `Deployment`. | +| excludeDomains | list | `[]` | Intentionally exclude domains from being managed. | +| extraArgs | object | `{}` | Extra arguments to provide to _ExternalDNS_. An array or map can be used, with maps allowing for value overrides; maps also support slice values to use the same arg multiple times. | +| extraContainers | list | `[]` | Extra containers to add to the `Deployment`. | | extraVolumeMounts | list | `[]` | Extra [volume mounts](https://kubernetes.io/docs/concepts/storage/volumes/) for the `external-dns` container. | | extraVolumes | list | `[]` | Extra [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the `Pod`. | | fullnameOverride | string | `nil` | Override the full name of the chart. | +| gatewayNamespace | string | `nil` | _Gateway API_ gateway namespace to watch. | +| global.imagePullSecrets | list | `[]` | Global image pull secrets. | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the `external-dns` container. | | image.repository | string | `"registry.k8s.io/external-dns/external-dns"` | Image repository for the `external-dns` container. | | image.tag | string | `nil` | Image tag for the `external-dns` container, this will default to `.Chart.AppVersion` if not set. | | imagePullSecrets | list | `[]` | Image pull secrets. | | initContainers | list | `[]` | [Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to add to the `Pod` definition. | | interval | string | `"1m"` | Interval for DNS updates. | +| labelFilter | string | `nil` | Filter resources queried for endpoints by label selector. | | livenessProbe | object | See _values.yaml_ | [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `external-dns` container. | | logFormat | string | `"text"` | Log format. | | logLevel | string | `"info"` | Log level. | +| managedRecordTypes | list | `[]` | Record types to manage (default: A, AAAA, CNAME) | | nameOverride | string | `nil` | Override the name of the chart. | | namespaced | bool | `false` | if `true`, _ExternalDNS_ will run in a namespaced scope (`Role`` and `Rolebinding`` will be namespaced too). | | nodeSelector | object | `{}` | Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | | podAnnotations | object | `{}` | Annotations to add to the `Pod`. | | podLabels | object | `{}` | Labels to add to the `Pod`. | | podSecurityContext | object | See _values.yaml_ | [Pod security context](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#podsecuritycontext-v1-core), this supports full customisation. | -| policy | string | `"upsert-only"` | How DNS records are synchronized between sources and providers; available values are `sync` & `upsert-only`. | +| policy | string | `"upsert-only"` | How DNS records are synchronized between sources and providers; available values are `create-only`, `sync`, & `upsert-only`. | | priorityClassName | string | `nil` | Priority class name for the `Pod`. | | provider.name | string | `"aws"` | _ExternalDNS_ provider name; for the available providers and how to configure them see [README](https://github.com/kubernetes-sigs/external-dns/blob/master/charts/external-dns/README.md#providers). | | provider.webhook.args | list | `[]` | Extra arguments to provide for the `webhook` container. | @@ -147,11 +157,11 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains | secretConfiguration.subPath | string | `nil` | Sub-path for mounting the `Secret`, this can be templated. | | securityContext | object | See _values.yaml_ | [Security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) for the `external-dns` container. | | service.annotations | object | `{}` | Service annotations. | -| service.ipFamilies | list | `[]` | Service IP families. | +| service.ipFamilies | list | `[]` | Service IP families (e.g. IPv4 and/or IPv6). | | service.ipFamilyPolicy | string | `nil` | Service IP family policy. | | service.port | int | `7979` | Service HTTP port. | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. | -| serviceAccount.automountServiceAccountToken | string | `nil` | Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `ServiceAccount`. | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. Templates are allowed in both the key and the value. Example: `example.com/annotation/{{ .Values.nameOverride }}: {{ .Values.nameOverride }}` | +| serviceAccount.automountServiceAccountToken | bool | `true` | Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `ServiceAccount`. | | serviceAccount.create | bool | `true` | If `true`, create a new `ServiceAccount`. | | serviceAccount.labels | object | `{}` | Labels to add to the service account. | | serviceAccount.name | string | `nil` | If this is set and `serviceAccount.create` is `true` this will be used for the created `ServiceAccount` name, if set and `serviceAccount.create` is `false` then this will define an existing `ServiceAccount` to use. | @@ -173,7 +183,7 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains | tolerations | list | `[]` | Node taints which will be tolerated for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). | | topologySpreadConstraints | list | `[]` | Topology spread constraints for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). If an explicit label selector is not provided one will be created from the pod selector labels. | | triggerLoopOnEvent | bool | `false` | If `true`, triggers run loop on create/update/delete events in addition of regular interval. | -| txtOwnerId | string | `nil` | Specify an identifier for this instance of _ExternalDNS_ wWhen using a registry other than `noop`. | +| txtOwnerId | string | `nil` | Specify an identifier for this instance of _ExternalDNS_ when using a registry other than `noop`. | | txtPrefix | string | `nil` | Specify a prefix for the domain names of TXT records created for the `txt` registry. Mutually exclusive with `txtSuffix`. | | txtSuffix | string | `nil` | Specify a suffix for the domain names of TXT records created for the `txt` registry. Mutually exclusive with `txtPrefix`. | diff --git a/packages/system/external-dns/charts/external-dns/README.md.gotmpl b/packages/system/external-dns/charts/external-dns/README.md.gotmpl index e313a2ba..fc4ada14 100644 --- a/packages/system/external-dns/charts/external-dns/README.md.gotmpl +++ b/packages/system/external-dns/charts/external-dns/README.md.gotmpl @@ -27,7 +27,10 @@ helm upgrade --install {{ template "chart.name" . }} external-dns/{{ template "c ## Providers -Configuring the _ExternalDNS_ provider should be done via the `provider.name` value with provider specific configuration being set via the `provider..` values, where supported, and the `extraArgs` value. For legacy support `provider` can be set to the name of the provider with all additional configuration being set via the `extraArgs` value. +> Legacy support of setting `provider: ` is deprecated. + +Configuring the _ExternalDNS_ provider should be done via the `provider.name` value with provider specific configuration being set via the `provider..` values, where supported, and the `extraArgs` value. + See [documentation](https://kubernetes-sigs.github.io/external-dns/#new-providers) for more info on available providers and tutorials. ### Providers with Specific Configuration Support @@ -40,13 +43,13 @@ See [documentation](https://kubernetes-sigs.github.io/external-dns/#new-provider For set up for a specific provider using the Helm chart, see the following links: -- [AWS](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#using-helm-with-oidc) -- [akamai-edgedns](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/akamai-edgedns.md#using-helm) -- [cloudflare](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/cloudflare.md#using-helm) -- [digitalocean](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/digitalocean.md#using-helm) -- [godaddy](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/godaddy.md#using-helm) -- [ns1](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/ns1.md#using-helm) -- [plural](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/plural.md#using-helm) +* [AWS](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/aws.md#using-helm-with-oidc) +* [akamai-edgedns](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/akamai-edgedns.md#using-helm) +* [cloudflare](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/cloudflare.md#using-helm) +* [digitalocean](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/digitalocean.md#using-helm) +* [godaddy](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/godaddy.md#using-helm) +* [ns1](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/ns1.md#using-helm) +* [plural](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/plural.md#using-helm) ## Namespaced Scoped Installation diff --git a/packages/system/external-dns/charts/external-dns/RELEASE.md b/packages/system/external-dns/charts/external-dns/RELEASE.md index 02634a30..956cb0b5 100644 --- a/packages/system/external-dns/charts/external-dns/RELEASE.md +++ b/packages/system/external-dns/charts/external-dns/RELEASE.md @@ -1,10 +1,13 @@ +### Added + +- Add option to set `annotationPrefix` ([#5889](https://github.com/kubernetes-sigs/external-dns/pull/5889)) _@lexfrei_ + ### Changed -- Updated _ExternalDNS_ OCI image version to [v0.15.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.15.0). ([#xxxx](https://github.com/kubernetes-sigs/external-dns/pull/xxxx)) _@stevehipwell_ +- Grant `networking.k8s.io/ingresses` and `gateway.solo.io/gateways` permissions when using `gloo-proxy` source. ([#5909](https://github.com/kubernetes-sigs/external-dns/pull/5909)) _@cucxabong_ +- Update _ExternalDNS_ OCI image version to [v0.20.0](https://github.com/kubernetes-sigs/external-dns/releases/tag/v0.20.0). ([#6005](https://github.com/kubernetes-sigs/external-dns/pull/6005)) _@vflaux_ ### Fixed -- Fixed `provider.webhook.resources` behavior to correctly leverage resource limits. ([#4560](https://github.com/kubernetes-sigs/external-dns/pull/4560)) _@crutonjohn_ -- Fixed `provider.webhook.imagePullPolicy` behavior to correctly leverage pull policy. ([#4643](https://github.com/kubernetes-sigs/external-dns/pull/4643)) _@kimsondrup_ -- Fixed to add correct webhook metric port to `Service` and `ServiceMonitor`. ([#4643](https://github.com/kubernetes-sigs/external-dns/pull/4643)) _@kimsondrup_ -- Fixed to no longer require the unauthenticated webhook provider port to be exposed for health probes. ([#4691](https://github.com/kubernetes-sigs/external-dns/pull/4691)) _@kimsondrup_ & _@hatrx_ +- Fixed the missing schema for `.provider.webhook.serviceMonitor` configs ([#5932](https://github.com/kubernetes-sigs/external-dns/pull/5932)) _@chrisbsmith_ +- Fixed incorrect indentation of selector labels under `spec.template.spec.topologySpreadConstraints` when `topologySpreadConstraints` is set. ([#6054](https://github.com/kubernetes-sigs/external-dns/pull/6054)) _@andylim0221_ diff --git a/packages/system/external-dns/charts/external-dns/ci/ci-values.yaml b/packages/system/external-dns/charts/external-dns/ci/ci-values.yaml deleted file mode 100644 index 4d278e94..00000000 --- a/packages/system/external-dns/charts/external-dns/ci/ci-values.yaml +++ /dev/null @@ -1,2 +0,0 @@ -provider: - name: inmemory diff --git a/packages/system/external-dns/charts/external-dns/crds/dnsendpoint.yaml b/packages/system/external-dns/charts/external-dns/crds/dnsendpoints.externaldns.k8s.io.yaml similarity index 82% rename from packages/system/external-dns/charts/external-dns/crds/dnsendpoint.yaml rename to packages/system/external-dns/charts/external-dns/crds/dnsendpoints.externaldns.k8s.io.yaml index 822cd850..c983c8d7 100644 --- a/packages/system/external-dns/charts/external-dns/crds/dnsendpoint.yaml +++ b/packages/system/external-dns/charts/external-dns/crds/dnsendpoints.externaldns.k8s.io.yaml @@ -1,9 +1,9 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: - name: dnsendpoints.externaldns.k8s.io annotations: api-approved.kubernetes.io: https://github.com/kubernetes-sigs/external-dns/pull/2007 + name: dnsendpoints.externaldns.k8s.io spec: group: externaldns.k8s.io names: @@ -16,6 +16,9 @@ spec: - name: v1alpha1 schema: openAPIV3Schema: + description: |- + DNSEndpoint is a contract that a user-specified CRD must implement to be used as a source for external-dns. + The user-specified CRD should also have the status sub-resource. properties: apiVersion: description: |- @@ -39,9 +42,7 @@ spec: properties: endpoints: items: - description: - Endpoint is a high-level way of a connection between - a service and an IP + description: Endpoint is a high-level way of a connection between a service and an IP properties: dnsName: description: The hostname of the DNS record @@ -54,9 +55,7 @@ spec: providerSpecific: description: ProviderSpecific stores provider specific config items: - description: - ProviderSpecificProperty holds the name and value - of a configuration which is specific to individual DNS providers + description: ProviderSpecificProperty holds the name and value of a configuration which is specific to individual DNS providers properties: name: type: string @@ -69,15 +68,10 @@ spec: format: int64 type: integer recordType: - description: - RecordType type of record, e.g. CNAME, A, AAAA, - SRV, TXT etc + description: RecordType type of record, e.g. CNAME, A, AAAA, SRV, TXT etc type: string setIdentifier: - description: - Identifier to distinguish multiple records with - the same name and type (e.g. Route53 records with routing - policies other than 'simple') + description: Identifier to distinguish multiple records with the same name and type (e.g. Route53 records with routing policies other than 'simple') type: string targets: description: The targets the DNS record points to diff --git a/packages/system/external-dns/charts/external-dns/templates/NOTES.txt b/packages/system/external-dns/charts/external-dns/templates/NOTES.txt index 5e37ecca..dedcff42 100644 --- a/packages/system/external-dns/charts/external-dns/templates/NOTES.txt +++ b/packages/system/external-dns/charts/external-dns/templates/NOTES.txt @@ -5,3 +5,14 @@ App version: {{ .Chart.AppVersion }} Image tag: {{ include "external-dns.image" . }} *********************************************************************** + +{{- if eq (typeOf .Values.provider) "string" }} +🚧 DEPRECATIONS 🚧 + +The following features, functions, or methods are deprecated and no longer recommended for use. + +{{/* The deprecation message for legacy 'provider: name'. */}} +{{- if eq (typeOf .Values.provider) "string" -}} +❗❗❗ DEPRECATED ❗❗❗ The legacy 'provider: ' configuration is in use. Support will be removed in future releases. +{{- end -}} +{{- end }} diff --git a/packages/system/external-dns/charts/external-dns/templates/_helpers.tpl b/packages/system/external-dns/charts/external-dns/templates/_helpers.tpl index 3ce55cd8..aad09822 100644 --- a/packages/system/external-dns/charts/external-dns/templates/_helpers.tpl +++ b/packages/system/external-dns/charts/external-dns/templates/_helpers.tpl @@ -73,6 +73,7 @@ The image to use {{/* Provider name, Keeps backward compatibility on provider +TODO: line eq (typeOf .Values.provider) "string" to be removed in future releases */}} {{- define "external-dns.providerName" -}} {{- if eq (typeOf .Values.provider) "string" }} @@ -93,3 +94,21 @@ The image to use for optional webhook sidecar {{- printf "%s:%s" .repository .tag }} {{- end }} {{- end }} + +{{/* +The pod affinity default label Selector +*/}} +{{- define "external-dns.labelSelector" -}} +labelSelector: + matchLabels: + {{ include "external-dns.selectorLabels" . | nindent 4 }} +{{- end }} + +{{/* +Check if any Gateway API sources are enabled +*/}} +{{- define "external-dns.hasGatewaySources" -}} +{{- if or (has "gateway-httproute" .Values.sources) (has "gateway-grpcroute" .Values.sources) (has "gateway-tlsroute" .Values.sources) (has "gateway-tcproute" .Values.sources) (has "gateway-udproute" .Values.sources) -}} +true +{{- end -}} +{{- end }} diff --git a/packages/system/external-dns/charts/external-dns/templates/clusterrole.yaml b/packages/system/external-dns/charts/external-dns/templates/clusterrole.yaml index 44f72bd2..b3ef006c 100644 --- a/packages/system/external-dns/charts/external-dns/templates/clusterrole.yaml +++ b/packages/system/external-dns/charts/external-dns/templates/clusterrole.yaml @@ -18,10 +18,15 @@ rules: {{- end }} {{- if or (has "service" .Values.sources) (has "contour-httpproxy" .Values.sources) (has "gloo-proxy" .Values.sources) (has "istio-gateway" .Values.sources) (has "istio-virtualservice" .Values.sources) (has "openshift-route" .Values.sources) (has "skipper-routegroup" .Values.sources) }} - apiGroups: [""] - resources: ["services","endpoints"] + resources: ["services"] verbs: ["get","watch","list"] {{- end }} -{{- if or (has "ingress" .Values.sources) (has "contour-httpproxy" .Values.sources) (has "openshift-route" .Values.sources) (has "skipper-routegroup" .Values.sources) }} +{{- if has "service" .Values.sources }} + - apiGroups: ["discovery.k8s.io"] + resources: ["endpointslices"] + verbs: ["get","watch","list"] +{{- end }} +{{- if or (has "ingress" .Values.sources) (has "istio-gateway" .Values.sources) (has "istio-virtualservice" .Values.sources) (has "contour-httpproxy" .Values.sources) (has "openshift-route" .Values.sources) (has "skipper-routegroup" .Values.sources) (has "gloo-proxy" .Values.sources) }} - apiGroups: ["extensions","networking.k8s.io"] resources: ["ingresses"] verbs: ["get","watch","list"] @@ -55,13 +60,17 @@ rules: resources: ["dnsendpoints/status"] verbs: ["*"] {{- end }} -{{- if or (has "gateway-httproute" .Values.sources) (has "gateway-grpcroute" .Values.sources) (has "gateway-tlsroute" .Values.sources) (has "gateway-tcproute" .Values.sources) (has "gateway-udproute" .Values.sources) }} +{{- if include "external-dns.hasGatewaySources" . }} +{{- if or (not .Values.namespaced) (and .Values.namespaced (not .Values.gatewayNamespace)) }} - apiGroups: ["gateway.networking.k8s.io"] resources: ["gateways"] verbs: ["get","watch","list"] +{{- end }} +{{- if not .Values.namespaced }} - apiGroups: [""] resources: ["namespaces"] - verbs: ["get","watch","list"] + verbs: ["get","watch","list"] +{{- end }} {{- end }} {{- if has "gateway-httproute" .Values.sources }} - apiGroups: ["gateway.networking.k8s.io"] @@ -90,7 +99,7 @@ rules: {{- end }} {{- if has "gloo-proxy" .Values.sources }} - apiGroups: ["gloo.solo.io","gateway.solo.io"] - resources: ["proxies","virtualservices"] + resources: ["proxies","virtualservices","gateways"] verbs: ["get","watch","list"] {{- end }} {{- if has "kong-tcpingress" .Values.sources }} @@ -116,12 +125,39 @@ rules: resources: ["routegroups/status"] verbs: ["patch","update"] {{- end }} -{{- if has "f5-virtualserver" .Values.sources }} +{{- if or (has "f5-virtualserver" .Values.sources) (has "f5-transportserver" .Values.sources) }} - apiGroups: ["cis.f5.com"] - resources: ["virtualservers"] + resources: ["virtualservers", "transportservers"] verbs: ["get","watch","list"] {{- end }} {{- with .Values.rbac.additionalPermissions }} {{- toYaml . | nindent 2 }} {{- end }} +{{- if and .Values.rbac.create .Values.namespaced (include "external-dns.hasGatewaySources" .) }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ template "external-dns.fullname" . }}-namespaces + labels: + {{- include "external-dns.labels" . | nindent 4 }} +rules: + - apiGroups: [""] + resources: ["namespaces"] + verbs: ["get","watch","list"] +{{- if .Values.gatewayNamespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: {{ template "external-dns.fullname" . }}-gateway + namespace: {{ .Values.gatewayNamespace }} + labels: + {{- include "external-dns.labels" . | nindent 4 }} +rules: + - apiGroups: ["gateway.networking.k8s.io"] + resources: ["gateways"] + verbs: ["get","watch","list"] +{{- end }} +{{- end }} {{- end }} diff --git a/packages/system/external-dns/charts/external-dns/templates/clusterrolebinding.yaml b/packages/system/external-dns/charts/external-dns/templates/clusterrolebinding.yaml index 74a51476..49400c0b 100644 --- a/packages/system/external-dns/charts/external-dns/templates/clusterrolebinding.yaml +++ b/packages/system/external-dns/charts/external-dns/templates/clusterrolebinding.yaml @@ -13,4 +13,39 @@ subjects: - kind: ServiceAccount name: {{ template "external-dns.serviceAccountName" . }} namespace: {{ .Release.Namespace }} +{{- if and .Values.rbac.create .Values.namespaced (include "external-dns.hasGatewaySources" .) }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "external-dns.fullname" . }}-namespaces + labels: + {{- include "external-dns.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "external-dns.fullname" . }}-namespaces +subjects: + - kind: ServiceAccount + name: {{ template "external-dns.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- if .Values.gatewayNamespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: {{ template "external-dns.fullname" . }}-gateway + namespace: {{ .Values.gatewayNamespace }} + labels: + {{- include "external-dns.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: {{ template "external-dns.fullname" . }}-gateway +subjects: + - kind: ServiceAccount + name: {{ template "external-dns.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end }} +{{- end }} {{- end }} diff --git a/packages/system/external-dns/charts/external-dns/templates/deployment.yaml b/packages/system/external-dns/charts/external-dns/templates/deployment.yaml index 02e9b397..b213f754 100644 --- a/packages/system/external-dns/charts/external-dns/templates/deployment.yaml +++ b/packages/system/external-dns/charts/external-dns/templates/deployment.yaml @@ -1,3 +1,4 @@ +{{- $defaultSelector := (include "external-dns.labelSelector" $ ) | fromYaml -}} {{- $providerName := tpl (include "external-dns.providerName" .) $ }} apiVersion: apps/v1 kind: Deployment @@ -40,7 +41,7 @@ spec: {{- if not (quote .Values.automountServiceAccountToken | empty) }} automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} {{- end }} - {{- with .Values.imagePullSecrets }} + {{- with (default .Values.global.imagePullSecrets .Values.imagePullSecrets) }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} @@ -99,25 +100,59 @@ spec: {{- if .Values.txtOwnerId }} - --txt-owner-id={{ .Values.txtOwnerId }} {{- end }} + {{- if and .Values.txtPrefix .Values.txtSuffix }} + {{- fail (printf "'txtPrefix' and 'txtSuffix' are mutually exclusive") }} + {{- end }} {{- if .Values.txtPrefix }} - --txt-prefix={{ .Values.txtPrefix }} - {{- end }} - {{- if and (eq .Values.txtPrefix "") (ne .Values.txtSuffix "") }} + {{- else if .Values.txtSuffix }} - --txt-suffix={{ .Values.txtSuffix }} {{- end }} {{- if .Values.namespaced }} - --namespace={{ .Release.Namespace }} {{- end }} + {{- if .Values.gatewayNamespace }} + - --gateway-namespace={{ .Values.gatewayNamespace }} + {{- end }} {{- range .Values.domainFilters }} - --domain-filter={{ . }} {{- end }} {{- range .Values.excludeDomains }} - --exclude-domains={{ . }} {{- end }} + {{- if .Values.labelFilter }} + - --label-filter={{ .Values.labelFilter }} + {{- end }} + {{- if .Values.annotationFilter }} + - --annotation-filter={{ .Values.annotationFilter }} + {{- end }} + {{- if .Values.annotationPrefix }} + - --annotation-prefix={{ .Values.annotationPrefix }} + {{- end }} + {{- range .Values.managedRecordTypes }} + - --managed-record-types={{ . }} + {{- end }} - --provider={{ $providerName }} - {{- range .Values.extraArgs }} + {{- if kindIs "map" .Values.extraArgs }} + {{- range $key, $value := .Values.extraArgs }} + {{- if not (kindIs "invalid" $value) }} + {{- if kindIs "slice" $value }} + {{- range $value }} + - --{{ $key }}={{ tpl (. | toString) $ }} + {{- end }} + {{- else }} + - --{{ $key }}={{ tpl ($value | toString) $ }} + {{- end }} + {{- else }} + - --{{ $key }} + {{- end }} + {{- end }} + {{- end }} + {{- if kindIs "slice" .Values.extraArgs }} + {{- range .Values.extraArgs }} - {{ tpl . $ }} - {{- end }} + {{- end }} + {{- end }} ports: - name: http protocol: TCP @@ -197,11 +232,71 @@ spec: {{- end }} {{- with .Values.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- with .nodeAffinity }} + nodeAffinity: + {{- toYaml . | nindent 10 }} + {{- end }} + {{- with .podAffinity }} + podAffinity: + {{- with .preferredDuringSchedulingIgnoredDuringExecution }} + preferredDuringSchedulingIgnoredDuringExecution: + {{- range . }} + - podAffinityTerm: + {{- if dig "podAffinityTerm" "labelSelector" nil . }} + {{- toYaml .podAffinityTerm | nindent 16 }} + {{- else }} + {{- (merge $defaultSelector .podAffinityTerm) | toYaml | nindent 16 }} + {{- end }} + weight: {{ .weight }} + {{- end }} + {{- end }} + {{- with .requiredDuringSchedulingIgnoredDuringExecution }} + requiredDuringSchedulingIgnoredDuringExecution: + {{- range . }} + {{- if dig "labelSelector" nil . }} + - {{ toYaml . | indent 16 | trim }} + {{- else }} + - {{ (merge $defaultSelector .) | toYaml | indent 16 | trim }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- with .podAntiAffinity }} + podAntiAffinity: + {{- with .preferredDuringSchedulingIgnoredDuringExecution }} + preferredDuringSchedulingIgnoredDuringExecution: + {{- range . }} + - podAffinityTerm: + {{- if dig "podAffinityTerm" "labelSelector" nil . }} + {{- toYaml .podAffinityTerm | nindent 16 }} + {{- else }} + {{- (merge $defaultSelector .podAffinityTerm) | toYaml | nindent 16 }} + {{- end }} + weight: {{ .weight }} + {{- end }} + {{- end }} + {{- with .requiredDuringSchedulingIgnoredDuringExecution }} + requiredDuringSchedulingIgnoredDuringExecution: + {{- range . }} + {{- if dig "labelSelector" nil . }} + - {{ toYaml . | indent 16 | trim }} + {{- else }} + - {{ (merge $defaultSelector .) | toYaml | indent 16 | trim }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} {{- end }} {{- with .Values.topologySpreadConstraints }} topologySpreadConstraints: - {{- toYaml . | nindent 8 }} + {{- range . }} + - {{ toYaml . | nindent 10 | trim }} + {{- if not (hasKey . "labelSelector") }} + labelSelector: + matchLabels: + {{- include "external-dns.selectorLabels" $ | nindent 14 }} + {{- end }} + {{- end }} {{- end }} {{- with .Values.tolerations }} tolerations: diff --git a/packages/system/external-dns/charts/external-dns/templates/serviceaccount.yaml b/packages/system/external-dns/charts/external-dns/templates/serviceaccount.yaml index f627313a..27196a2a 100644 --- a/packages/system/external-dns/charts/external-dns/templates/serviceaccount.yaml +++ b/packages/system/external-dns/charts/external-dns/templates/serviceaccount.yaml @@ -11,7 +11,9 @@ metadata: {{- end }} {{- with .Values.serviceAccount.annotations }} annotations: - {{- toYaml . | nindent 4 }} + {{- range $k, $v := . }} + {{- printf "%s: %s" (toYaml (tpl $k $)) (toYaml (tpl $v $)) | nindent 4 }} + {{- end }} {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/packages/system/external-dns/charts/external-dns/values.schema.json b/packages/system/external-dns/charts/external-dns/values.schema.json index 614deeac..b4c5e3a4 100644 --- a/packages/system/external-dns/charts/external-dns/values.schema.json +++ b/packages/system/external-dns/charts/external-dns/values.schema.json @@ -1,54 +1,697 @@ { - "$schema": "http://json-schema.org/draft-07/schema", + "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { - "provider": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "object", - "properties": { - "name": { - "type": "string" - } - } - } + "affinity": { + "description": "Affinity settings for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels.", + "type": "object" + }, + "annotationFilter": { + "description": "Filter resources queried for endpoints by annotation selector.", + "type": [ + "string", + "null" ] }, + "annotationPrefix": { + "description": "Annotation prefix for external-dns annotations (useful for split horizon DNS with multiple instances).", + "type": [ + "string", + "null" + ] + }, + "automountServiceAccountToken": { + "description": "Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `Pod`.", + "type": "boolean" + }, + "commonLabels": { + "description": "Labels to add to all chart resources.", + "type": "object" + }, + "deploymentAnnotations": { + "description": "Annotations to add to the `Deployment`.", + "type": "object" + }, + "deploymentStrategy": { + "description": "[Deployment Strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy).", + "type": "object", + "properties": { + "type": { + "default": "Recreate", + "type": "string", + "enum": [ + "Recreate", + "RollingUpdate" + ] + } + }, + "additionalProperties": true + }, + "dnsConfig": { + "description": "[DNS config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) for the pod, if not set the default will be used.", + "type": [ + "object", + "null" + ] + }, + "dnsPolicy": { + "description": "[DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) for the pod, if not set the default will be used.", + "type": [ + "string", + "null" + ] + }, + "domainFilters": { + "description": "Limit possible target zones by domain suffixes.", + "type": "array" + }, + "enabled": { + "description": "No effect - reserved for use in sub-charting", + "type": [ + "boolean", + "null" + ] + }, + "env": { + "description": "[Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `external-dns` container.", + "type": "array" + }, + "excludeDomains": { + "description": "Intentionally exclude domains from being managed.", + "type": "array" + }, "extraArgs": { - "type": "array", + "description": "Extra arguments to provide to _ExternalDNS_. An array or map can be used, with maps allowing for value overrides; maps also support slice values to use the same arg multiple times.", + "type": [ + "array", + "null", + "object" + ], + "uniqueItems": true, "items": { "type": "string" } }, - "secretConfiguration": { - "$comment": "This value is DEPRECATED as secrets should be configured external to the chart and exposed to the container via extraVolumes & extraVolumeMounts.", + "extraContainers": { + "description": "Extra containers to add to the `Deployment`.", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Extra [volume mounts](https://kubernetes.io/docs/concepts/storage/volumes/) for the `external-dns` container.", + "type": "array" + }, + "extraVolumes": { + "description": "Extra [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) for the `Pod`.", + "type": "array" + }, + "fullnameOverride": { + "description": "Override the full name of the chart.", + "type": [ + "string", + "null" + ] + }, + "gatewayNamespace": { + "description": "_Gateway API_ gateway namespace to watch.", + "type": [ + "string", + "null" + ] + }, + "global": { "type": "object", "properties": { + "imagePullSecrets": { + "description": "Global image pull secrets.", + "type": "array", + "items": { + "type": "object" + } + } + } + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "description": "Image pull policy for the `external-dns` container.", + "type": "string", + "enum": [ + "IfNotPresent", + "Always" + ] + }, + "repository": { + "description": "Image repository for the `external-dns` container.", + "type": "string" + }, + "tag": { + "description": "Image tag for the `external-dns` container, this will default to `.Chart.AppVersion` if not set.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "imagePullSecrets": { + "description": "Image pull secrets.", + "type": "array", + "items": { + "type": "object" + } + }, + "initContainers": { + "description": "[Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to add to the `Pod` definition.", + "type": "array" + }, + "interval": { + "description": "Interval for DNS updates.", + "type": "string" + }, + "labelFilter": { + "description": "Filter resources queried for endpoints by label selector.", + "type": [ + "string", + "null" + ] + }, + "livenessProbe": { + "description": "[Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `external-dns` container.", + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer" + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + } + }, + "initialDelaySeconds": { + "type": "integer" + }, + "periodSeconds": { + "type": "integer" + }, + "successThreshold": { + "type": "integer" + }, + "timeoutSeconds": { + "type": "integer" + } + } + }, + "logFormat": { + "description": "Log format.", + "default": "text", + "type": "string", + "enum": [ + "text", + "json" + ] + }, + "logLevel": { + "description": "Log level.", + "default": "info", + "type": "string", + "enum": [ + "panic", + "debug", + "info", + "warning", + "error", + "fatal" + ] + }, + "managedRecordTypes": { + "description": "Record types to manage (default: A, AAAA, CNAME)", + "type": [ + "array", + "null" + ], + "uniqueItems": true, + "items": { + "type": "string" + } + }, + "nameOverride": { + "description": "Override the name of the chart.", + "type": [ + "string", + "null" + ] + }, + "namespaced": { + "description": "if `true`, _ExternalDNS_ will run in a namespaced scope (`Role`` and `Rolebinding`` will be namespaced too).", + "type": "boolean" + }, + "nodeSelector": { + "description": "Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).", + "type": "object" + }, + "podAnnotations": { + "description": "Annotations to add to the `Pod`.", + "type": "object" + }, + "podLabels": { + "description": "Labels to add to the `Pod`.", + "type": "object" + }, + "podSecurityContext": { + "description": "[Pod security context](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#podsecuritycontext-v1-core), this supports full customisation.", + "type": "object", + "properties": { + "fsGroup": { + "type": "integer" + }, + "runAsNonRoot": { + "type": "boolean" + }, + "seccompProfile": { + "type": "object", + "properties": { + "type": { + "type": "string" + } + } + } + } + }, + "policy": { + "description": "How DNS records are synchronized between sources and providers; available values are `create-only`, `sync`, \u0026 `upsert-only`.", + "default": "upsert-only", + "type": "string", + "enum": [ + "create-only", + "sync", + "upsert-only" + ] + }, + "priorityClassName": { + "description": "Priority class name for the `Pod`.", + "type": [ + "string", + "null" + ] + }, + "provider": { + "type": [ + "object", + "string" + ], + "properties": { + "name": { + "description": "_ExternalDNS_ provider name; for the available providers and how to configure them see [README](https://github.com/kubernetes-sigs/external-dns/blob/master/charts/external-dns/README.md#providers).", + "type": "string" + }, + "webhook": { + "type": "object", + "properties": { + "args": { + "description": "Extra arguments to provide for the `webhook` container.", + "type": "array" + }, + "env": { + "description": "[Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `webhook` container.", + "type": "array" + }, + "extraVolumeMounts": { + "description": "Extra [volume mounts](https://kubernetes.io/docs/concepts/storage/volumes/) for the `webhook` container.", + "type": "array" + }, + "image": { + "type": "object", + "properties": { + "pullPolicy": { + "description": "Image pull policy for the `webhook` container.", + "type": "string" + }, + "repository": { + "description": "Image repository for the `webhook` container.", + "type": [ + "string", + "null" + ] + }, + "tag": { + "description": "Image tag for the `webhook` container.", + "type": [ + "string", + "null" + ] + } + } + }, + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + }, + "livenessProbe": { + "description": "[Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `external-dns` container.", + "type": "object", + "properties": { + "failureThreshold": { + "type": [ + "integer", + "null" + ] + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": [ + "string", + "null" + ] + }, + "port": { + "default": "string", + "type": [ + "integer", + "string" + ] + } + } + }, + "initialDelaySeconds": { + "type": [ + "integer", + "null" + ] + }, + "periodSeconds": { + "type": [ + "integer", + "null" + ] + }, + "successThreshold": { + "type": [ + "integer", + "null" + ] + }, + "timeoutSeconds": { + "type": [ + "integer", + "null" + ] + } + } + }, + "readinessProbe": { + "description": "[Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `webhook` container.", + "type": "object", + "properties": { + "failureThreshold": { + "type": [ + "integer", + "null" + ] + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": [ + "string", + "null" + ] + }, + "port": { + "default": "string", + "type": [ + "integer", + "string" + ] + } + } + }, + "initialDelaySeconds": { + "type": [ + "integer", + "null" + ] + }, + "periodSeconds": { + "type": [ + "integer", + "null" + ] + }, + "successThreshold": { + "type": [ + "integer", + "null" + ] + }, + "timeoutSeconds": { + "type": [ + "integer", + "null" + ] + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + }, + "resources": { + "description": "[Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the `webhook` container.", + "type": "object" + }, + "securityContext": { + "description": "[Pod security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) for the `webhook` container.", + "type": "object" + }, + "service": { + "type": "object", + "properties": { + "port": { + "description": "Webhook exposed HTTP port for the service.", + "type": "integer" + } + } + }, + "serviceMonitor": { + "description": "Optional [Service Monitor](https://prometheus-operator.dev/docs/operator/design/#servicemonitor) configuration for the `webhook` container.", + "type": "object", + "properties": { + "bearerTokenFile": { + "type": [ + "string", + "null" + ] + }, + "interval": { + "type": [ + "string", + "null" + ] + }, + "metricRelabelings": { + "type": "array" + }, + "relabelings": { + "type": "array" + }, + "scheme": { + "type": [ + "string", + "null" + ] + }, + "scrapeTimeout": { + "type": [ + "string", + "null" + ] + }, + "tlsConfig": { + "type": "object" + } + } + } + } + } + } + }, + "rbac": { + "type": "object", + "properties": { + "additionalPermissions": { + "description": "Additional rules to add to the `ClusterRole`.", + "type": "array" + }, + "create": { + "description": "If `true`, create a `ClusterRole` \u0026 `ClusterRoleBinding` with access to the Kubernetes API.", + "type": "boolean" + } + }, + "additionalProperties": true + }, + "readinessProbe": { + "description": "[Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `external-dns` container.", + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer" + }, + "httpGet": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "port": { + "type": "string" + } + } + }, + "initialDelaySeconds": { + "type": "integer" + }, + "periodSeconds": { + "type": "integer" + }, + "successThreshold": { + "type": "integer" + }, + "timeoutSeconds": { + "type": "integer" + } + } + }, + "registry": { + "description": "Specify the registry for storing ownership and labels. Valid values are `txt`, `aws-sd`, `dynamodb` \u0026 `noop`.", + "default": "txt", + "type": "string", + "enum": [ + "txt", + "aws-sd", + "dynamodb", + "noop" + ] + }, + "resources": { + "description": "[Resources](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) for the `external-dns` container.", + "type": "object", + "properties": { + "limits": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + }, + "requests": { + "type": "object", + "properties": { + "cpu": { + "type": "string" + }, + "memory": { + "type": "string" + } + } + } + } + }, + "revisionHistoryLimit": { + "description": "Specify the number of old `ReplicaSets` to retain to allow rollback of the `Deployment``.", + "type": [ + "integer", + "null" + ], + "minimum": 0 + }, + "secretConfiguration": { + "type": "object", + "properties": { + "data": { + "description": "`Secret` data.", + "type": "object" + }, "enabled": { + "description": "If `true`, create a `Secret` to store sensitive provider configuration (**DEPRECATED**).", "type": "boolean" }, "mountPath": { + "description": "Mount path for the `Secret`, this can be templated.", "type": [ "string", "null" ] }, "subPath": { + "description": "Sub-path for mounting the `Secret`, this can be templated.", "type": [ "string", "null" ] + } + } + }, + "securityContext": { + "description": "[Security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) for the `external-dns` container.", + "type": "object", + "properties": { + "allowPrivilegeEscalation": { + "type": "boolean" }, - "data": { + "capabilities": { "type": "object", - "patternProperties": { - ".+": { - "type": "string" + "properties": { + "drop": { + "type": "array", + "items": { + "type": "string" + } } } + }, + "privileged": { + "type": "boolean" + }, + "readOnlyRootFilesystem": { + "type": "boolean" + }, + "runAsGroup": { + "type": "integer" + }, + "runAsNonRoot": { + "type": "boolean" + }, + "runAsUser": { + "type": "integer" } } }, @@ -56,36 +699,194 @@ "type": "object", "properties": { "annotations": { + "description": "Service annotations.", "type": "object" }, "ipFamilies": { - "type": "array", + "description": "Service IP families (e.g. IPv4 and/or IPv6).", + "type": [ + "array", + "null" + ], + "maxItems": 2, + "minItems": 0, + "uniqueItems": true, "items": { "type": "string", "enum": [ - "IPv6", - "IPv4" + "IPv4", + "IPv6" ] } }, "ipFamilyPolicy": { + "description": "Service IP family policy.", "type": [ "string", "null" ], - "items": { - "type": "string", - "enum": [ - "SingleStack", - "PreferDualStack", - "RequireDualStack" - ] - } + "enum": [ + "SingleStack", + "PreferDualStack", + "RequireDualStack", + null + ] }, "port": { - "type": "integer" + "description": "Service HTTP port.", + "default": 7979, + "type": "integer", + "minimum": 0 } } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "description": "Annotations to add to the service account. Templates are allowed in both the key and the value. Example: `example.com/annotation/{{ .Values.nameOverride }}: {{ .Values.nameOverride }}`", + "type": "object" + }, + "automountServiceAccountToken": { + "description": "Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `ServiceAccount`.", + "type": "boolean" + }, + "create": { + "description": "If `true`, create a new `ServiceAccount`.", + "type": "boolean" + }, + "labels": { + "description": "Labels to add to the service account.", + "type": "object" + }, + "name": { + "description": "If this is set and `serviceAccount.create` is `true` this will be used for the created `ServiceAccount` name, if set and `serviceAccount.create` is `false` then this will define an existing `ServiceAccount` to use.", + "type": [ + "string", + "null" + ] + } + } + }, + "serviceMonitor": { + "type": "object", + "properties": { + "additionalLabels": { + "description": "Additional labels for the `ServiceMonitor`.", + "type": "object" + }, + "annotations": { + "description": "Annotations to add to the `ServiceMonitor`.", + "type": "object" + }, + "bearerTokenFile": { + "description": "Provide a bearer token file for the `ServiceMonitor`.", + "type": [ + "string", + "null" + ] + }, + "enabled": { + "description": "If `true`, create a `ServiceMonitor` resource to support the _Prometheus Operator_.", + "type": "boolean" + }, + "interval": { + "description": "If set override the _Prometheus_ default interval.", + "type": [ + "string", + "null" + ] + }, + "metricRelabelings": { + "description": "[Metric relabel configs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion.", + "type": "array" + }, + "namespace": { + "description": "If set create the `ServiceMonitor` in an alternate namespace.", + "type": [ + "string", + "null" + ] + }, + "relabelings": { + "description": "[Relabel configs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before ingestion.", + "type": "array" + }, + "scheme": { + "description": "If set overrides the _Prometheus_ default scheme.", + "type": [ + "string", + "null" + ] + }, + "scrapeTimeout": { + "description": "If set override the _Prometheus_ default scrape timeout.", + "type": [ + "string", + "null" + ] + }, + "targetLabels": { + "description": "Provide target labels for the `ServiceMonitor`.", + "type": "array" + }, + "tlsConfig": { + "description": "Configure the `ServiceMonitor` [TLS config](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig).", + "type": "object" + } + } + }, + "shareProcessNamespace": { + "description": "If `true`, the `Pod` will have [process namespace sharing](https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/) enabled.", + "type": "boolean" + }, + "sources": { + "description": "_Kubernetes_ resources to monitor for DNS entries.", + "type": "array", + "items": { + "type": "string" + } + }, + "terminationGracePeriodSeconds": { + "description": "Termination grace period for the `Pod` in seconds.", + "type": [ + "integer", + "null" + ] + }, + "tolerations": { + "description": "Node taints which will be tolerated for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).", + "type": "array" + }, + "topologySpreadConstraints": { + "description": "Topology spread constraints for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). If an explicit label selector is not provided one will be created from the pod selector labels.", + "type": "array" + }, + "triggerLoopOnEvent": { + "description": "If `true`, triggers run loop on create/update/delete events in addition of regular interval.", + "type": "boolean" + }, + "txtOwnerId": { + "description": "Specify an identifier for this instance of _ExternalDNS_ when using a registry other than `noop`.", + "type": [ + "string", + "null" + ] + }, + "txtPrefix": { + "description": "Specify a prefix for the domain names of TXT records created for the `txt` registry. Mutually exclusive with `txtSuffix`.", + "type": [ + "string", + "null" + ] + }, + "txtSuffix": { + "description": "Specify a suffix for the domain names of TXT records created for the `txt` registry. Mutually exclusive with `txtPrefix`.", + "type": [ + "string", + "null" + ] } - } + }, + "additionalProperties": true } diff --git a/packages/system/external-dns/charts/external-dns/values.yaml b/packages/system/external-dns/charts/external-dns/values.yaml index 9d7dea1b..46fbe8f7 100644 --- a/packages/system/external-dns/charts/external-dns/values.yaml +++ b/packages/system/external-dns/charts/external-dns/values.yaml @@ -2,22 +2,26 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -image: +global: + # -- Global image pull secrets. + imagePullSecrets: [] # @schema item: object + +image: # @schema additionalProperties: false # -- Image repository for the `external-dns` container. repository: registry.k8s.io/external-dns/external-dns - # -- (string) Image tag for the `external-dns` container, this will default to `.Chart.AppVersion` if not set. - tag: + # -- Image tag for the `external-dns` container, this will default to `.Chart.AppVersion` if not set. + tag: # @schema type:[string, null] # -- Image pull policy for the `external-dns` container. - pullPolicy: IfNotPresent + pullPolicy: IfNotPresent # @schema enum:[IfNotPresent, Always] # -- Image pull secrets. -imagePullSecrets: [] +imagePullSecrets: [] # @schema item: object # -- (string) Override the name of the chart. -nameOverride: +nameOverride: # @schema type:[string, null]; default: null # -- (string) Override the full name of the chart. -fullnameOverride: +fullnameOverride: # @schema type:[string, null]; default: null # -- Labels to add to all chart resources. commonLabels: {} @@ -27,24 +31,26 @@ serviceAccount: create: true # -- Labels to add to the service account. labels: {} - # -- Annotations to add to the service account. + # -- Annotations to add to the service account. Templates are allowed in both the key and the value. Example: `example.com/annotation/{{ .Values.nameOverride }}: {{ .Values.nameOverride }}` annotations: {} # -- (string) If this is set and `serviceAccount.create` is `true` this will be used for the created `ServiceAccount` name, if set and `serviceAccount.create` is `false` then this will define an existing `ServiceAccount` to use. - name: + name: # @schema type:[string, null]; default: null # -- Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `ServiceAccount`. - automountServiceAccountToken: + automountServiceAccountToken: true service: # -- Service annotations. annotations: {} # -- Service HTTP port. - port: 7979 - # -- Service IP families. - ipFamilies: [] - # -- (string) Service IP family policy. - ipFamilyPolicy: + port: 7979 # @schema minimum:0; default:7979 + # -- Service IP families (e.g. IPv4 and/or IPv6). + ipFamilies: [] # @schema type: [array, null]; item: string; itemEnum: ["IPv4", "IPv6"]; minItems:0; maxItems:2; uniqueItems: true + # - IPv4 + # - IPv6 + # -- Service IP family policy. + ipFamilyPolicy: # @schema type: [string, null]; enum:[SingleStack, PreferDualStack, RequireDualStack, null] -rbac: +rbac: # @schema additionalProperties: true # -- If `true`, create a `ClusterRole` & `ClusterRoleBinding` with access to the Kubernetes API. create: true # -- Additional rules to add to the `ClusterRole`. @@ -54,14 +60,14 @@ rbac: deploymentAnnotations: {} # -- Extra containers to add to the `Deployment`. -extraContainers: {} +extraContainers: [] # -- [Deployment Strategy](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy). -deploymentStrategy: - type: Recreate +deploymentStrategy: # @schema additionalProperties: true + type: Recreate # @schema enum:[Recreate, RollingUpdate]; type:string; default: Recreate # -- (int) Specify the number of old `ReplicaSets` to retain to allow rollback of the `Deployment``. -revisionHistoryLimit: +revisionHistoryLimit: # @schema type:[integer, null];minimum:0 # -- Labels to add to the `Pod`. podLabels: {} @@ -70,7 +76,7 @@ podLabels: {} podAnnotations: {} # -- (bool) Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `Pod`. -automountServiceAccountToken: +automountServiceAccountToken: true # -- If `true`, the `Pod` will have [process namespace sharing](https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/) enabled. shareProcessNamespace: false @@ -84,16 +90,16 @@ podSecurityContext: type: RuntimeDefault # -- (string) Priority class name for the `Pod`. -priorityClassName: +priorityClassName: # @schema type:[string, null]; default: null # -- (int) Termination grace period for the `Pod` in seconds. -terminationGracePeriodSeconds: +terminationGracePeriodSeconds: # @schema type:[integer, null] # -- (string) [DNS policy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) for the pod, if not set the default will be used. -dnsPolicy: +dnsPolicy: # @schema type:[string, null]; default: null # -- (object) [DNS config](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) for the pod, if not set the default will be used. -dnsConfig: +dnsConfig: # @schema type:[object, null]; default: null # -- [Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to add to the `Pod` definition. initContainers: [] @@ -166,17 +172,17 @@ serviceMonitor: # -- Annotations to add to the `ServiceMonitor`. annotations: {} # -- (string) If set create the `ServiceMonitor` in an alternate namespace. - namespace: + namespace: # @schema type:[string, null]; default: null # -- (string) If set override the _Prometheus_ default interval. - interval: + interval: # @schema type:[string, null]; default: null # -- (string) If set override the _Prometheus_ default scrape timeout. - scrapeTimeout: + scrapeTimeout: # @schema type:[string, null]; default: null # -- (string) If set overrides the _Prometheus_ default scheme. - scheme: + scheme: # @schema type:[string, null]; default: null # -- Configure the `ServiceMonitor` [TLS config](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#tlsconfig). tlsConfig: {} # -- (string) Provide a bearer token file for the `ServiceMonitor`. - bearerTokenFile: + bearerTokenFile: # @schema type:[string, null]; default: null # -- [Relabel configs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config) to apply to samples before ingestion. relabelings: [] # -- [Metric relabel configs](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs) to apply to samples before ingestion. @@ -185,10 +191,10 @@ serviceMonitor: targetLabels: [] # -- Log level. -logLevel: info +logLevel: info # @schema enum:[panic, debug, info, warning, error, fatal]; type:string; default: "info" # -- Log format. -logFormat: text +logFormat: text # @schema enum:["text", "json"]; type:string; default: "text" # -- Interval for DNS updates. interval: 1m @@ -199,41 +205,56 @@ triggerLoopOnEvent: false # -- if `true`, _ExternalDNS_ will run in a namespaced scope (`Role`` and `Rolebinding`` will be namespaced too). namespaced: false +# -- _Gateway API_ gateway namespace to watch. +gatewayNamespace: # @schema type:[string, null]; default: null + # -- _Kubernetes_ resources to monitor for DNS entries. sources: - service - ingress -# -- How DNS records are synchronized between sources and providers; available values are `sync` & `upsert-only`. -policy: upsert-only +# -- How DNS records are synchronized between sources and providers; available values are `create-only`, `sync`, & `upsert-only`. +policy: upsert-only # @schema enum:[create-only, sync, upsert-only]; type:string; default: "upsert-only" # -- Specify the registry for storing ownership and labels. # Valid values are `txt`, `aws-sd`, `dynamodb` & `noop`. -registry: txt -# -- (string) Specify an identifier for this instance of _ExternalDNS_ wWhen using a registry other than `noop`. -txtOwnerId: +registry: txt # @schema enum:[txt, aws-sd, dynamodb, noop]; default: "txt" +# -- (string) Specify an identifier for this instance of _ExternalDNS_ when using a registry other than `noop`. +txtOwnerId: # @schema type:[string, null]; default: null # -- (string) Specify a prefix for the domain names of TXT records created for the `txt` registry. # Mutually exclusive with `txtSuffix`. -txtPrefix: +txtPrefix: # @schema type:[string, null]; default: null # -- (string) Specify a suffix for the domain names of TXT records created for the `txt` registry. # Mutually exclusive with `txtPrefix`. -txtSuffix: +txtSuffix: # @schema type:[string, null]; default: null -## - Limit possible target zones by domain suffixes. +# -- Limit possible target zones by domain suffixes. domainFilters: [] -## -- Intentionally exclude domains from being managed. +# -- Intentionally exclude domains from being managed. excludeDomains: [] -provider: +# -- Filter resources queried for endpoints by label selector. +labelFilter: # @schema type: [string,null]; default: null + +# -- Filter resources queried for endpoints by annotation selector. +annotationFilter: # @schema type: [string,null]; default: null + +# -- Annotation prefix for external-dns annotations (useful for split horizon DNS with multiple instances). +annotationPrefix: # @schema type: [string,null]; default: null + +# -- Record types to manage (default: A, AAAA, CNAME) +managedRecordTypes: [] # @schema type: [array, null]; item: string; uniqueItems: true + +provider: # @schema type: [object, string] # -- _ExternalDNS_ provider name; for the available providers and how to configure them see [README](https://github.com/kubernetes-sigs/external-dns/blob/master/charts/external-dns/README.md#providers). name: aws webhook: image: # -- (string) Image repository for the `webhook` container. - repository: + repository: # @schema type:[string, null]; default: null # -- (string) Image tag for the `webhook` container. - tag: + tag: # @schema type:[string, null]; default: null # -- Image pull policy for the `webhook` container. pullPolicy: IfNotPresent # -- [Environment variables](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/) for the `webhook` container. @@ -251,47 +272,51 @@ provider: # @default -- See _values.yaml_ livenessProbe: httpGet: - path: /healthz - port: http-webhook - initialDelaySeconds: 10 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 2 - successThreshold: 1 + path: /healthz # @schema type:[string, null]; default: null + port: http-webhook # @schema type:[integer,string]; default: string + initialDelaySeconds: 10 # @schema type:[integer, null]; default: null + periodSeconds: 10 # @schema type:[integer, null]; default: null + timeoutSeconds: 5 # @schema type:[integer, null]; default: null + failureThreshold: 2 # @schema type:[integer, null]; default: null + successThreshold: 1 # @schema type:[integer, null]; default: null # -- [Readiness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `webhook` container. # @default -- See _values.yaml_ readinessProbe: httpGet: - path: /healthz - port: http-webhook - initialDelaySeconds: 5 - periodSeconds: 10 - timeoutSeconds: 5 - failureThreshold: 6 - successThreshold: 1 + path: /healthz # @schema type:[string, null]; default: null + port: http-webhook # @schema type:[integer,string]; default: string + initialDelaySeconds: 5 # @schema type:[integer, null]; default: null + periodSeconds: 10 # @schema type:[integer, null]; default: null + timeoutSeconds: 5 # @schema type:[integer, null]; default: null + failureThreshold: 6 # @schema type:[integer, null]; default: null + successThreshold: 1 # @schema type:[integer, null]; default: null service: # -- Webhook exposed HTTP port for the service. port: 8080 # -- Optional [Service Monitor](https://prometheus-operator.dev/docs/operator/design/#servicemonitor) configuration for the `webhook` container. # @default -- See _values.yaml_ serviceMonitor: - interval: - scheme: + interval: # @schema type:[string, null]; default: null + scheme: # @schema type:[string, null]; default: null tlsConfig: {} - bearerTokenFile: - scrapeTimeout: + bearerTokenFile: # @schema type:[string, null]; default: null + scrapeTimeout: # @schema type:[string, null]; default: null metricRelabelings: [] relabelings: [] # -- Extra arguments to provide to _ExternalDNS_. -extraArgs: [] +# An array or map can be used, with maps allowing for value overrides; maps also support slice values to use the same arg multiple times. +extraArgs: {} # @schema type: [array, null, object]; item: string; uniqueItems: true secretConfiguration: # -- If `true`, create a `Secret` to store sensitive provider configuration (**DEPRECATED**). enabled: false # -- Mount path for the `Secret`, this can be templated. - mountPath: + mountPath: # @schema type:[string, null]; default: null # -- Sub-path for mounting the `Secret`, this can be templated. - subPath: + subPath: # @schema type:[string, null]; default: null # -- `Secret` data. data: {} + +# -- (bool) No effect - reserved for use in sub-charting. +enabled: # @schema type: [boolean, null]; description: No effect - reserved for use in sub-charting