diff --git a/packages/apps/coredns/.helmignore b/packages/apps/coredns/.helmignore new file mode 100644 index 00000000..1ea0ae84 --- /dev/null +++ b/packages/apps/coredns/.helmignore @@ -0,0 +1,3 @@ +.helmignore +/logos +/Makefile diff --git a/packages/apps/coredns/Chart.yaml b/packages/apps/coredns/Chart.yaml new file mode 100644 index 00000000..302dc324 --- /dev/null +++ b/packages/apps/coredns/Chart.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +name: coredns +description: Managed Coredns service +icon: /logos/coredns.svg + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.32.0" diff --git a/packages/apps/coredns/logos/coredns.svg b/packages/apps/coredns/logos/coredns.svg new file mode 100644 index 00000000..5c8513bf --- /dev/null +++ b/packages/apps/coredns/logos/coredns.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/apps/coredns/templates/coredns.yaml b/packages/apps/coredns/templates/coredns.yaml new file mode 100644 index 00000000..ab2338bb --- /dev/null +++ b/packages/apps/coredns/templates/coredns.yaml @@ -0,0 +1,42 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: {{ .Release.Name }}-system +spec: + chart: + spec: + chart: cozy-coredns + reconcileStrategy: Revision + sourceRef: + kind: HelmRepository + name: cozystack-system + namespace: cozy-system + version: '{{ .Chart.AppVersion }}' + interval: 1m0s + timeout: 5m0s + values: + servers: + - zones: + - zone: . + port: 53 + plugins: + - name: errors + - name: health + configBlock: |- + lameduck 5s + - name: ready + - name: kubernetes + parameters: cluster.local in-addr.arpa ip6.arpa + configBlock: |- + pods insecure + fallthrough in-addr.arpa ip6.arpa + ttl 30 + - name: prometheus + parameters: 0.0.0.0:9153 + - name: forward + parameters: {{ .Values.forward_parametr | default ". /etc/resolv.conf" }} + - name: cache + parameters: 30 + - name: loop + - name: reload + - name: loadbalance diff --git a/packages/apps/coredns/values.schema.json b/packages/apps/coredns/values.schema.json new file mode 100644 index 00000000..ae73e0e4 --- /dev/null +++ b/packages/apps/coredns/values.schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "Helm Values Schema", + "type": "object", + "properties": { + "forward_params": { + "description": "DNS forward parameter. If set to null, the default . /etc/resolv.conf will be used.", + "type": ["string", "null"], + "default": null, + "examples": [". 1.1.1.1", null] + } + }, + "required": [], + "additionalProperties": false + } diff --git a/packages/apps/coredns/values.yaml b/packages/apps/coredns/values.yaml new file mode 100644 index 00000000..19ae23b1 --- /dev/null +++ b/packages/apps/coredns/values.yaml @@ -0,0 +1,17 @@ +## @section Common parameters +## +## @param forward_params Set the `forward` parameter for CoreDNS. +## This parameter can either be a DNS server (e.g., "1.1.1.1") +## or set to null to use the default forwarder (". /etc/resolv.conf"). +## +## Example Usage: +## +## To forward DNS queries to Cloudflare's DNS server: +## +## forward_params: ". 1.1.1.1" +## +## To use the default resolver configuration: +## +## forward_params: null +## +forward_params: null