Skip to content

Commit

Permalink
Merge pull request #94 from gcs278/merge-1.11.1
Browse files Browse the repository at this point in the history
OCPBUGS-13968: Merge 1.11.1
  • Loading branch information
openshift-merge-robot committed Sep 22, 2023
2 parents dc6ac31 + 5378301 commit ac051aa
Show file tree
Hide file tree
Showing 2,056 changed files with 202,819 additions and 43,533 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -13,7 +13,7 @@ initWorkingDir: &initWorkingDir
GOROOT=$(go env GOROOT)
sudo rm -r $(go env GOROOT)
sudo mkdir $GOROOT
LATEST=$(curl -s https://go.dev/VERSION?m=text)
LATEST=$(curl -s https://go.dev/VERSION?m=text | grep -v time)
curl https://dl.google.com/go/${LATEST}.linux-amd64.tar.gz | sudo tar xz -C $GOROOT --strip-components=1
integrationDefaults: &integrationDefaults
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -27,15 +27,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@3ebbd71c74ef574dbc558c82f70e52732c8b44fe
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@3ebbd71c74ef574dbc558c82f70e52732c8b44fe
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3ebbd71c74ef574dbc558c82f70e52732c8b44fe
uses: github/codeql-action/analyze@v2
4 changes: 2 additions & 2 deletions .github/workflows/depsreview.yml
Expand Up @@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@c090f4e553673e6e505ea70d6a95362ee12adb94
uses: actions/dependency-review-action@7d90b4f05fea31dde1c4a1fb3fa787e197ea93ab
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Expand Up @@ -20,7 +20,7 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
RELEASE: ${{ github.event.inputs.release || github.event.release.tag_name }}
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- uses: actions/checkout@v3
- name: Build Docker Images
run: make VERSION=${RELEASE:1} DOCKER=coredns -f Makefile.docker release
- name: Show Docker Images
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/go.coverage.yml
Expand Up @@ -8,23 +8,24 @@ jobs:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@v4
with:
go-version: '1.19.0'
go-version: '~1.21.0'
id: go

- name: Check out code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- name: Build
run: go build -v ./...

- name: Test With Coverage
run: |
go install github.com/fatih/faillint@latest
for d in request core coremain plugin test; do \
( cd $d; go test -coverprofile=cover.out -covermode=atomic -race ./...; [ -f cover.out ] && cat cover.out >> ../coverage.txt ); \
done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
38 changes: 19 additions & 19 deletions .github/workflows/go.test.yml
Expand Up @@ -8,15 +8,15 @@ jobs:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@v4
with:
go-version: '1.19.0'
go-version: '~1.21.0'
id: go

- name: Check out code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- name: Build
run: go build -v ./...

Expand All @@ -30,15 +30,15 @@ jobs:
name: Test Plugins
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@v4
with:
go-version: '1.19.0'
go-version: '~1.21.0'
id: go

- name: Check out code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- name: Build
run: go build -v ./...

Expand All @@ -49,33 +49,33 @@ jobs:
name: Test e2e
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@v4
with:
go-version: '1.19.0'
go-version: '~1.21.0'
id: go

- name: Check out code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

- name: Build
run: go build -v ./...

- name: Test
run: |
go install github.com/fatih/faillint || true
go install github.com/fatih/faillint@latest
( cd test; go test -race ./... )
test-makefile-release:
name: Test Makefile.release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt-get install make curl

- name: Check out code
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8

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

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/golangci-lint.yml
Expand Up @@ -6,11 +6,11 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19.0'
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
go-version: '~1.21.0'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
uses: golangci/golangci-lint-action@v3.6.0
with:
version: v1.49.0
version: v1.52.2
6 changes: 3 additions & 3 deletions .github/workflows/make.doc.yml
Expand Up @@ -13,12 +13,12 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568
uses: actions/setup-go@v4
with:
go-version: '1.19.0'
go-version: '~1.21.0'

- name: Update Docs
run: |
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,55 @@
name: Release

on:
workflow_dispatch:
inputs:
commit:
description: "Commit (e.g., 52f0348)"
default: "master"

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.commit }}
- name: Set up info
run: |
set -x -e
VERSION=$(make -f Makefile.release version)
COMMIT=$(git rev-parse --quiet --verify ${{ github.event.inputs.commit }})
if [[ "$(git tag -l v${VERSION})" == "v${VERSION}" ]]; then
echo "v${VERSION} already released"
exit 1
fi
echo "commit=${COMMIT}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
id: info
- name: Build release binary
run: make -f Makefile.release release
- name: Build release binary sha256
run: (cd release; for asset in `ls -A *tgz`; do sha256sum $asset > $asset.sha256; done)
- name: Remove hidden section
run: sed '/+++/,//d' notes/coredns-${{ steps.info.outputs.version}}.md > release.md
- name: Log release info
run: |
set -x -e
git log -1
echo ${{ steps.info.outputs.commit }}
echo ${{ steps.info.outputs.version }}
cat release.md
sha256sum release/*.tgz
- name: Draft release
uses: softprops/action-gh-release@v1
with:
body_path: release.md
name: v${{ steps.info.outputs.version }}
tag_name: v${{ steps.info.outputs.version }}
target_commitish: ${{ steps.info.outputs.commit }}
files: |
release/*.tgz
release/*.tgz.sha256
draft: true
25 changes: 0 additions & 25 deletions .github/workflows/reviewdog.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/scorecards.yml
Expand Up @@ -23,12 +23,12 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
uses: actions/checkout@v3
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -51,6 +51,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@3ebbd71c74ef574dbc558c82f70e52732c8b44fe
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@6f05e4244c9a0b2ed3401882b05d701dd0a7289b
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84
with:
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days'
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/trivy-scan.yaml
@@ -1,7 +1,7 @@
name: Trivy Nightly Scan
on:
schedule:
- cron: '0 2 * * 5' #Run at 2AM UTC on every Friday
- cron: '0 2 * * 5' # Run at 2AM UTC on every Friday

permissions: read-all
jobs:
Expand All @@ -20,15 +20,14 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@cff3e9a7f62c41dd51975266d0ae235709e39c41 # master
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54 # master
with:
image-ref: 'docker.io/coredns/coredns:${{ matrix.versions }}'
severity: 'CRITICAL,HIGH'
format: 'template'
template: '@/contrib/sarif.tpl'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # v2.2.1
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
with:
sarif_file: 'trivy-results.sarif'
4 changes: 2 additions & 2 deletions .github/workflows/yamllint.yml
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
uses: actions/checkout@v3
- name: 'Yamllint'
uses: karancode/yamllint-github-action@dd59165b84d90d37fc919c3c7dd84c7e37cd6bfb
uses: karancode/yamllint-github-action@fdef6bc189425ecc84cc4543b2674566c0827053
with:
yamllint_file_or_dir: '.'
yamllint_strict: false
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Expand Up @@ -9,3 +9,5 @@ linters:
- typecheck
- whitespace
- unused
- gofmt
- unconvert
3 changes: 2 additions & 1 deletion ADOPTERS.md
@@ -1,3 +1,4 @@
* [Qwilt](https://www.qwilt.com) uses CoreDNS in production, implementing a global DNS service allowing access to our ISP edge and regional locations.
* [Infoblox](https://www.infoblox.com) uses CoreDNS in its Active Trust Cloud SaaS service, as well as for Kubernetes cluster DNS.
* [Sky Betting & Gaming](https://engineering.skybettingandgaming.com) uses CoreDNS for Kubernetes cluster DNS.
* [Kismia](https://kismia.com) uses CoreDNS for Kubernetes cluster DNS.
Expand Down Expand Up @@ -30,4 +31,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.
* [Northflank](https://northflank.com/) uses CoreDNS on all of our Kubernetes clusters across GCP, AWS, and bare-metal.
17 changes: 10 additions & 7 deletions Dockerfile
@@ -1,4 +1,6 @@
FROM --platform=$BUILDPLATFORM debian:stable-slim
ARG DEBIAN_IMAGE=debian:stable-slim
ARG BASE=gcr.io/distroless/static-debian11:nonroot
FROM --platform=$BUILDPLATFORM ${DEBIAN_IMAGE} AS build
SHELL [ "/bin/sh", "-ec" ]

RUN export DEBCONF_NONINTERACTIVE_SEEN=true \
Expand All @@ -7,13 +9,14 @@ RUN export DEBCONF_NONINTERACTIVE_SEEN=true \
TERM=linux ; \
apt-get -qq update ; \
apt-get -yyqq upgrade ; \
apt-get -yyqq install ca-certificates ; \
apt-get -yyqq install ca-certificates libcap2-bin; \
apt-get clean
COPY coredns /coredns
RUN setcap cap_net_bind_service=+ep /coredns

FROM --platform=$TARGETPLATFORM scratch

COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
ADD coredns /coredns

FROM --platform=$TARGETPLATFORM ${BASE}
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /coredns /coredns
USER nonroot:nonroot
EXPOSE 53 53/udp
ENTRYPOINT ["/coredns"]

0 comments on commit ac051aa

Please sign in to comment.