Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1115 from kinvolk/imran/update-external-dns-to-0.7.4
Browse files Browse the repository at this point in the history
external-dns: update component to 0.7.4
  • Loading branch information
ipochi authored Oct 28, 2020
2 parents 4adc487 + 4079f59 commit 13a331a
Show file tree
Hide file tree
Showing 12 changed files with 263 additions and 69 deletions.
36 changes: 19 additions & 17 deletions assets/charts/components/external-dns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
annotations:
category: DeveloperTools
apiVersion: v1
name: external-dns
version: 3.3.0
appVersion: 0.7.3
description: ExternalDNS is a Kubernetes addon that configures public DNS servers with information about exposed Kubernetes services to make them discoverable.
keywords:
- external-dns
- network
- dns
home: https://github.com/kubernetes-sigs/external-dns
sources:
- https://github.com/kubernetes-sigs/external-dns
- https://github.com/bitnami/bitnami-docker-external-dns
maintainers:
- name: Bitnami
email: containers@bitnami.com
appVersion: 0.7.4
description: ExternalDNS is a Kubernetes addon that configures public DNS servers
with information about exposed Kubernetes services to make them discoverable.
engine: gotpl
home: https://github.com/bitnami/charts/tree/master/bitnami/external-dns
icon: https://bitnami.com/assets/stacks/external-dns/img/external-dns-stack-110x117.png
annotations:
category: DeveloperTools
keywords:
- external-dns
- network
- dns
maintainers:
- email: containers@bitnami.com
name: Bitnami
name: external-dns
sources:
- https://github.com/kubernetes-sigs/external-dns
- https://github.com/bitnami/bitnami-docker-external-dns
- https://github.com/kubernetes-sigs/external-dns
version: 3.4.9
6 changes: 4 additions & 2 deletions assets/charts/components/external-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following table lists the configurable parameters of the external-dns chart
| `aws.preferCNAME` | When using the AWS provider, replaces Alias records with CNAME (options: true, false) | `[]` |
| `aws.evaluateTargetHealth` | When using the AWS provider, sets the evaluate target health flag (options: true, false) | `[true, false]` |
| `azure.secretName` | When using the Azure provider, set the secret containing the `azure.json` file | `""` |
| `azure.cloud` | When using the Azure provider, set the Azure Clound | `""` |
| `azure.cloud` | When using the Azure provider, set the Azure Cloud | `""` |
| `azure.resourceGroup` | When using the Azure provider, set the Azure Resource Group | `""` |
| `azure.tenantId` | When using the Azure provider, set the Azure Tenant ID | `""` |
| `azure.subscriptionId` | When using the Azure provider, set the Azure Subscription ID | `""` |
Expand Down Expand Up @@ -182,12 +182,14 @@ The following table lists the configurable parameters of the external-dns chart
| `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` |
| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | `[]` |
| `service.annotations` | Annotations to add to service | `{}` |
| `service.labels` | Labels to add to service | `{}` |
| `serviceAccount.create` | Determine whether a Service Account should be created or it should reuse a exiting one. | `true` |
| `serviceAccount.name` | ServiceAccount to use. A name is generated using the external-dns.fullname template if it is not set | `nil` |
| `serviceAccount.annotations` | Additional Service Account annotations | `{}` |
| `rbac.create` | Weather to create & use RBAC resources or not | `true` |
| `rbac.create` | Whether to create & use RBAC resources or not | `true` |
| `rbac.apiVersion` | Version of the RBAC API | `v1beta1` |
| `rbac.pspEnabled` | PodSecurityPolicy | `false` |
| `rbac.clusterRole` | Whether to create Cluster Role. When set to false creates a Role in `namespace` | `true` |
| `resources` | CPU/Memory resource requests/limits. | `{}` |
| `livenessProbe` | Deployment Liveness Probe | See `values.yaml` |
| `readinessProbe` | Deployment Readiness Probe | See `values.yaml` |
Expand Down
93 changes: 66 additions & 27 deletions assets/charts/components/external-dns/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{/* podAnnotations */}}
{{- define "external-dns.podAnnotations" -}}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations }}
{{- end }}
{{- if .Values.metrics.podAnnotations }}
{{- toYaml .Values.metrics.podAnnotations }}
{{ toYaml .Values.metrics.podAnnotations }}
{{- end }}
{{- end -}}

