Skip to content

Commit c76adc7

Browse files
authored
Merge branch 'kubernetes-sigs:master' into geoproximity
2 parents 464d255 + 2819c2f commit c76adc7

File tree

251 files changed

+9942
-10887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+9942
-10887
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Create Release
3+
about: Release template to track the next release
4+
title: Release x.y
5+
labels: area/release
6+
assignees: ''
7+
8+
---
9+
10+
This Issue tracks the next `external-dns` release. Please follow the guideline below. If anything is missing or unclear, please add a comment to this issue so this can be improved after the release.
11+
12+
#### Preparation Tasks
13+
14+
- [ ] Release [steps](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/release.md#steps)
15+
16+
#### Release Execution
17+
18+
- [ ] Branch out from the default branch and run scripts/version-updater.sh to update the image tag used in the kustomization.yaml and in documentation.
19+
- [ ] Create the PR with this version change.
20+
- [ ] Create an issue to release the corresponding Helm chart via the chart release process (below) assigned to a chart maintainer
21+
22+
#### After Release Tasks
23+
24+
- [ ] Announce release on `#external-dns` in Slack

.github/pull_request_template.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
<!--
2-
Please read https://github.com/kubernetes-sigs/external-dns#contributing before submitting
3-
your pull request. Please fill in each section below to help us better prioritize your pull request. Thanks!
4-
-->
1+
## What does it do ?
2+
3+
<!-- A brief description of the change being made with this pull request. -->
54

6-
**Description**
5+
## Motivation
76

8-
<!-- Please provide a summary of the change here. -->
7+
<!-- What inspired you to submit this pull request? -->
98

10-
<!-- Please link to all GitHub issue that this pull request implements(i.e. Fixes #123) -->
11-
Fixes #ISSUE
9+
## More
1210

13-
**Checklist**
11+
- [ ] Yes, this PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
12+
- [ ] Yes, I added unit tests
13+
- [ ] Yes, I updated end user documentation accordingly
1414

15-
- [ ] Unit tests updated
16-
- [ ] End user documentation updated
15+
<!--
16+
Please read https://github.com/kubernetes-sigs/external-dns#contributing before submitting
17+
your pull request. Please fill in each section below to help us better prioritize your pull request. Thanks!
18+
-->

.github/workflows/ci.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jobs:
1717
checks: write # to create a new check based on the results (shogo82148/actions-goveralls)
1818

1919
name: Build
20-
runs-on: ubuntu-latest
20+
runs-on: ${{ matrix.os }}
21+
strategy:
22+
matrix:
23+
# tests for target OS
24+
os: [ubuntu-latest, macos-latest]
2125
steps:
2226

2327
- name: Check out code into the Go module directory
@@ -38,7 +42,7 @@ jobs:
3842
run: |
3943
apt update
4044
apt install -y make gcc libc-dev git
41-
if: github.actor == 'nektos/act'
45+
if: github.actor == 'nektos/act' && matrix.os == 'ubuntu-latest'
4246

4347
- name: Test
4448
run: make test
@@ -47,5 +51,5 @@ jobs:
4751
uses: shogo82148/actions-goveralls@v1
4852
with:
4953
path-to-profile: profile.cov
50-
if: github.actor != 'nektos/act'
54+
if: github.actor != 'nektos/act' && matrix.os == 'ubuntu-latest'
5155
continue-on-error: true

.github/workflows/dependency-update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/[email protected]
1818
# https://github.com/renovatebot/github-action
1919
- name: self-hosted renovate
20-
uses: renovatebot/github-action@v41.0.20
20+
uses: renovatebot/github-action@v42.0.4
2121
with:
2222
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication
2323
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags:
66
- "v*"
7+
# See https://docs.github.com/fr/webhooks/webhook-events-and-payloads#workflow_dispatch
8+
# Can be used to update doc with latest tag
9+
workflow_dispatch:
710

811
permissions: {}
912

@@ -19,7 +22,7 @@ jobs:
1922
with:
2023
fetch-depth: 0
2124

22-
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
25+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
2326
with:
2427
python-version: "3.12"
2528
cache: "pip"
@@ -35,5 +38,9 @@ jobs:
3538
3639
- name: build and push
3740
run: |
38-
mike deploy ${{ github.ref_name }} latest --push --update-aliases
41+
VERSION="${{ github.ref_name }}"
42+
if [[ ${{ github.event_name }} == "workflow_dispatch" ]]; then
43+
VERSION="latest"
44+
fi
45+
mike deploy $VERSION --push --update-aliases
3946
mike set-default --push latest

.github/workflows/json-yaml-validate.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818

1919
- name: json-yaml-validate
20-
uses: GrantBirki/json-yaml-validate@v3.3.0
20+
uses: GrantBirki/json-yaml-validate@v3.2.1 # pin @v3.2.1 bug in 3.3.0: https://github.com/GrantBirki/json-yaml-validate/issues/86
2121
with:
22+
# ref: https://github.com/GrantBirki/json-yaml-validate?tab=readme-ov-file#inputs-
2223
comment: "true" # enable comment mode
2324
yaml_exclude_regex: "(charts/external-dns/templates.*|mkdocs.yml)"
25+
allow_multiple_documents: "true"

.github/workflows/lint-test-chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
fi
3939
4040
- name: Install Helm Docs
41-
uses: action-stars/install-tool-from-github-release@ece2623611b240002e0dd73a0d685505733122f6 # v0.2.4
41+
uses: action-stars/install-tool-from-github-release@f2e83e089fa618aa7e9fd3452fbcf4fe1598ede2 # v0.2.5
4242
with:
4343
github_token: ${{ secrets.GITHUB_TOKEN }}
4444
owner: norwoodj
@@ -65,7 +65,7 @@ jobs:
6565
helm unittest -f 'tests/*_test.yaml' --color charts/external-dns
6666
6767
- name: Install Artifact Hub CLI
68-
uses: action-stars/install-tool-from-github-release@ece2623611b240002e0dd73a0d685505733122f6 # v0.2.4
68+
uses: action-stars/install-tool-from-github-release@f2e83e089fa618aa7e9fd3452fbcf4fe1598ede2 # v0.2.5
6969
with:
7070
github_token: ${{ github.token }}
7171
owner: artifacthub
@@ -78,7 +78,7 @@ jobs:
7878
run: ah lint --kind helm || exit 1
7979

8080
- name: Install Python
81-
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
81+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
8282
with:
8383
token: ${{ github.token }}
8484
python-version: "3.x"

.github/workflows/lint.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
files: '.'
2727
config_file: ".markdownlint.json"
2828

29-
- name: Set up Go 1.x
29+
- name: Set up Go
3030
uses: actions/setup-go@v5
3131
with:
3232
go-version-file: go.mod
@@ -44,14 +44,19 @@ jobs:
4444
4545
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#verify
4646
- name: Verify linter configuration and Lint go code
47-
uses: golangci/golangci-lint-action@v7
47+
uses: golangci/golangci-lint-action@v8
4848
with:
4949
verify: true
5050
args: --timeout=30m
51-
version: v2.0
51+
version: v2.1
5252

5353
# Run Spectral
5454
- name: Lint OpenAPI spec
5555
uses: stoplightio/spectral-action@2ad0b9302e32a77c1caccf474a9b2191a8060d83 # v0.8.11
5656
with:
5757
file_glob: 'api/*.yaml'
58+
59+
- uses: actions/setup-python@v5
60+
# https://github.com/pre-commit/action
61+
- name: Verify with pre-commit
62+
uses: pre-commit/[email protected]

.golangci.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,32 @@ version: "2"
33
linters:
44
default: none
55
enable: # golangci-lint help linters
6-
- dogsled
6+
- copyloopvar # A linter detects places where loop variables are copied. https://golangci-lint.run/usage/linters/#copyloopvar
7+
- dogsled # Checks assignments with too many blank identifiers. https://golangci-lint.run/usage/linters/#dogsled
8+
- dupword # Duplicate word. https://golangci-lint.run/usage/linters/#dupword
79
- goprintffuncname
810
- govet
911
- ineffassign
1012
- misspell
1113
- revive
12-
- rowserrcheck
14+
- rowserrcheck # Checks whether Rows.Err of rows is checked successfully.
15+
- errchkjson # Checks types passed to the json encoding functions. ref: https://golangci-lint.run/usage/linters/#errchkjson
16+
- errorlint # Checking for unchecked errors in Go code https://golangci-lint.run/usage/linters/#errcheck
1317
- staticcheck
1418
- unconvert
1519
- unused
20+
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library. https://golangci-lint.run/usage/linters/#usestdlibvars
1621
- whitespace
22+
- decorder # Check declaration order and count of types, constants, variables and functions. https://golangci-lint.run/usage/linters/#decorder
23+
- tagalign # Check that struct tags are well aligned. https://golangci-lint.run/usage/linters/#tagalign
1724
- predeclared # Find code that shadows one of Go's predeclared identifiers
1825
- sloglint # Ensure consistent code style when using log/slog
1926
- asciicheck # Checks that all code identifiers does not have non-ASCII symbols in the name
27+
- nilnil # Checks that there is no simultaneous return of nil error and an nil value. ref: https://golangci-lint.run/usage/linters/#nilnil
28+
- cyclop # Checks function and package cyclomatic complexity. https://golangci-lint.run/usage/linters/#cyclop
29+
30+
# tests
31+
- testifylint # Checks usage of github.com/stretchr/testify. https://golangci-lint.run/usage/linters/#testifylint
2032
settings:
2133
exhaustive:
2234
default-signifies-exhaustive: false
@@ -26,6 +38,19 @@ linters:
2638
rules:
2739
- name: confusing-naming
2840
disabled: true
41+
cyclop: # Lower cyclomatic complexity threshold after the max complexity is lowered
42+
max-complexity: 52
43+
testifylint:
44+
# Enable all checkers (https://github.com/Antonboom/testifylint#checkers).
45+
# Default: false
46+
enable-all: true
47+
# Disable checkers by name
48+
# (in addition to default
49+
# suite-thelper
50+
# ).
51+
# TODO: enable in follow-up
52+
disable:
53+
- require-error
2954
exclusions:
3055
generated: lax
3156
presets:
@@ -51,6 +76,10 @@ linters:
5176
- varcheck
5277
- whitespace
5378
path: _test\.go
79+
# TODO: skiip as will require design changes
80+
- linters:
81+
- nilnil
82+
path: istio_virtualservice.go|fqdn.go|cloudflare.go
5483
paths:
5584
- endpoint/zz_generated.deepcopy.go
5685
- third_party$
@@ -67,7 +96,6 @@ formatters:
6796
exclusions:
6897
generated: lax
6998
paths:
70-
- endpoint/zz_generated.deepcopy.go
7199
- third_party$
72100
- builtin$
73101
- examples$

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ We have full documentation on how to get started contributing here:
1212
- [Kubernetes Contributor Guide](https://git.k8s.io/community/contributors/guide) - Main contributor documentation, or you can just jump directly to the [contributing section](https://git.k8s.io/community/contributors/guide#contributing)
1313
- [Contributor Cheat Sheet](https://git.k8s.io/community/contributors/guide/contributor-cheatsheet) - Common resources for existing developers
1414

15+
This project follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification on PR title. The explicit commit history is used, among other things, to provide a readable changelog in release notes.
16+
17+
## How to test a PR
18+
19+
On Linux (or WSL), a PR can be tested following this instruction with [gh](https://cli.github.com/) and [golang](https://go.dev/):
20+
21+
```bash
22+
gh repo clone kubernetes-sigs/external-dns
23+
cd external-dns
24+
gh pr checkout XXX # <=== Set PR number here
25+
go run main.go \
26+
--kubeconfig=<kubeconfig_path> \
27+
--log-format=text \
28+
--log-level=debug \
29+
--interval=1m
30+
--provider=xxx
31+
--source=yyy
32+
```
33+
1534
## Mentorship
1635

1736
- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!

Makefile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ else
3232
CONTROLLER_GEN=$(shell which controller-gen)
3333
endif
3434

35-
#? controller-gen-install: download controller-gen if necessary
36-
controller-gen-install:
37-
@scripts/install-tools.sh --generator
38-
3935
#? golangci-lint-install: Install golangci-lint tool
4036
golangci-lint-install:
4137
@scripts/install-tools.sh --golangci
@@ -67,10 +63,12 @@ oas-lint:
6763
.PHONY: lint
6864
lint: licensecheck go-lint oas-lint
6965

70-
#? crd: Generates CRD using controller-gen
66+
#? crd: Generates CRD using controller-gen and copy it into chart
7167
.PHONY: crd
7268
crd: controller-gen-install
73-
${CONTROLLER_GEN} crd:crdVersions=v1 paths="./endpoint/..." output:crd:stdout > docs/contributing/crd-source/crd-manifest.yaml
69+
${CONTROLLER_GEN} object crd:crdVersions=v1 paths="./endpoint/..."
70+
${CONTROLLER_GEN} object crd:crdVersions=v1 paths="./apis/..." output:crd:stdout > config/crd/standard/dnsendpoint.yaml
71+
cp -f config/crd/standard/dnsendpoint.yaml charts/external-dns/crds/dnsendpoint.yaml
7472

7573
#? test: The verify target runs tasks similar to the CI tasks, but without code coverage
7674
.PHONY: test
@@ -203,5 +201,12 @@ helm-lint:
203201
scripts/helm-tools.sh --docs
204202

205203
.PHONY: go-dependency
206-
go-dependency: ## Dependency maintanance
204+
#? go-dependency: Dependency maintanance
205+
go-dependency:
207206
go mod tidy
207+
208+
.PHONY: mkdocs-serve
209+
#? mkdocs-serve: Run the builtin development server for mkdocs
210+
mkdocs-serve:
211+
@$(info "contribute to documentation docs/contributing/dev-guide.md")
212+
@mkdocs serve

OWNERS

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# https://github.com/kubernetes/org/blob/main/config/kubernetes-sigs/sig-network/teams.yaml
1010

1111
approvers:
12+
- ivankatliarchuk
1213
- mloiseleur
1314
- raffo
1415
- szuecs
@@ -25,32 +26,3 @@ emeritus_approvers:
2526
- linki
2627
- njuettner
2728
- seanmalloy
28-
29-
filters:
30-
"source/":
31-
labels:
32-
- source
33-
"provider/aws(|sd)":
34-
labels:
35-
- provider/aws
36-
"provider/azure":
37-
labels:
38-
- provider/azure
39-
"provider/google":
40-
labels:
41-
- provider/google
42-
"provider/coredns":
43-
labels:
44-
- provider/coredns
45-
"provider/rfc2136":
46-
labels:
47-
- provider/rfc2136
48-
"provider/pdns":
49-
labels:
50-
- provider/powerdns
51-
"provider/cloudflare":
52-
labels:
53-
- provider/cloudflare
54-
"provider/(akamai|alibabacloud|civo|designate|digitalocean|dnsimple|exoscale|gandi|godaddy|ibmcloud|linode|ns1|oci|ovh|pihole|plural|scaleway|tencentcloud|transip|ultradns)":
55-
labels:
56-
- provider

0 commit comments

Comments
 (0)