From 7d9559b20a4ea11b3b258cffb7c4d72662ad913a Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Sun, 7 Jul 2024 20:03:30 +0200 Subject: [PATCH] docs: Added/updated documentation --- charts/cloudflare-ddns-update/Chart.yaml | 3 ++ charts/cloudflare-ddns-update/README.md | 37 +++++++++++++++++ .../templates/deployment.yaml | 33 +++++++++++++++ charts/cloudflare-ddns-update/values.yaml | 41 +++++++++++++++++-- 4 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 charts/cloudflare-ddns-update/README.md diff --git a/charts/cloudflare-ddns-update/Chart.yaml b/charts/cloudflare-ddns-update/Chart.yaml index aab1c3d..d03cfc3 100644 --- a/charts/cloudflare-ddns-update/Chart.yaml +++ b/charts/cloudflare-ddns-update/Chart.yaml @@ -4,6 +4,9 @@ description: A Helm chart to provide a Dyn v3 API to manage records in cloudflar type: application version: 0.1.0 appVersion: "v0.1.0" +home: "https://github.com/dploeger/cloudflare-ddns-update" +sources: + - "https://github.com/dploeger/cloudflare-ddns-update" annotations: artifacthub.io/category: "networking" artifacthub.io/changes: | diff --git a/charts/cloudflare-ddns-update/README.md b/charts/cloudflare-ddns-update/README.md new file mode 100644 index 0000000..befc7ca --- /dev/null +++ b/charts/cloudflare-ddns-update/README.md @@ -0,0 +1,37 @@ +# cloudflare-ddns-update + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.1.0](https://img.shields.io/badge/AppVersion-v0.1.0-informational?style=flat-square) + +A Helm chart to provide a Dyn v3 API to manage records in cloudflare + +**Homepage:** + +## Source Code + +* + +## Values + +### Auth configuration + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| configuration.auth.existingSecret | object | Use the given username and password | Use an existing secret for the authentication | +| configuration.auth.existingSecret.name | string | `""` | secret name | +| configuration.auth.existingSecret.passwordKey | string | `"password"` | key used for password | +| configuration.auth.existingSecret.usernameKey | string | `"username"` | key used for username | +| configuration.auth.password | string | `""` | Password required for basic auth | +| configuration.auth.username | string | `""` | Username required for basic auth | + +### CloudFlare configuration + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| configuration.cloudflare.apiToken | string | `""` | API token to authenticate to cloudflare | +| configuration.cloudflare.apiTokenExistingSecret | object | Use the given apiToken | Use an existing secret for API token | +| configuration.cloudflare.apiTokenExistingSecret.name | string | `""` | Secret name | +| configuration.cloudflare.apiTokenExistingSecret.tokenKey | string | `"token"` | Key used for token | +| configuration.cloudflare.zone | string | `""` | Zone to use | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v1.14.0](https://github.com/norwoodj/helm-docs/releases/v1.14.0) diff --git a/charts/cloudflare-ddns-update/templates/deployment.yaml b/charts/cloudflare-ddns-update/templates/deployment.yaml index fc67a49..629c91a 100644 --- a/charts/cloudflare-ddns-update/templates/deployment.yaml +++ b/charts/cloudflare-ddns-update/templates/deployment.yaml @@ -45,6 +45,39 @@ spec: httpGet: path: / port: http + env: + - name: CLOUDFLARE_ZONE + value: {{ .Values.configuration.cloudflare.zone | quote }} + {{- if ne .Values.configuration.cloudflare.apiToken "" }} + - name: CLOUDFLARE_API_TOKEN + value: {{ .Values.configuration.cloudflare.apiToken | quote }} + {{- else if .Values.configuration.cloudflare.apiTokenExistingSecret }} + - name: CLOUDFLARE_API_TOKEN + valueFrom: + secretKeyRef: + key: {{ .Values.configuration.cloudflare.apiTokenExistingSecret.tokenKey }} + name: {{ .Values.configuration.cloudflare.apiTokenExistingSecret.name }} + {{- end }} + {{- if ne .Values.configuration.auth.username "" }} + - name: AUTH_USERNAME + value: {{ .Values.configuration.auth.username | quote }} + {{- else if .Values.configuration.auth.existingSecret }} + - name: AUTH_USERNAME + valueFrom: + secretKeyRef: + key: {{ .Values.configuration.auth.existingSecret.usernameKey }} + name: {{ .Values.configuration.auth.existingSecret.name }} + {{- end }} + {{- if ne .Values.configuration.auth.password "" }} + - name: AUTH_PASSWORD + value: {{ .Values.configuration.auth.password | quote }} + {{- else if .Values.configuration.auth.existingSecret }} + - name: AUTH_PASSWORD + valueFrom: + secretKeyRef: + key: {{ .Values.configuration.auth.existingSecret.passwordKey }} + name: {{ .Values.configuration.auth.existingSecret.name }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.nodeSelector }} diff --git a/charts/cloudflare-ddns-update/values.yaml b/charts/cloudflare-ddns-update/values.yaml index 83043c4..fb6b95f 100644 --- a/charts/cloudflare-ddns-update/values.yaml +++ b/charts/cloudflare-ddns-update/values.yaml @@ -1,6 +1,41 @@ -# Default values for cloudflare-ddns-update. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. +configuration: + cloudflare: + # -- Use an existing secret for API token + # @section -- CloudFlare configuration + # @default -- Use the given apiToken + apiTokenExistingSecret: + # -- Secret name + # @section -- CloudFlare configuration + name: "" + # -- Key used for token + # @section -- CloudFlare configuration + tokenKey: "token" + # -- API token to authenticate to cloudflare + # @section -- CloudFlare configuration + apiToken: "" + # -- The name of the CloudFLare zone to use + # @section -- CloudFlare configuration + zone: "" + auth: + # -- Use an existing secret for the authentication + # @section -- Auth configuration + # @default -- Use the given username and password + existingSecret: + # -- secret name + # @section -- Auth configuration + name: "" + # -- key used for username + # @section -- Auth configuration + usernameKey: "username" + # -- key used for password + # @section -- Auth configuration + passwordKey: "password" + # -- Username required for basic auth + # @section -- Auth configuration + username: "" + # -- Password required for basic auth + # @section -- Auth configuration + password: "" replicaCount: 1