mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Adds a chart for the external-dns service (#1254)
* initial commit * Moving to stable * Some review fixes * Typo * More review comments * Reflecting the change to a list * Minor changes to version and description. * This needs to be set to something. * reflecting the change in values.yaml from the previous commit. * Reflecting the move to `stable/`. * Preventing global namespace collisions. * Adding service account support. * Renaming to avoid confusion * Removing the this because it can cause problems. * This was unintended, removing lets K8s use the default. * Review fixes. * Moving the majority of these into `extraArgs`. I've picked the set of command line options we use in our rig, i.e. the ones where we don't use the defaults. I /think/ this is a sane set. * Minor tweaks * Conform to standard RBAC pattern * Update NOTES.txt * Update README * Make domainFilters a list
This commit is contained in:
committed by
Michael Goodness
parent
967a0e5d45
commit
9047424a62
@@ -0,0 +1,21 @@
|
||||
# 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
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
description: Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services
|
||||
name: external-dns
|
||||
version: 0.1.0
|
||||
appVersion: 0.4.2
|
||||
home: https://github.com/kubernetes-incubator/external-dns
|
||||
sources:
|
||||
- https://github.com/kubernetes-incubator/external-dns
|
||||
engine: gotpl
|
||||
@@ -0,0 +1,56 @@
|
||||
# external-dns
|
||||
|
||||
## Chart Details
|
||||
|
||||
This chart will do the following:
|
||||
|
||||
* Create a deployment of [external-dns] within your Kubernetes Cluster.
|
||||
|
||||
Currently this uses the [Zalando] hosted container, if this is a concern follow the steps in the [external-dns] documentation to compile the binary and make a container. Where the chart pulls the image from is fully configurable.
|
||||
|
||||
## Notes
|
||||
|
||||
You probably want to make sure the nodes have IAM permissions to modify the R53 entries. More on this later.
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `my-release`:
|
||||
|
||||
```bash
|
||||
$ helm install --name my-release stable/external-dns
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following tables lists the configurable parameters of the external-dns chart and their default values.
|
||||
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
|
||||
| `domainFilters` | Limit possible target zones by domain suffixes (optional). | `[]` |
|
||||
| `extraArgs` | Optional object of extra args, as `name`: `value` pairs. Where the name is the command line arg to external-dns. | `{}` |
|
||||
| `image.name` | Container image name (Including repository name if not `hub.docker.com`). | `registry.opensource.zalan.do/teapot/external-dns` |
|
||||
| `image.pullPolicy` | Container pull policy. | `IfNotPresent` |
|
||||
| `image.tag` | Container image tag. | `v0.4.2` |
|
||||
| `podAnnotations` | Additional annotations to apply to the pod. | `{}` |
|
||||
| `policy` | Modify how DNS records are sychronized between sources and providers (options: sync, upsert-only ). | `upsert-only` |
|
||||
| `provider` | The DNS provider where the DNS records will be created (options: aws, google, azure, cloudflare, digitalocean, inmemory ). | `aws` |
|
||||
| `rbac.create` | If true, create & use RBAC resources | `false` |
|
||||
| `rbac.serviceAccountName` | existing ServiceAccount to use (ignored if rbac.create=true) | `default` |
|
||||
| `resources` | CPU/Memory resource requests/limits. | `{}` |
|
||||
| `sources` | List of resource types to monitor, possible values are fake, service or ingress. | `[service, ingress]` |
|
||||
|
||||
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.
|
||||
|
||||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
|
||||
|
||||
```bash
|
||||
$ helm install --name my-release -f values.yaml stable/external-dns
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
|
||||
[external-dns]: https://github.com/kubernetes-incubator/external-dns
|
||||
[Zalando]: https://zalando.github.io/
|
||||
[getting-started]: https://github.com/kubernetes-incubator/external-dns/blob/master/README.md#getting-started
|
||||
@@ -0,0 +1,3 @@
|
||||
To verify that external-dns has started, run:
|
||||
|
||||
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "name" . }},release={{ .Release.Name }}"
|
||||
@@ -0,0 +1,23 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "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).
|
||||
*/}}
|
||||
{{- define "external-dns.fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Generate basic labels */}}
|
||||
{{- define "external-dns.labels" }}
|
||||
app: {{ template "name" . }}
|
||||
heritage: {{.Release.Service }}
|
||||
release: {{.Release.Name }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,36 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels: {{ include "external-dns.labels" . | indent 4 }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
name: {{ template "external-dns.fullname" . }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: {{ include "external-dns.labels" . | indent 8 }}
|
||||
{{- if .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.podAnnotations | indent 8}}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "name" . }}
|
||||
image: "{{.Values.image.name}}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
|
||||
args:
|
||||
- --provider={{ .Values.provider }}
|
||||
- --policy={{ .Values.policy }}
|
||||
{{- range .Values.domainFilters }}
|
||||
- --domain-filter={{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.sources }}
|
||||
- --source={{ . }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- if .Values.resources }}
|
||||
resources:
|
||||
{{ toYaml .Values.resources | indent 12 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ if .Values.rbac.create }}{{ template "external-dns.fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
labels: {{ include "external-dns.labels" . | indent 4 }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
name: {{ template "external-dns.fullname" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,43 @@
|
||||
## Details about the image to be pulled.
|
||||
image:
|
||||
name: registry.opensource.zalan.do/teapot/external-dns
|
||||
tag: v0.4.2
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
## This controls which types of resource external-dns should 'watch' for new
|
||||
## DNS entries.
|
||||
sources:
|
||||
- service
|
||||
- ingress
|
||||
|
||||
## The DNS provider where the DNS records will be created (options: aws, google, inmemory, azure )
|
||||
provider: aws
|
||||
|
||||
## Limit possible target zones by domain suffixes (optional)
|
||||
domainFilters: []
|
||||
|
||||
## Modify how DNS records are sychronized between sources and providers (options: sync, upsert-only )
|
||||
policy: upsert-only
|
||||
|
||||
## Annotations to be added to pods
|
||||
##
|
||||
podAnnotations: {}
|
||||
|
||||
extraArgs: {}
|
||||
|
||||
## CPU and Memory limit and request for external-dns
|
||||
resources: {}
|
||||
# limits:
|
||||
# memory: 50Mi
|
||||
# requests:
|
||||
# memory: 50Mi
|
||||
# cpu: 10m
|
||||
|
||||
rbac:
|
||||
## If true, create & use RBAC resources
|
||||
##
|
||||
create: false
|
||||
|
||||
## Ignored if rbac.create is true
|
||||
##
|
||||
serviceAccountName: default
|
||||
Reference in New Issue
Block a user