Expand Down Expand Up @@ -224,9 +224,12 @@ Compile all warnings into a single message, and call fail.
{{- $messages := append $messages (include "external-dns.validateValues.infoblox.wapiPassword" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.pdns.apiUrl" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.pdns.apiKey" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.resourceGroup" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.tenantId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.subscriptionId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.resourceGroupWithoutTenantId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.resourceGroupWithoutSubscriptionId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.tenantIdWithoutResourceGroup" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.tenantIdWithoutSubscriptionId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.subscriptionIdWithoutResourceGroup" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.subscriptionIdWithoutTenantId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.useManagedIdentityExtensionAadClientId" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.useManagedIdentityExtensionAadClientSecret" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.azure.aadClientId" .) -}}
Expand Down Expand Up @@ -281,7 +284,7 @@ Validate values of External DNS:
*/}}
{{- define "external-dns.validateValues.aws" -}}
{{- if and (eq .Values.provider "aws") .Values.aws.assumeRoleArn -}}
{{- if not (regexMatch "^arn:aws:iam::.*$" .Values.aws.assumeRoleArn) -}}
{{- if not (regexMatch "^arn:(aws|aws-us-gov|aws-cn):iam::.*$" .Values.aws.assumeRoleArn) -}}
external-dns: aws.assumeRoleArn
The AWS Role to assume must follow ARN format: `arn:aws:iam::123455567:role/external-dns`
Ref: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
Expand Down Expand Up @@ -359,36 +362,72 @@ WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.t

