-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
3,835 additions
and
2,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{{- $ingress := .Values.clog.ingress.enabled }} | ||
{{- if $ingress }} | ||
{{- $cluster_issuer := .Values.clog.ingress.clusterIssuer | default "letsencrypt-dns-prod" | toString | quote }} | ||
{{- $domain = .Values.clog.ingress.domain | default "localhost" | toString }} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-clog-ingress | ||
labels: | ||
{{- include "clog.labels" . | nindent 4 }} | ||
annotations: | ||
cert-manager.io/cluster-issuer: {{ $cluster_issuer }} | ||
cert-manager.io/private-key-algorithm: "ECDSA" | ||
nginx.ingress.kubernetes.io/affinity: "cookie" | ||
nginx.ingress.kubernetes.io/affinity-mode: "persistent" | ||
nginx.ingress.kubernetes.io/proxy-body-size: "100m" | ||
nginx.ingress.kubernetes.io/session-cookie-expires: "172800" | ||
nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" | ||
nginx.ingress.kubernetes.io/session-cookie-name: "route" | ||
nginx.org/client-max-body-size: "100m" | ||
spec: | ||
ingressClassName: "nginx" | ||
rules: | ||
- host: {{ $domain | quote }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: {{ .Release.Name }}-clog-svc | ||
port: | ||
number: 80 | ||
path: / | ||
pathType: Prefix | ||
tls: | ||
- hosts: | ||
- {{ $domain | quote }} | ||
secretName: {{ .Release.Name }}-clog-tls-cert | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v2 | ||
name: cloudflareddns | ||
description: Access your home network remotely via a custom domain name without a static IP! | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "latest" | ||
keywords: | ||
- "cloudflareddns" | ||
- "cloudflare" | ||
- "ddns" | ||
- "cloudflare-ddns" | ||
home: "https://github.com/irfanhakim-as/charts" | ||
icon: "https://irfanhakim-as.github.io/charts/logos/cloudflare.png" | ||
sources: | ||
- "https://github.com/timothymiller/cloudflare-ddns" | ||
maintainers: | ||
- name: "Irfan Hakim" | ||
email: "[email protected]" | ||
url: "https://github.com/irfanhakim-as" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# [`cloudflareddns`](https://github.com/timothymiller/cloudflare-ddns) | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.19+ | ||
- Helm 3.2.0+ | ||
|
||
## How to add repo | ||
|
||
Add the repo to your local helm client. | ||
|
||
```sh | ||
helm repo add mika https://irfanhakim-as.github.io/charts | ||
``` | ||
|
||
Update the repo to retrieve the latest versions of the packages. | ||
|
||
```sh | ||
helm repo update | ||
``` | ||
|
||
## How to install | ||
|
||
### Prepare chart values | ||
|
||
Copy `values.yaml` from the chart you would like to install. | ||
|
||
```sh | ||
cp mika/cloudflareddns/values.yaml . | ||
``` | ||
|
||
Edit `values.yaml` with the appropriate values. Please refer to the [Configurations](#configurations) section below, or the `values.yaml` file itself for details and sample values. | ||
|
||
```sh | ||
nano values.yaml | ||
``` | ||
|
||
### Perform installation | ||
|
||
Install the desired chart. Replace `$release_name` and `$namespace` accordingly. | ||
|
||
```sh | ||
helm install $release_name mika/cloudflareddns --namespace $namespace --create-namespace --values values.yaml --wait | ||
``` | ||
|
||
Verify that your chart has been installed. Replace `$namespace` and `$release_name` accordingly. | ||
|
||
```sh | ||
helm ls --namespace $namespace | grep "$release_name" | ||
``` | ||
|
||
## How to upgrade | ||
|
||
After making any necessary changes to the `values.yaml` file, upgrade the desired chart. Replace `$release_name` and `$namespace` accordingly. | ||
|
||
```sh | ||
helm upgrade $release_name mika/cloudflareddns --namespace $namespace --values values.yaml --wait | ||
``` | ||
|
||
## How to uninstall | ||
|
||
Uninstall the desired chart. Replace `$release_name` and `$namespace` accordingly. | ||
|
||
```sh | ||
helm uninstall $release_name --namespace $namespace --wait | ||
``` | ||
|
||
## Configurations | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| cloudflareddns.configPath | string | `""` | The path to the cloudflareddns configuration directory. Default: `"/etc/cloudflare-ddns"`. | | ||
| cloudflareddns.ipv4 | string | `""` | Specify whether to add an A record for each subdomain. Default: `"true"`. | | ||
| cloudflareddns.ipv6 | string | `""` | Specify whether to add an AAAA record for each subdomain. Default: `"false"`. | | ||
| cloudflareddns.subdomains | list | `[]` | The list of subdomains to be updated, each with their own hostname and proxied setting. | | ||
| cloudflareddns.token | string | `""` | The Cloudflare API token used to authenticate with the Cloudflare API. | | ||
| cloudflareddns.zoneID | string | `""` | The ID of the zone that will get the records. | | ||
| image.cloudflareddns.pullPolicy | string | `""` | The policy that determines when Kubernetes should pull the cloudflareddns container image. Default: `"IfNotPresent"`. | | ||
| image.cloudflareddns.registry | string | `""` | The registry where the cloudflareddns container image is hosted. Default: `"docker.io"`. | | ||
| image.cloudflareddns.repository | string | `""` | The name of the repository that contains the cloudflareddns container image used. Default: `"timothyjmiller/cloudflare-ddns"`. | | ||
| image.cloudflareddns.tag | string | `""` | The tag that specifies the version of the cloudflareddns container image used. Default: `Chart appVersion`. | | ||
| imagePullSecrets | list | `[]` | Credentials used to securely authenticate and authorise the pulling of container images from private registries. | | ||
| replicaCount | string | `""` | The desired number of running replicas for cloudflareddns. Default: `"1"`. | | ||
| resources.limits.cpu | string | `"50m"` | The maximum amount of CPU resources allowed for cloudflareddns. | | ||
| resources.limits.memory | string | `"32Mi"` | The maximum amount of memory allowed for cloudflareddns. | | ||
| resources.requests.cpu | string | `"10m"` | The minimum amount of CPU resources required by cloudflareddns. | | ||
| resources.requests.memory | string | `"10Mi"` | The minimum amount of memory required by cloudflareddns. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cloudflareddns is now installed and configured for {{ .Release.Name | toString }}. | ||
|
||
See the values.yaml file of this chart for more configuration options. | ||
|
||
Please refer to the official documentation for more information on how to use cloudflareddns. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "cloudflareddns.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "cloudflareddns.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "cloudflareddns.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "cloudflareddns.labels" -}} | ||
helm.sh/chart: {{ include "cloudflareddns.chart" . }} | ||
{{ include "cloudflareddns.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "cloudflareddns.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "cloudflareddns.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "cloudflareddns.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "cloudflareddns.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{/* | ||
Cloudflare-DDNS config.json template | ||
*/}} | ||
{{- define "cloudflareddns.config-json" -}} | ||
{ | ||
"cloudflare": [ | ||
{ | ||
"authentication": { | ||
"api_token": "API_TOKEN" | ||
}, | ||
"zone_id": "ZONE_ID", | ||
"subdomains": [ | ||
{{- $subdomains := .Values.cloudflareddns.subdomains }} | ||
{{- range $index, $subdomain := $subdomains }} | ||
{ | ||
"name": "{{ $subdomain.hostname }}", | ||
"proxied": {{ $subdomain.proxied }} | ||
}{{ if ne $index (sub (len $subdomains) 1) }},{{ end }} | ||
{{- end }} | ||
] | ||
} | ||
], | ||
"a": ENABLE_IPV4, | ||
"aaaa": ENABLE_IPV6, | ||
"purgeUnknownRecords": false, | ||
"ttl": 300 | ||
} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- $config_path := .Values.cloudflareddns.configPath | default "/etc/cloudflare-ddns" | toString | quote }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-cloudflareddns-cm | ||
labels: | ||
{{- include "cloudflareddns.labels" . | nindent 4 }} | ||
data: | ||
CONFIG_PATH: {{ $config_path }} |
Oops, something went wrong.