Skip to content

Commit

Permalink
bump go dependencies (#2820)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed May 19, 2023
1 parent 94d7cc8 commit c7b7a0a
Show file tree
Hide file tree
Showing 62 changed files with 714 additions and 886 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ jobs:
- build-e2e-binaries
- netpol-path-filter
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ scan:

.PHONY: ut
ut:
ginkgo -mod=mod -progress --always-emit-ginkgo-writer --slow-spec-threshold=60s test/unittest
ginkgo -mod=mod --show-node-events --poll-progress-after=60s -v test/unittest
go test ./pkg/...

.PHONY: ipam-bench
Expand Down
22 changes: 11 additions & 11 deletions Makefile.e2e
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ e2e-build:
.PHONY: k8s-conformance-e2e
k8s-conformance-e2e:
ginkgo build $(E2E_BUILD_FLAGS) ./test/e2e/k8s-network
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer --timeout=1h \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v --timeout=1h \
$(call ginkgo_option,focus,$(K8S_CONFORMANCE_E2E_FOCUS)) \
$(call ginkgo_option,skip,$(K8S_CONFORMANCE_E2E_SKIP)) \
./test/e2e/k8s-network/k8s-network.test

.PHONY: k8s-netpol-legacy-e2e
k8s-netpol-legacy-e2e:
ginkgo build $(E2E_BUILD_FLAGS) ./test/e2e/k8s-network
ginkgo -p --randomize-all --always-emit-ginkgo-writer --timeout=2h \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v --timeout=2h \
$(call ginkgo_option,focus,$(K8S_NETPOL_LEGACY_E2E_FOCUS)) \
./test/e2e/k8s-network/k8s-network.test

.PHONY: k8s-netpol-e2e
k8s-netpol-e2e:
ginkgo build $(E2E_BUILD_FLAGS) ./test/e2e/k8s-network
ginkgo -p --randomize-all --always-emit-ginkgo-writer --timeout=2h \
ginkgo -p --randomize-all -v --timeout=2h \
$(call ginkgo_option,focus,$(K8S_NETPOL_E2E_FOCUS)) \
$(call ginkgo_option,skip,$(K8S_NETPOL_E2E_SKIP)) \
./test/e2e/k8s-network/k8s-network.test
Expand All @@ -110,7 +110,7 @@ kube-ovn-conformance-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/kube-ovn/kube-ovn.test

.PHONY: kube-ovn-ic-conformance-e2e
Expand All @@ -119,7 +119,7 @@ kube-ovn-ic-conformance-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/ovn-ic/ovn-ic.test

.PHONY: kube-ovn-submariner-conformance-e2e
Expand All @@ -134,7 +134,7 @@ kube-ovn-lb-svc-conformance-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/lb-svc/lb-svc.test

.PHONY: iptables-vpc-nat-gw-conformance-e2e
Expand All @@ -143,7 +143,7 @@ iptables-vpc-nat-gw-conformance-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/iptables-vpc-nat-gw/iptables-vpc-nat-gw.test

.PHONY: ovn-vpc-nat-gw-conformance-e2e
Expand All @@ -152,7 +152,7 @@ ovn-vpc-nat-gw-conformance-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/ovn-vpc-nat-gw/ovn-vpc-nat-gw.test

.PHONY: kube-ovn-security-e2e
Expand All @@ -161,7 +161,7 @@ kube-ovn-security-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/security/security.test

.PHONY: kube-ovn-kubevirt-e2e
Expand All @@ -170,7 +170,7 @@ kube-ovn-kubevirt-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/kubevirt/kubevirt.test

.PHONY: kube-ovn-webhook-e2e
Expand All @@ -179,7 +179,7 @@ kube-ovn-webhook-e2e:
E2E_BRANCH=$(E2E_BRANCH) \
E2E_IP_FAMILY=$(E2E_IP_FAMILY) \
E2E_NETWORK_MODE=$(E2E_NETWORK_MODE) \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all --always-emit-ginkgo-writer \
ginkgo $(GINKGO_PARALLEL_OPT) --randomize-all -v \
--focus=CNI:Kube-OVN ./test/e2e/webhook/webhook.test

.PHONY: kubectl-ko-log
Expand Down
2 changes: 1 addition & 1 deletion cmd/daemon/cniserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func CmdMain() {
util.LogFatalAndExit(err, "failed to initialize node gateway")
}

stopCh := signals.SetupSignalHandler()
stopCh := signals.SetupSignalHandler().Done()
podInformerFactory := kubeinformers.NewSharedInformerFactoryWithOptions(config.KubeClient, 0,
kubeinformers.WithTweakListOptions(func(listOption *v1.ListOptions) {
listOption.FieldSelector = fmt.Sprintf("spec.nodeName=%s", config.NodeName)
Expand Down
2 changes: 1 addition & 1 deletion cmd/speaker/speaker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func CmdMain() {
util.LogFatalAndExit(err, "failed to parse config")
}

stopCh := signals.SetupSignalHandler()
stopCh := signals.SetupSignalHandler().Done()
ctl := speaker.NewController(config)

go func() {
Expand Down
20 changes: 8 additions & 12 deletions cmd/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package main
import (
"flag"

"github.com/spf13/pflag"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -15,16 +16,11 @@ import (
"github.com/kubeovn/kube-ovn/pkg/util"
ovnwebhook "github.com/kubeovn/kube-ovn/pkg/webhook"
"github.com/kubeovn/kube-ovn/versions"
"github.com/spf13/pflag"
)

const (
hookServerCertDir = "/tmp/k8s-webhook-server/serving-certs"
)
const hookServerCertDir = "/tmp/k8s-webhook-server/serving-certs"

var (
scheme = runtime.NewScheme()
)
var scheme = runtime.NewScheme()

func init() {
if err := corev1.AddToScheme(scheme); err != nil {
Expand Down Expand Up @@ -65,10 +61,10 @@ func main() {
ctrl.SetLogger(klogr.New())

// Create a webhook server.
hookServer := &ctrlwebhook.Server{
hookServer := ctrlwebhook.NewServer(ctrlwebhook.Options{
Port: *port,
CertDir: hookServerCertDir,
}
})

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Expand All @@ -79,14 +75,14 @@ func main() {
panic(err)
}

validatingHook, err := ovnwebhook.NewValidatingHook(mgr.GetCache())
validatingHook, err := ovnwebhook.NewValidatingHook(mgr.GetClient(), mgr.GetScheme(), mgr.GetCache())
if err != nil {
panic(err)
}

klog.Infof("register path /validate-ip")
klog.Infof("register path /validating")
// Register the webhooks in the server.
hookServer.Register("/validate-ip", &ctrlwebhook.Admission{Handler: validatingHook})
hookServer.Register("/validating", &ctrlwebhook.Admission{Handler: validatingHook})

if err := mgr.Add(hookServer); err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion dist/images/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ARG ARCH
ENV CNI_VERSION=v1.3.0
RUN curl -sSf -L --retry 5 https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-${ARCH}-${CNI_VERSION}.tgz | tar -xz -C . ./loopback ./portmap ./macvlan

ENV KUBE_VERSION="v1.26.4"
ENV KUBE_VERSION="v1.27.1"

RUN curl -L https://dl.k8s.io/${KUBE_VERSION}/kubernetes-client-linux-${ARCH}.tar.gz | tar -xz -C . && cp ./kubernetes/client/bin/kubectl /usr/bin/kubectl \
&& chmod +x /usr/bin/kubectl && rm -rf ./kubernetes
Expand Down

0 comments on commit c7b7a0a

Please sign in to comment.