Commit 9341c195 by Guangbo Chen Committed by Craig Jellick

Add basecopy external-dns to v0.0.2

parent e551fd1b
# 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
apiVersion: v1
description: |
Configure external DNS servers (AWS Route53, Google CloudDNS and others)
for Kubernetes Ingresses and Services
name: rancher-external-dns
version: 0.0.1
appVersion: 0.5.11
home: https://github.com/kubernetes-incubator/external-dns
sources:
- https://github.com/kubernetes-incubator/external-dns
engine: gotpl
maintainers:
- name: rabadin
email: rabadin@cisco.com
To verify that external-dns has started, run:
kubectl --namespace={{ .Release.Namespace }} get pods -l "app={{ template "external-dns.name" . }},release={{ .Release.Name }}"
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "external-dns.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 -}}
{{- if ne $name .Release.Name -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s" $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/* Generate basic labels */}}
{{- define "external-dns.labels" }}
app: {{ template "external-dns.name" . }}
heritage: {{.Release.Service }}
release: {{.Release.Name }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels }}
{{- end }}
{{- end }}
{{- define "external-dns.aws-credentials" }}
[default]
aws_access_key_id = {{ .Values.aws.accessKey }}
aws_secret_access_key = {{ .Values.aws.secretKey }}
{{ end }}
{{- define "external-dns.aws-config" }}
[profile default]
{{- if .Values.aws.roleArn }}
role_arn = {{ .Values.aws.roleArn }}
{{- end }}
region = {{ .Values.aws.region }}
source_profile = default
{{ end }}
{{- define "external-dns.alibabacloud-config" }}
accessKeyId: {{ .Values.alibabacloud.accessKey }}
accessKeySecret: {{ .Values.alibabacloud.secretKey }}
{{ end }}
{{- define "system_default_registry" -}}
{{- if .Values.global.systemDefaultRegistry -}}
{{- printf "%s/" .Values.global.systemDefaultRegistry -}}
{{- else -}}
{{- "" -}}
{{- end -}}
{{- end -}}
\ No newline at end of file
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRole
metadata:
labels: {{ include "external-dns.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "external-dns.fullname" . }}
rules:
- apiGroups:
- ""
resources:
- services
- pods
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- networking.istio.io
resources:
- gateways
verbs:
- get
- list
- watch
{{- end -}}
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRoleBinding
metadata:
labels: {{ include "external-dns.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "external-dns.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "external-dns.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "external-dns.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end -}}
{{- if and (eq .Values.provider "designate") .Values.designate.customCA.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "external-dns.fullname" . }}
labels: {{ include "external-dns.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
data:
{{ .Values.designate.customCA.filename }}: |
{{ .Values.designate.customCA.content | indent 4 }}
{{- end }}
{{- if or (and .Values.aws.secretKey .Values.aws.accessKey) .Values.cloudflare.apiKey (and .Values.infoblox.wapiUsername .Values.infoblox.wapiPassword) .Values.extraEnv .Values.google.serviceAccountKey (and .Values.alibabacloud.secretKey .Values.alibabacloud.accessKey) -}}
apiVersion: v1
kind: Secret
metadata:
labels: {{ include "external-dns.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "external-dns.fullname" . }}
type: Opaque
data:
{{- if eq .Values.provider "aws" }}
credentials: {{ include "external-dns.aws-credentials" . | b64enc | quote }}
config: {{ include "external-dns.aws-config" . | b64enc | quote }}
{{- end}}
{{- if and (eq .Values.provider "google") .Values.google.serviceAccountKey }}
credentials.json: {{ .Values.google.serviceAccountKey | b64enc | quote }}
{{- end}}
{{- if .Values.cloudflare.apiKey }}
cloudflare_api_key: {{ .Values.cloudflare.apiKey | b64enc | quote }}
{{- end }}
{{- if and .Values.infoblox.wapiUsername .Values.infoblox.wapiPassword }}
infoblox_wapi_username: {{ .Values.infoblox.wapiUsername | b64enc | quote }}
infoblox_wapi_password: {{ .Values.infoblox.wapiPassword | b64enc | quote }}
{{- end }}
{{- if eq .Values.provider "alibabacloud" }}
config.yaml: {{ include "external-dns.alibabacloud-config" . | b64enc | quote }}
{{- end}}
{{- range .Values.extraEnv }}
{{- if .value }}
{{ .name }}: {{ .value | b64enc | quote }}
{{- end }}
{{- end }}
{{- end }}
apiVersion: v1
kind: Service
metadata:
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
{{- end }}
labels:
app: {{ template "external-dns.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
name: {{ template "external-dns.fullname" . }}
spec:
{{- if .Values.service.clusterIP }}
clusterIP: "{{ .Values.service.clusterIP }}"
{{- end }}
{{- if .Values.service.externalIPs }}
externalIPs:
{{ toYaml .Values.service.externalIPs | indent 4 }}
{{- end }}
{{- if .Values.service.loadBalancerIP }}
loadBalancerIP: "{{ .Values.service.loadBalancerIP }}"
{{- end }}
{{- if .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{ toYaml .Values.service.loadBalancerSourceRanges | indent 4 }}
{{- end }}
ports:
- port: {{ .Values.service.servicePort }}
protocol: TCP
targetPort: 7979
name: http
selector:
app: {{ template "external-dns.name" . }}
release: {{ .Release.Name }}
type: "{{ .Values.service.type }}"
{{- 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 }}
## Details about the image to be pulled.
image:
repository: rancher/kubernetes-external-dns
tag: v0.5.11
pullSecrets: []
pullPolicy: IfNotPresent
## This controls which types of resource external-dns should 'watch' for new
## DNS entries.
sources:
- service
- ingress
# Allow external-dns to publish DNS records for ClusterIP services (optional)
publishInternalServices: false
## The DNS provider where the DNS records will be created (options: aws, google, inmemory, azure, alibabacloud )
provider: aws
# Configurations for Alibabacloud provider
alibabacloud:
accessKey: ""
secretKey: ""
# Filter for zones of this type (optional, options: public, private or no value for both)
zoneType: ""
# AWS Access keys to inject as environment variables
aws:
secretKey: ""
accessKey: ""
# pre external-dns 0.5.9 home dir should be `/root/.aws`
credentialsPath: "/.aws"
roleArn: ""
region: "us-east-1"
# Filter for zones of this type (optional, options: public, private)
zoneType: ""
azure:
# If you don't specify a secret to load azure.json from, you will get the host's /etc/kubernetes/azure.json
secretName: ""
# Cloudflare keys to inject as environment variables
cloudflare:
apiKey: ""
email: ""
proxied: true
# Configuration for OpenStack Designate provider
designate:
# A custom CA (optional)
customCA:
# Turn custom CA on or off
enabled: false
# The content of the custom CA file
content: ""
# Location to mount custom CA
directory: "/config/designate"
# Filename of the custom CA
filename: "designate-ca.pem"
# When using the Google provider, specify the Google project (required when provider=google)
google:
project: ""
serviceAccountSecret: ""
serviceAccountKey: ""
# Infoblox keys to inject
infoblox:
# Required keys:
wapiUsername: ""
wapiPassword: ""
gridHost: ""
# Optional keys:
domainFilter: ""
noSslVerify: false
wapiPort: ""
wapiVersion: ""
wapiConnectionPoolSize: ""
wapiHttpTimeout: ""
## Limit possible target zones by domain suffixes (optional)
domainFilters: []
## Limit possible target zones by zone id (optional)
zoneIdFilters: []
# Filter sources managed by external-dns via annotation using label selector semantics (default: all sources)
annotationFilter: ""
## Adjust the interval for DNS updates
interval: "1m"
# Registry to use for ownership (txt or noop)
registry: "txt"
# When using the TXT registry, a name that identifies this instance of ExternalDNS
txtOwnerId: ""
# When enabled, prints DNS record changes rather than actually performing them
dryRun: false
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## List of node taints to tolerate (requires Kubernetes >= 1.6)
tolerations: []
## Modify how DNS records are sychronized between sources and providers (options: sync, upsert-only )
policy: upsert-only
## Annotations to be added to pods
##
podAnnotations: {}
podLabels: {}
# Verbosity of the logs (options: panic, debug, info, warn, error, fatal)
logLevel: info
extraArgs: {}
# Extra environment variables which will be saved in a release-specific secret
# or retrieved via valueFrom.
# extraEnv:
# - name: SECRET_TO_SAVE
# value: secret_value
# - name: AWS_ACCESS_KEY_ID
# valueFrom:
# secretKeyRef:
# name: existing-secret
# key: access-key-id
extraEnv: []
## CPU and Memory limit and request for external-dns
resources:
limits:
memory: 100Mi
cpu: 200m
requests:
memory: 50Mi
cpu: 100m
rbac:
## If true, create & use RBAC resources
##
create: false
# Beginning with Kubernetes 1.8, the api is stable and v1 can be used.
apiVersion: v1beta1
## Ignored if rbac.create is true
##
serviceAccountName: default
securityContext: {}
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 65534 # 65534 is nobody - revise aws.credentialsPath when changing uid
# capabilities:
# drop: ["ALL"]
service:
annotations: {}
clusterIP: ""
## List of IP addresses at which the service is available
## Ref: https://kubernetes.io/docs/user-guide/services/#external-ips
##
externalIPs: []
loadBalancerIP: ""
loadBalancerSourceRanges: []
servicePort: 7979
type: ClusterIP
priorityClassName: ""
global:
systemDefaultRegistry: ""
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment