Skip to content

Commit

Permalink
Update modules
Browse files Browse the repository at this point in the history
* Update CoreDNS to 1.8.3.
* Update Kubernetes to 1.19.x
* Fix up CoreDNS package code.
* Fix up deprecated/moved Kuberntes package code.
* Cleanup excess indirect dependencies.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ committed Jun 23, 2021
1 parent 077a43e commit 2e092aa
Show file tree
Hide file tree
Showing 9 changed files with 553 additions and 596 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ language: go
# https://github.com/travis-ci/travis-ci/issues/5448
dist: trusty
go:
- 1.13
- 1.16

services:
- docker
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ REGISTRY ?= gcr.io/k8s-staging-dns
# Default architecture to build for.
ARCH ?= amd64
# Image to use for building.
BUILD_IMAGE ?= golang:1.13-alpine
BUILD_IMAGE ?= golang:1.16-alpine
# Containers will be named: $(CONTAINER_PREFIX)-$(BINARY)-$(ARCH):$(VERSION)
CONTAINER_PREFIX ?= k8s-dns
# Caching for go builds, disabled for CI
Expand Down
4 changes: 2 additions & 2 deletions cmd/kube-dns/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (

"k8s.io/component-base/cli/flag"
"k8s.io/component-base/logs"
_ "k8s.io/component-base/metrics/prometheus/restclient" // for client metric registration
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
"k8s.io/dns/cmd/kube-dns/app"
"k8s.io/dns/cmd/kube-dns/app/options"
"k8s.io/dns/pkg/version"
"k8s.io/klog/v2"
_ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration
_ "k8s.io/kubernetes/pkg/version/prometheus" // for version metric registration
)

