Skip to content

Commit

Permalink
Merge pull request #70 from Miciah/merge-1.8.7
Browse files Browse the repository at this point in the history
Bug 2043801: Merge 1.8.7
  • Loading branch information
openshift-merge-robot committed Jan 25, 2022
2 parents ebeb0b2 + b160188 commit 3ec1ee7
Show file tree
Hide file tree
Showing 1,793 changed files with 154,260 additions and 44,539 deletions.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-8-release-golang-1.16-openshift-4.10
tag: rhel-8-release-golang-1.17-openshift-4.10
8 changes: 4 additions & 4 deletions .circleci/config.yml
Expand Up @@ -13,16 +13,16 @@ initWorkingDir: &initWorkingDir
GOROOT=$(go env GOROOT)
sudo rm -r $(go env GOROOT)
sudo mkdir $GOROOT
LATEST=$(curl -s https://golang.org/VERSION?m=text)
LATEST=$(curl -s https://go.dev/VERSION?m=text)
curl https://dl.google.com/go/${LATEST}.linux-amd64.tar.gz | sudo tar xz -C $GOROOT --strip-components=1
integrationDefaults: &integrationDefaults
machine:
image: ubuntu-1604:201903-01
working_directory: ~/go/src/${CIRCLE_PROJECT_USERNAME}/coredns
environment:
- K8S_VERSION: v1.19.1
- KIND_VERSION: v0.9.0
- K8S_VERSION: v1.22.0
- KIND_VERSION: v0.11.1
- KUBECONFIG: /home/circleci/.kube/kind-config-kind

setupKubernetes: &setupKubernetes
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
name: Run Kubernetes tests
command: |
cd ~/go/src/${CIRCLE_PROJECT_USERNAME}/ci/test/kubernetes
go mod download
go mod tidy
go test -v ./...
workflows:
Expand Down
2 changes: 2 additions & 0 deletions .dreck.yaml
Expand Up @@ -9,3 +9,5 @@ aliases:
/wai -> /label works as intended
- |
/release (.*) -> /exec /opt/bin/release-coredns $1
- |
/docker (.*) -> /exec /opt/bin/docker-coredns $1
2 changes: 1 addition & 1 deletion .github/fixup_file_mtime.sh
Expand Up @@ -9,7 +9,7 @@ if [[ ! -f 'coredns.1.md' ]]; then
exit 1
fi

for file in coredns.1.md corefile.5.md plugin/*/README.md; do
for file in coredns.1.md corefile.5.md plugin/*/README.md man/*.1 man/*.5 man/*.7; do
time=$(git log --pretty=format:%cd -n 1 --date='format:%Y%m%d%H%M.%S' "${file}")
touch -m -t "${time}" "${file}"
done
4 changes: 3 additions & 1 deletion .github/workflows/go.coverage.yml
Expand Up @@ -8,6 +8,8 @@ jobs:

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
id: go

- name: Check out code
Expand All @@ -23,4 +25,4 @@ jobs:
done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v2.1.0
13 changes: 11 additions & 2 deletions .github/workflows/go.test.yml
Expand Up @@ -8,6 +8,8 @@ jobs:

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
id: go

- name: Check out code
Expand All @@ -29,6 +31,8 @@ jobs:

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
id: go

- name: Check out code
Expand All @@ -47,6 +51,8 @@ jobs:

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
id: go

- name: Check out code
Expand All @@ -72,5 +78,8 @@ jobs:
- name: Check out code
uses: actions/checkout@v2

- name: Test Makefile
run: make DOCKER=bla GITHUB_ACCESS_TOKEN=bla -n build docker github-push docker-push -f Makefile.release
- name: Test Makefile.release
run: make GITHUB_ACCESS_TOKEN=x -n release github-push -f Makefile.release

- name: Test Makefile.docker
run: make VERSION=x DOCKER=x -n release docker-push -f Makefile.docker
6 changes: 6 additions & 0 deletions .github/workflows/go.tidy.yml
Expand Up @@ -8,6 +8,12 @@ jobs:
fix:
runs-on: ubuntu-latest
steps:
-
name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
id: go
-
name: Checkout
uses: actions/checkout@v2
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/make.doc.yml
Expand Up @@ -14,10 +14,12 @@ jobs:
-
name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.17.0'
-
name: Update Docs
run: |
./.github/fixup_file_mtime.sh
bash -x -e ./.github/fixup_file_mtime.sh
make -f Makefile.doc
-
name: Set up Git
Expand All @@ -30,6 +32,7 @@ jobs:
-
name: Commit and push changes
run: |
set -x -e
git add .
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
git commit -s -m 'auto make -f Makefile.doc'
Expand Down
1 change: 1 addition & 0 deletions ADOPTERS.md
Expand Up @@ -30,3 +30,4 @@
* [Render](https://render.com) uses CoreDNS in production across all its Kubernetes clusters.
* [BackMarket](https://www.backmarket.com) uses CoreDNS within Kubernetes in production, with standard configuration.
* [Absa Group](https://www.absa.africa) uses CoreDNS as an integral part of Kubernetes Global Balancer project - [k8gb](https://www.k8gb.io/).
* [Northflank](https://northflank.com/) uses CoreDNS on all of our Kubernetes clusters across GCP, AWS, and bare-metal.
4 changes: 3 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,4 +1,4 @@
# @miekg, miek@miek.nl, project lead: 11/11/2021
# @miekg, miek@miek.nl, project lead: 11/11/2022

* @bradbeam @chrisohaver @dilyevsky @fastest963 @greenpau @isolus @johnbelamaric @miekg @pmoroney @rajansandeep @stp-ip @superq @yongtang

Expand Down Expand Up @@ -30,8 +30,10 @@ go.mod @miekg @chrisohaver @johnbelamaric @yongtang @stp-ip
/plugin/etcd/ @miekg @nitisht
/plugin/file/ @miekg @yongtang @stp-ip
/plugin/forward/ @johnbelamaric @miekg @rdrozhdzh
/plugin/geoip/ @miekg @snebel29
/plugin/grpc/ @inigohu @miekg @zouyee
/plugin/health/ @fastest963 @miekg @zouyee
/plugin/header/ @miekg @mqasimsarfraz
/plugin/hosts/ @johnbelamaric @pmoroney
/plugin/k8s_external/ @miekg
/plugin/kubernetes/ @bradbeam @chrisohaver @johnbelamaric @miekg @rajansandeep @yongtang @zouyee
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.openshift.rhel7
@@ -1,4 +1,4 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.10 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10 AS builder
WORKDIR /go/src/github.com/coredns/coredns
COPY . .
RUN GO111MODULE=on GOFLAGS=-mod=vendor go build -o coredns .
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -6,7 +6,7 @@ CHECKS:=check
BUILDOPTS:=-v
GOPATH?=$(HOME)/go
MAKEPWD:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
CGO_ENABLED:=0
CGO_ENABLED?=0

.PHONY: all
all: coredns
Expand All @@ -20,10 +20,12 @@ check: core/plugin/zplugin.go core/dnsserver/zdirectives.go

core/plugin/zplugin.go core/dnsserver/zdirectives.go: plugin.cfg
go generate coredns.go
go get

.PHONY: gen
gen:
go generate coredns.go
go get

.PHONY: pb
pb:
Expand Down
96 changes: 96 additions & 0 deletions Makefile.docker
@@ -0,0 +1,96 @@
# Makefile for creating and uploading CoreDNS docker image.
#
# First you should do a release and then call this Makefile to create and upload
# the image.
#
# 1. Reuse the issue for this release
# 2. In an issue give the command: /docker VERSION
# Where VERSION is the version of the release.
# 3. (to test as release /docker -t VERSION can be used.
#
# To release we run, these target from the this Makefile.docker ordered like:
# * make release
# * make docker-push
#
# Testing docker is done e.g. via:
#
# export DOCKER_PASSWORD=<pass>
# export DOCKER_LOGIN=miek
# make VERSION=x.y.z DOCKER=miek -f Makefile.docker release docker-push

ifeq (, $(shell which curl))
$(error "No curl in $$PATH, please install")
endif

# VERSION is the version we should download and use.
VERSION:=
# DOCKER is the docker image repo we need to push to.
DOCKER:=
NAME:=coredns
GITHUB:=https://github.com/coredns/coredns/releases/download
# mips is not in LINUX_ARCH because it's not supported by docker manifest. Keep this list in sync with the one in Makefile.release
LINUX_ARCH:=amd64 arm arm64 mips64le ppc64le s390x
DOCKER_IMAGE_NAME:=$(DOCKER)/$(NAME)
DOCKER_IMAGE_LIST_VERSIONED:=$(shell echo $(LINUX_ARCH) | sed -e "s~[^ ]*~$(DOCKER_IMAGE_NAME)\-&:$(VERSION)~g")
DOCKER_IMAGE_LIST_LATEST:=$(shell echo $(LINUX_ARCH) | sed -e "s~[^ ]*~$(DOCKER_IMAGE_NAME)\-&:latest~g")

all:
@echo Use the 'release' target to download released binaries and build containers per arch, 'docker-push' to build and push a multi arch manifest.
echo $(DOCKER_IMAGE_LIST_VERSIONED)
echo $(DOCKER_IMAGE_LIST_LATEST)

release: image-download docker-build

.PHONY: image-download
image-download:
ifeq ($(VERSION),)
$(error "Please specify a version use. Use VERSION=<version>")
endif

@rm -rf build/docker
@mkdir -p build/docker
@# 1. Copy appropriate coredns binary to build/docker/<arch>
@# 2. Copy Dockerfile into the correct dir as well.
@# 3. Unpack the tgz from github into 'coredns' binary.
for arch in $(LINUX_ARCH); do \
mkdir build/docker/$${arch}; \
curl -L $(GITHUB)/v$(VERSION)/coredns_$(VERSION)_linux_$${arch}.tgz > build/docker/$${arch}/coredns.tgz && \
( cd build/docker/$${arch}; tar xf coredns.tgz && rm coredns.tgz ); \
cp Dockerfile build/docker/$${arch} ; \
done

.PHONY: docker-build
docker-build:
ifeq ($(DOCKER),)
$(error "Please specify Docker registry to use. Use DOCKER=coredns for releases")
else
docker version
for arch in $(LINUX_ARCH); do \
docker build -t $(DOCKER_IMAGE_NAME)-$${arch}:$(VERSION) build/docker/$${arch} && \
docker tag $(DOCKER_IMAGE_NAME)-$${arch}:$(VERSION) $(DOCKER_IMAGE_NAME)-$${arch}:latest ;\
done
endif

.PHONY: docker-push
docker-push:
ifeq ($(DOCKER),)
$(error "Please specify Docker registry to use. Use DOCKER=coredns for releases")
else
@# Pushes coredns/coredns-$arch:$version images
@# Creates manifest for multi-arch image
@# Pushes multi-arch image to coredns/coredns:$version
@echo $(DOCKER_PASSWORD) | docker login -u $(DOCKER_LOGIN) --password-stdin
@echo Pushing: $(VERSION) to $(DOCKER_IMAGE_NAME)
for arch in $(LINUX_ARCH); do \
docker push $(DOCKER_IMAGE_NAME)-$${arch}:$(VERSION) ;\
docker push $(DOCKER_IMAGE_NAME)-$${arch}:latest ;\
done
docker manifest create --amend $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_LIST_VERSIONED)
docker manifest create --amend $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_LIST_LATEST)
for arch in $(LINUX_ARCH); do \
docker manifest annotate --arch $${arch} $(DOCKER_IMAGE_NAME):$(VERSION) $(DOCKER_IMAGE_NAME)-$${arch}:$(VERSION) ;\
docker manifest annotate --arch $${arch} $(DOCKER_IMAGE_NAME):latest $(DOCKER_IMAGE_NAME)-$${arch}:latest ;\
done
docker manifest push --purge $(DOCKER_IMAGE_NAME):$(VERSION)
docker manifest push --purge $(DOCKER_IMAGE_NAME):latest
endif
58 changes: 0 additions & 58 deletions Makefile.fuzz

This file was deleted.

0 comments on commit 3ec1ee7

Please sign in to comment.