{{/*
Validate values of Azure DNS:
- must provide the Azure Resource Group when provider is "azure"
- must provide the Azure Resource Group when provider is "azure" and tenantId is set
*/}}
{{- define "external-dns.validateValues.azure.resourceGroup" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.resourceGroup) (not .Values.azure.secretName) -}}
{{- define "external-dns.validateValues.azure.resourceGroupWithoutTenantId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.resourceGroup) (not .Values.azure.secretName) .Values.azure.tenantId -}}
external-dns: azure.resourceGroup
You must provide the Azure Resource Group when provider="azure".
You must provide the Azure Resource Group when provider="azure" and tenantId is set.
Please set the resourceGroup parameter (--set azure.resourceGroup="xxxx")
{{- end -}}
{{- end -}}

{{/*
Validate values of Azure DNS:
- must provide the Azure Tenant ID when provider is "azure" and secretName is not set
- must provide the Azure Resource Group when provider is "azure" and subscriptionId is set
*/}}
{{- define "external-dns.validateValues.azure.tenantId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.tenantId) (not .Values.azure.secretName) -}}
{{- define "external-dns.validateValues.azure.resourceGroupWithoutSubscriptionId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.resourceGroup) (not .Values.azure.secretName) .Values.azure.subscriptionId -}}
external-dns: azure.resourceGroup
You must provide the Azure Resource Group when provider="azure" and subscriptionId is set.
Please set the resourceGroup parameter (--set azure.resourceGroup="xxxx")
{{- end -}}
{{- end -}}

{{/*
Validate values of Azure DNS:
- must provide the Azure Tenant ID when provider is "azure" and secretName is not set and resourceGroup is set
*/}}
{{- define "external-dns.validateValues.azure.tenantIdWithoutResourceGroup" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.tenantId) (not .Values.azure.secretName) .Values.azure.resourceGroup -}}
external-dns: azure.tenantId
You must provide the Azure Tenant ID when provider="azure".
You must provide the Azure Tenant ID when provider="azure" and resourceGroup is set.
Please set the tenantId parameter (--set azure.tenantId="xxxx")
{{- end -}}
{{- end -}}

{{/*
Validate values of Azure DNS:
- must provide the Azure Subscription ID when provider is "azure" and secretName is not set
- must provide the Azure Tenant ID when provider is "azure" and secretName is not set and subscriptionId is set
*/}}
{{- define "external-dns.validateValues.azure.subscriptionId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.subscriptionId) (not .Values.azure.secretName) -}}
{{- define "external-dns.validateValues.azure.tenantIdWithoutSubscriptionId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.tenantId) (not .Values.azure.secretName) .Values.azure.subscriptionId -}}
external-dns: azure.tenantId
You must provide the Azure Tenant ID when provider="azure" and subscriptionId is set.
Please set the tenantId parameter (--set azure.tenantId="xxxx")
{{- end -}}
{{- end -}}

{{/*
Validate values of Azure DNS:
- must provide the Azure Subscription ID when provider is "azure" and secretName is not set and resourceGroup is set
*/}}
{{- define "external-dns.validateValues.azure.subscriptionIdWithoutResourceGroup" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.subscriptionId) (not .Values.azure.secretName) .Values.azure.resourceGroup -}}
external-dns: azure.subscriptionId
You must provide the Azure Subscription ID when provider="azure".
You must provide the Azure Subscription ID when provider="azure" and resourceGroup is set.
Please set the subscriptionId parameter (--set azure.subscriptionId="xxxx")
{{- end -}}
{{- end -}}

{{/*
Validate values of Azure DNS:
- must provide the Azure Subscription ID when provider is "azure" and secretName is not set and tenantId is set
*/}}
{{- define "external-dns.validateValues.azure.subscriptionIdWithoutTenantId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.subscriptionId) (not .Values.azure.secretName) .Values.azure.tenantId -}}
external-dns: azure.subscriptionId
You must provide the Azure Subscription ID when provider="azure" and tenantId is set.
Please set the subscriptionId parameter (--set azure.subscriptionId="xxxx")
{{- end -}}
{{- end -}}
Expand Down Expand Up @@ -419,24 +458,24 @@ external-dns: azure.useManagedIdentityExtension

{{/*
Validate values of Azure DNS:
- must provide the Azure AAD Client ID when provider is "azure", secretName is not set and MSI is disabled
- must provide the Azure AAD Client ID when provider is "azure", secretName is not set and MSI is disabled and aadClientSecret is set
*/}}
{{- define "external-dns.validateValues.azure.aadClientId" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.secretName) (not .Values.azure.aadClientId) (not .Values.azure.useManagedIdentityExtension) -}}
external-dns: azure.useManagedIdentityExtension
You must provide the Azure AAD Client ID when provider="azure" and useManagedIdentityExtension is not set.
Please set the aadClientSecret parameter (--set azure.aadClientId="xxxx")
{{- if and (eq .Values.provider "azure") (not .Values.azure.secretName) (not .Values.azure.aadClientId) (not .Values.azure.useManagedIdentityExtension) .Values.azure.aadClientSecret -}}
external-dns: azure.aadClientId
You must provide the Azure AAD Client ID when provider="azure" and aadClientSecret is set and useManagedIdentityExtension is not set.
Please set the aadClientId parameter (--set azure.aadClientId="xxxx")
{{- end -}}
{{- end -}}

{{/*
Validate values of Azure DNS:
- must provide the Azure AAD Client Secret when provider is "azure", secretName is not set and MSI is disabled
- must provide the Azure AAD Client Secret when provider is "azure", secretName is not set and MSI is disabled and aadClientId is set
*/}}
{{- define "external-dns.validateValues.azure.aadClientSecret" -}}
{{- if and (eq .Values.provider "azure") (not .Values.azure.secretName) (not .Values.azure.aadClientSecret) (not .Values.azure.useManagedIdentityExtension) -}}
external-dns: azure.useManagedIdentityExtension
You must provide the Azure AAD Client Secret when provider="azure" and useManagedIdentityExtension is not set.
{{- if and (eq .Values.provider "azure") (not .Values.azure.secretName) (not .Values.azure.aadClientSecret) (not .Values.azure.useManagedIdentityExtension) .Values.azure.aadClientId -}}
external-dns: azure.aadClientSecret
You must provide the Azure AAD Client Secret when provider="azure" and aadClientId is set and useManagedIdentityExtension is not set.
Please set the aadClientSecret parameter (--set azure.aadClientSecret="xxxx")
{{- end -}}
{{- end -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.rbac.create }}
{{- if and .Values.rbac.create .Values.rbac.clusterRole }}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRole
metadata:
Expand Down Expand Up @@ -49,6 +49,14 @@ rules:
verbs:
- patch
- update
- apiGroups:
- projectcontour.io
resources:
- httpproxies
verbs:
- get
- watch
- list
{{- if or .Values.crd.create .Values.crd.apiversion }}
- apiGroups:
{{- if .Values.crd.create }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.rbac.create }}
{{- if and .Values.rbac.create .Values.rbac.clusterRole }}
apiVersion: rbac.authorization.k8s.io/{{ .Values.rbac.apiVersion }}
kind: ClusterRoleBinding
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
labels: {{ include "external-dns.labels" . | nindent 8 }}
annotations:
{{- if or .Values.podAnnotations .Values.metrics.enabled }}
{{ include "external-dns.podAnnotations" . | nindent 8 }}
{{- include "external-dns.podAnnotations" . | trim | nindent 8 }}
{{- end }}
{{- if (include "external-dns.createSecret" .) }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
Expand Down
Loading

0 comments on commit 13a331a

Please sign in to comment.