func main() {
Expand Down
8 changes: 3 additions & 5 deletions cmd/node-cache/app/cache_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"k8s.io/dns/cmd/kube-dns/app/options"
"k8s.io/dns/pkg/dns/config"
"k8s.io/dns/pkg/netif"
"k8s.io/kubernetes/pkg/util/dbus"
utiliptables "k8s.io/kubernetes/pkg/util/iptables"
utilexec "k8s.io/utils/exec"
utilnet "k8s.io/utils/net"
Expand Down Expand Up @@ -145,12 +144,11 @@ func (c *CacheApp) initIptables() {

func newIPTables(isIPv6 bool) utiliptables.Interface {
execer := utilexec.New()
dbus := dbus.New()
protocol := utiliptables.ProtocolIpv4
protocol := utiliptables.ProtocolIPv4
if isIPv6 {
protocol = utiliptables.ProtocolIpv6
protocol = utiliptables.ProtocolIPv6
}
return utiliptables.New(execer, dbus, protocol)
return utiliptables.New(execer, protocol)
}

func (c *CacheApp) initEbtables() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/node-cache/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
utilnet "k8s.io/utils/net"

// blank imports to make sure the plugin code is pulled in from vendor when building node-cache image
"github.com/caddyserver/caddy"
"github.com/coredns/caddy"
_ "github.com/coredns/coredns/plugin/bind"
_ "github.com/coredns/coredns/plugin/cache"
_ "github.com/coredns/coredns/plugin/debug"
Expand Down
101 changes: 41 additions & 60 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,71 +3,52 @@ module k8s.io/dns
go 1.13

require (
github.com/bifurcation/mint v0.0.0-20180715133206-93c51c6ce115 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/caddyserver/caddy v1.0.5
github.com/cenkalti/backoff v2.1.1+incompatible // indirect
github.com/coredns/coredns v1.7.0
github.com/coredns/caddy v1.1.0
github.com/coredns/coredns v1.8.3
github.com/coreos/etcd v3.3.25+incompatible
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/engine-api v0.4.0 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/emicklei/go-restful v1.1.4-0.20170129114709-ad3e7d5a0a11 // indirect
github.com/go-acme/lego v2.7.2+incompatible // indirect
github.com/godbus/dbus v0.0.0-20181025153459-66d97aec3384 // indirect
github.com/golang/lint v0.0.0-20180702182130-06c8688daad7 // indirect
github.com/howeyc/gopass v0.0.0-20160826175423-3ca23474a7c7 // indirect
github.com/hpcloud/tail v1.0.1-0.20180514194441-a1dbeea552b7 // indirect
github.com/juju/ratelimit v0.0.0-20151125201925-77ed1c8a0121 // indirect
github.com/klauspost/cpuid v1.2.1 // indirect
github.com/lucas-clemente/aes12 v0.0.0-20171027163421-cd47fb39b79f // indirect
github.com/lucas-clemente/quic-clients v0.1.0 // indirect
github.com/lucas-clemente/quic-go-certificates v0.0.0-20160823095156-d2f86524cced // indirect
github.com/miekg/dns v1.1.29
github.com/onsi/ginkgo v1.14.2
github.com/onsi/gomega v1.10.3
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/prometheus/client_golang v1.6.0
github.com/miekg/dns v1.1.42
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.13.0
github.com/prometheus/client_golang v1.11.0
github.com/skynetservices/skydns v0.0.0-20191015171621-94b2ea0d8bfa
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.5.1
github.com/ugorji/go v0.0.0-20161130061742-9c7f9b7a2bc3 // indirect
github.com/vishvananda/netlink v1.0.0
github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
k8s.io/api v0.18.3
k8s.io/apimachinery v0.18.3
k8s.io/client-go v3.0.0+incompatible
k8s.io/component-base v0.0.0
k8s.io/klog/v2 v2.0.0
k8s.io/kubernetes v0.0.0-00010101000000-000000000000
k8s.io/utils v0.0.0-20200716102541-988ee3149bb2
github.com/stretchr/testify v1.7.0
github.com/vishvananda/netlink v1.1.0
k8s.io/api v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/client-go v0.21.1
k8s.io/component-base v0.21.1
k8s.io/klog/v2 v2.8.0
k8s.io/kubernetes v1.19.12
k8s.io/utils v0.0.0-20210527160623-6fdb442a123b
)

replace (
github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.5
// Needed to pin old version for skydns.
github.com/coreos/go-systemd => github.com/coreos/go-systemd v0.0.0-20180409111510-d1b7d058aa2a
k8s.io/api => k8s.io/api v0.0.0-20190620084959-7cf5895f2711
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190620085554-14e95df34f1f
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719
k8s.io/apiserver => k8s.io/apiserver v0.0.0-20190620085212-47dc9a115b18
k8s.io/cli-runtime => k8s.io/cli-runtime v0.0.0-20190620085706-2090e6d8f84c
k8s.io/client-go => k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
k8s.io/cloud-provider => k8s.io/cloud-provider v0.0.0-20190620090043-8301c0bda1f0
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.0.0-20190620090013-c9a0fc045dc1
k8s.io/code-generator => k8s.io/code-generator v0.0.0-20190612205613-18da4a14b22b
k8s.io/component-base => k8s.io/component-base v0.0.0-20190620085130-185d68e6e6ea
k8s.io/cri-api => k8s.io/cri-api v0.0.0-20190531030430-6117653b35f1
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.0.0-20190620090116-299a7b270edc
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.0.0-20190620085325-f29e2b4a4f84
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.0.0-20190620085942-b7f18460b210
k8s.io/kube-proxy => k8s.io/kube-proxy v0.0.0-20190620085809-589f994ddf7f
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.0.0-20190620085912-4acac5405ec6
k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190620085838-f1cb295a73c9
k8s.io/kubernetes => k8s.io/kubernetes v1.15.0
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190620090156-2138f2c9de18
k8s.io/metrics => k8s.io/metrics v0.0.0-20190620085625-3b22d835f165
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190620085408-1aef9010884e

k8s.io/api => k8s.io/api v0.19.12
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.12
k8s.io/apimachinery => k8s.io/apimachinery v0.19.12
k8s.io/apiserver => k8s.io/apiserver v0.19.12
k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.12
k8s.io/client-go => k8s.io/client-go v0.19.12
k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.12
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.12
k8s.io/code-generator => k8s.io/code-generator v0.19.12
k8s.io/component-base => k8s.io/component-base v0.19.12
k8s.io/component-helpers => k8s.io/component-helpers v0.19.12
k8s.io/controller-manager => k8s.io/controller-manager v0.19.12
k8s.io/cri-api => k8s.io/cri-api v0.19.12
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.12
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.12
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.12
k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.12
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.12
k8s.io/kubectl => k8s.io/kubectl v0.19.12
k8s.io/kubelet => k8s.io/kubelet v0.19.12
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.12
k8s.io/metrics => k8s.io/metrics v0.19.12
k8s.io/mount-utils => k8s.io/mount-utils v0.19.12
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.12
)
Loading

0 comments on commit 2e092aa

Please sign in to comment.