diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
new file mode 100644
index 000000000..12179cb20
--- /dev/null
+++ b/.github/workflows/docs.yml
@@ -0,0 +1,43 @@
+name: Release Docs
+
+on:
+ push:
+ tags:
+ - "v*"
+
+jobs:
+ release_docs:
+ name: Release Docs
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - uses: actions/setup-python@v2
+ with:
+ python-version: "3.10"
+ cache: "pip"
+ cache-dependency-path: "./docs/scripts/requirements.txt"
+
+ - uses: actions/setup-go@v2
+ with:
+ go-version: ^1.17
+
+ - run: |
+ pip install -r docs/scripts/requirements.txt
+
+ - name: setup
+ run: |
+ ./docs/scripts/copy_docs.sh
+ go run ./docs/scripts/docs.go
+
+ - name: Configure Git user
+ run: |
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+
+ - name: build and push
+ run: |
+ mike deploy ${{ github.ref_name }} latest --push --update-aliases
+ mike set-default --push latest
diff --git a/.gitignore b/.gitignore
index 80a6ea158..ee7a88934 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,3 +54,10 @@ profile.cov
# Helm charts
!/charts/external-dns/
+
+docs/LICENSE.md
+docs/code-of-conduct.md
+docs/CONTRIBUTING.md
+docs/index.md
+docs/redirect
+site
\ No newline at end of file
diff --git a/README.md b/README.md
index d77f89ff0..3e5d1747e 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,16 @@
+---
+hide:
+ - toc
+ - navigation
+---
+
-
+
# ExternalDNS
-[](https://github.com/kubernetes-sigs/external-dns/actions)
-[](https://coveralls.io/github/kubernetes-sigs/external-dns)
-[](https://github.com/kubernetes-sigs/external-dns/releases)
-[](https://godoc.org/github.com/kubernetes-sigs/external-dns)
-[](https://goreportcard.com/report/github.com/kubernetes-sigs/external-dns)
+
+[](https://github.com/kubernetes-sigs/external-dns/actions) [](https://coveralls.io/github/kubernetes-sigs/external-dns) [](https://github.com/kubernetes-sigs/external-dns/releases) [](https://godoc.org/github.com/kubernetes-sigs/external-dns) [](https://goreportcard.com/report/github.com/kubernetes-sigs/external-dns)
ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers.
@@ -23,7 +26,7 @@ To see ExternalDNS in action, have a look at this [video](https://www.youtube.co
## The Latest Release
-ExternalDNS' allows you to keep selected zones (via `--domain-filter`) synchronized with Ingresses and Services of `type=LoadBalancer` and nodes in various cloud providers:
+ExternalDNS allows you to keep selected zones (via `--domain-filter`) synchronized with Ingresses and Services of `type=LoadBalancer` and nodes in various cloud providers:
* [Google Cloud DNS](https://cloud.google.com/dns/docs/)
* [AWS Route 53](https://aws.amazon.com/route53/)
* [AWS Cloud Map](https://docs.aws.amazon.com/cloud-map/)
diff --git a/charts/external-dns/README.md b/charts/external-dns/README.md
index ae56149ec..cd6be88be 100644
--- a/charts/external-dns/README.md
+++ b/charts/external-dns/README.md
@@ -37,6 +37,7 @@ The following table lists the configurable parameters of the _ExternalDNS_ chart
| `podLabels` | Labels to add to the pod. | `{}` |
| `podAnnotations` | Annotations to add to the pod. | `{}` |
| `podSecurityContext` | Security context for the pod, this supports the full [PodSecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#podsecuritycontext-v1-core) API. | _see values.yaml_ |
+| `shareProcessNamespace` | If `true` enable [Process Namespace Sharing](https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/) | `false` |
| `securityContext` | Security context for the _external-dns_ container, this supports the full [SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#securitycontext-v1-core) API. | _see values.yaml_ |
| `priorityClassName` | Priority class name to use for the pod. | `""` |
| `terminationGracePeriodSeconds` | Termination grace period for the pod. | `null` |
diff --git a/charts/external-dns/templates/deployment.yaml b/charts/external-dns/templates/deployment.yaml
index 19e19ab5c..dd8890fe3 100644
--- a/charts/external-dns/templates/deployment.yaml
+++ b/charts/external-dns/templates/deployment.yaml
@@ -30,6 +30,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "external-dns.serviceAccountName" . }}
+ {{- with .Values.shareProcessNamespace }}
+ shareProcessNamespace: {{ . }}
+ {{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
diff --git a/charts/external-dns/values.yaml b/charts/external-dns/values.yaml
index efd2e7cd8..0a121c7e0 100644
--- a/charts/external-dns/values.yaml
+++ b/charts/external-dns/values.yaml
@@ -34,6 +34,8 @@ podLabels: {}
# Annotations to add to the Pod
podAnnotations: {}
+shareProcessNamespace: false
+
podSecurityContext:
fsGroup: 65534
diff --git a/img/external-dns.png b/docs/img/external-dns.png
similarity index 100%
rename from img/external-dns.png
rename to docs/img/external-dns.png
diff --git a/docs/scripts/copy_docs.sh b/docs/scripts/copy_docs.sh
new file mode 100755
index 000000000..7e114b84a
--- /dev/null
+++ b/docs/scripts/copy_docs.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -eo pipefail
+
+cp CONTRIBUTING.md code-of-conduct.md ./docs/
+
+cp LICENSE ./docs/LICENSE.md
+
+cp README.md ./docs/index.md
diff --git a/docs/scripts/docs.go b/docs/scripts/docs.go
new file mode 100644
index 000000000..2a79b6f01
--- /dev/null
+++ b/docs/scripts/docs.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2017 The Kubernetes Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package main
+
+import (
+ "log"
+ "os"
+ "strings"
+)
+
+func removeLinkPrefixInIndex() {
+ content, err := os.ReadFile("./docs/index.md")
+ if err != nil {
+ log.Fatalf("Could not read index.md file. Make sure to run copy_docs.sh script first. Original error: %s", err)
+ }
+
+ updatedContent := strings.ReplaceAll(string(content), "](./docs/", "](")
+ updatedContent = strings.ReplaceAll(updatedContent, "](docs/", "](")
+
+ f, err := os.OpenFile("./docs/index.md", os.O_RDWR, 0644)
+ if err != nil {
+ log.Fatalf("Could not open index.md file to update content. Original error: %s", err)
+ }
+ defer f.Close()
+
+ if _, err := f.WriteString(updatedContent); err != nil {
+ log.Fatalf("Failed writing links update to index.md. Original error: %s", err)
+ }
+}
+
+func main() {
+ removeLinkPrefixInIndex()
+}
diff --git a/docs/scripts/index.html.gotmpl b/docs/scripts/index.html.gotmpl
new file mode 100644
index 000000000..26b836eba
--- /dev/null
+++ b/docs/scripts/index.html.gotmpl
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/docs/scripts/requirements.txt b/docs/scripts/requirements.txt
new file mode 100644
index 000000000..cacaecf19
--- /dev/null
+++ b/docs/scripts/requirements.txt
@@ -0,0 +1,5 @@
+mkdocs-git-revision-date-localized-plugin == 1.0.0
+mkdocs == 1.3.0
+mkdocs-material == 8.2.8
+mkdocs-literate-nav == 0.4.0
+mike == 1.1.2
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 000000000..c1b9ed623
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,86 @@
+site_name: external-dns
+site_author: external-dns maintainers
+
+repo_name: kubernetes-sigs/external-dns
+repo_url: https://github.com/kubernetes-sigs/external-dns/
+
+nav:
+ - index.md
+ - Tutorials: tutorials/
+ - Advanced Topics:
+ - Initial Design: initial-design.md
+ - TTL: ttl.md
+ - Contributing:
+ - Kubernetes Contributions: CONTRIBUTING.md
+ - Release: release.md
+ - contributing/*
+ - About:
+ - FAQ: faq.md
+ - Out of Incubator: 20190708-external-dns-incubator.md
+ - Code of Conduct: code-of-conduct.md
+ - License: LICENSE.md
+
+theme:
+ name: material
+ features:
+ - content.code.annotate
+ - navigation.top
+ - navigation.tracking
+ - navigation.indexes
+ - navigation.instant
+ - navigation.tabs
+ - navigation.tabs.sticky
+
+extra:
+ version:
+ provider: mike
+
+markdown_extensions:
+ - meta
+ - tables
+ - toc:
+ permalink: true
+ - abbr
+ - extra
+ - admonition
+ - smarty
+ - sane_lists
+ - nl2br
+ - attr_list
+ - def_list
+ - footnotes
+ - md_in_html
+ - pymdownx.arithmatex:
+ generic: true
+ - pymdownx.betterem:
+ smart_enable: all
+ - pymdownx.caret
+ - pymdownx.details
+ - pymdownx.emoji:
+ emoji_index: !!python/name:materialx.emoji.twemoji
+ emoji_generator: !!python/name:materialx.emoji.to_svg
+ - pymdownx.highlight:
+ use_pygments: true
+ anchor_linenums: true
+ - pymdownx.inlinehilite
+ - pymdownx.keys
+ - pymdownx.mark
+ - pymdownx.smartsymbols
+ - pymdownx.snippets
+ - pymdownx.superfences:
+ custom_fences:
+ - name: mermaid
+ class: mermaid
+ format: !!python/name:pymdownx.superfences.fence_code_format
+ - pymdownx.tabbed:
+ alternate_style: true
+ - pymdownx.tilde
+ - pymdownx.tasklist:
+ custom_checkbox: true
+
+plugins:
+ - search
+ - literate-nav
+ - git-revision-date-localized:
+ type: date
+ fallback_to_build_date: true
diff --git a/provider/bluecat/bluecat.go b/provider/bluecat/bluecat.go
index 2c25406fb..2205ba3ed 100644
--- a/provider/bluecat/bluecat.go
+++ b/provider/bluecat/bluecat.go
@@ -15,7 +15,6 @@ limitations under the License.
*/
// TODO: Ensure we have proper error handling/logging for API calls to Bluecat. getBluecatGatewayToken has a good example of this
-// TODO: Remove naked returns
// TODO: Remove studdering
// TODO: Make API calls more consistent (eg error handling on HTTP response codes)
// TODO: zone-id-filter does not seem to work with our provider
@@ -431,7 +430,8 @@ func (p *BluecatProvider) deleteRecords(deleted bluecatChangeMap) {
}
}
-func (p *BluecatProvider) recordSet(ep *endpoint.Endpoint, getObject bool) (recordSet bluecatRecordSet, err error) {
+func (p *BluecatProvider) recordSet(ep *endpoint.Endpoint, getObject bool) (bluecatRecordSet, error) {
+ recordSet := bluecatRecordSet{}
switch ep.RecordType {
case endpoint.RecordTypeA:
var res []api.BluecatHostRecord
@@ -443,9 +443,9 @@ func (p *BluecatProvider) recordSet(ep *endpoint.Endpoint, getObject bool) (reco
}
if getObject {
var record api.BluecatHostRecord
- err = p.gatewayClient.GetHostRecord(ep.DNSName, &record)
+ err := p.gatewayClient.GetHostRecord(ep.DNSName, &record)
if err != nil {
- return
+ return bluecatRecordSet{}, err
}
res = append(res, record)
}
@@ -463,9 +463,9 @@ func (p *BluecatProvider) recordSet(ep *endpoint.Endpoint, getObject bool) (reco
}
if getObject {
var record api.BluecatCNAMERecord
- err = p.gatewayClient.GetCNAMERecord(ep.DNSName, &record)
+ err := p.gatewayClient.GetCNAMERecord(ep.DNSName, &record)
if err != nil {
- return
+ return bluecatRecordSet{}, err
}
res = append(res, record)
}
@@ -483,9 +483,9 @@ func (p *BluecatProvider) recordSet(ep *endpoint.Endpoint, getObject bool) (reco
}
if getObject {
var record api.BluecatTXTRecord
- err = p.gatewayClient.GetTXTRecord(ep.DNSName, &record)
+ err := p.gatewayClient.GetTXTRecord(ep.DNSName, &record)
if err != nil {
- return
+ return bluecatRecordSet{}, err
}
res = append(res, record)
}
@@ -494,7 +494,7 @@ func (p *BluecatProvider) recordSet(ep *endpoint.Endpoint, getObject bool) (reco
res: &res,
}
}
- return
+ return recordSet, nil
}
// extractOwnerFromTXTRecord takes a single text property string and returns the owner after parsing the owner string.
diff --git a/source/istio_gateway.go b/source/istio_gateway.go
index ffd8b79d1..4f5a68ddf 100644
--- a/source/istio_gateway.go
+++ b/source/istio_gateway.go
@@ -171,6 +171,11 @@ func (sc *gatewaySource) Endpoints(ctx context.Context) ([]*endpoint.Endpoint, e
return nil, err
}
+ if len(gwEndpoints) == 0 {
+ log.Debugf("No endpoints could be generated from gateway %s/%s", gateway.Namespace, gateway.Name)
+ continue
+ }
+
log.Debugf("Endpoints generated from gateway: %s/%s: %v", gateway.Namespace, gateway.Name, gwEndpoints)
sc.setResourceLabel(gateway, gwEndpoints)
endpoints = append(endpoints, gwEndpoints...)