Skip to content

Commit 4e72129

Browse files
Merge branch 'kubeovn:master' into helm
2 parents cdb146a + ee6e590 commit 4e72129

18 files changed

+1408
-87
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ image-amd64.tar
3939
image-amd64-dpdk.tar
4040
image-arm64.tar
4141
test/**/*.test
42+
cover.out
4243
kube-ovn-app-sa.yaml
4344
kube-ovn-cni-sa.yaml
4445
kube-ovn-sa.yaml

CHANGELOG.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## v1.12.22 (2024-08-29)
4+
5+
* [61870105](https://github.com/kubeovn/kube-ovn/commit/618701059e376430a280c1403aebf1628d6bfae6) release v1.12.22
6+
* [820d95d0](https://github.com/kubeovn/kube-ovn/commit/820d95d04d9ccbbc016169d29df5506276a86f9d) vpc-nat-gateway: use iptables-legacy for centos 7 (#4428)
7+
* [b2b55a1c](https://github.com/kubeovn/kube-ovn/commit/b2b55a1c941808fe775fa9433a1149fa02e25eca) netpol: add allow acl rules for u2o logical gateway (#4420)
8+
* [1ecbd591](https://github.com/kubeovn/kube-ovn/commit/1ecbd59121d7526ca71bc315870016b83157ac93) Makefile: simplify underlay u2o installation (#4419)
9+
* [b2e6a7a5](https://github.com/kubeovn/kube-ovn/commit/b2e6a7a51171e73ffd04449abc1edbec26b498f0) vpc-nat-gateway: do not add routes for underlay subnets (#4416)
10+
* [c03dfd2e](https://github.com/kubeovn/kube-ovn/commit/c03dfd2eaceaa52461c4032b34ac0265856daf89) cni-server: fix failure in ipv6/dual clusters running in docker (#4417)
11+
* [786eb0ab](https://github.com/kubeovn/kube-ovn/commit/786eb0ab2a375527310cbcc349a33dc34320cb04) add acl log annotation (#4414)
12+
* [6d066646](https://github.com/kubeovn/kube-ovn/commit/6d0666469d5a82a7b4e65e7c934c908a475ff0b2) bump k8s to v1.30.4 (#4410)
13+
* [1827b650](https://github.com/kubeovn/kube-ovn/commit/1827b650edd49e8222a62ca00fa20d3f7febea30) fix kube-ovn-cni run fail on docker (#4406)
14+
* [ebd55782](https://github.com/kubeovn/kube-ovn/commit/ebd55782a05227e450b4423c49faa64b7b896cda) prepare for next release
15+
16+
### Contributors
17+
18+
* changluyi
19+
* hzma
20+
* zhangzujian
21+
* 张祖建
22+
323
## v1.12.21 (2024-08-14)
424

525
* [40ef8d6b](https://github.com/kubeovn/kube-ovn/commit/40ef8d6bcd2edd4d8e52630e41787c70ebf1c0ba) release v1.12.21

go.mod

+9-8
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ require (
88
github.com/bhendo/go-powershell v0.0.0-20190719160123-219e7fb4e41e
99
github.com/cenkalti/backoff/v4 v4.3.0
1010
github.com/cnf/structhash v0.0.0-20201127153200-e1b16c1ebc08
11-
github.com/containerd/containerd v1.7.20
11+
github.com/containerd/containerd v1.7.21
1212
github.com/containernetworking/cni v1.2.3
1313
github.com/containernetworking/plugins v1.5.1
14-
github.com/docker/docker v27.1.2+incompatible
14+
github.com/docker/docker v27.2.0+incompatible
1515
github.com/emicklei/go-restful/v3 v3.12.1
1616
github.com/evanphx/json-patch/v5 v5.9.0
1717
github.com/go-logr/stdr v1.2.2
@@ -24,24 +24,24 @@ require (
2424
github.com/kubeovn/ovsdb v0.0.0-20240410091831-5dd26006c475
2525
github.com/mdlayher/arp v0.0.0-20220512170110-6706a2966875
2626
github.com/moby/sys/mountinfo v0.7.2
27-
github.com/onsi/ginkgo/v2 v2.20.1
28-
github.com/onsi/gomega v1.34.1
27+
github.com/onsi/ginkgo/v2 v2.20.2
28+
github.com/onsi/gomega v1.34.2
2929
github.com/osrg/gobgp/v3 v3.29.0
3030
github.com/ovn-org/libovsdb v0.7.0
3131
github.com/parnurzeal/gorequest v0.3.0
3232
github.com/prometheus-community/pro-bing v0.4.1
33-
github.com/prometheus/client_golang v1.20.1
33+
github.com/prometheus/client_golang v1.20.2
3434
github.com/puzpuzpuz/xsync/v3 v3.4.0
3535
github.com/scylladb/go-set v1.0.2
3636
github.com/sirupsen/logrus v1.9.3
3737
github.com/spf13/pflag v1.0.5
3838
github.com/stretchr/testify v1.9.0
39-
github.com/vishvananda/netlink v1.2.1
39+
github.com/vishvananda/netlink v1.3.0
4040
go.uber.org/mock v0.4.0
4141
golang.org/x/mod v0.20.0
4242
golang.org/x/sys v0.24.0
4343
golang.org/x/time v0.6.0
44-
google.golang.org/grpc v1.65.0
44+
google.golang.org/grpc v1.66.0
4545
google.golang.org/protobuf v1.34.2
4646
gopkg.in/k8snetworkplumbingwg/multus-cni.v4 v4.1.0
4747
k8s.io/api v0.31.0
@@ -123,7 +123,7 @@ require (
123123
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
124124
github.com/google/go-cmp v0.6.0 // indirect
125125
github.com/google/gofuzz v1.2.0 // indirect
126-
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
126+
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 // indirect
127127
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
128128
github.com/gorilla/websocket v1.5.3 // indirect
129129
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
@@ -158,6 +158,7 @@ require (
158158
github.com/moby/docker-image-spec v1.3.1 // indirect
159159
github.com/moby/spdystream v0.5.0 // indirect
160160
github.com/moby/sys/symlink v0.3.0 // indirect
161+
github.com/moby/sys/userns v0.1.0 // indirect
161162
github.com/moby/term v0.5.0 // indirect
162163
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
163164
github.com/modern-go/reflect2 v1.0.2 // indirect

go.sum

+18-14
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGD
6969
github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0=
7070
github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro=
7171
github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk=
72-
github.com/containerd/containerd v1.7.20 h1:Sl6jQYk3TRavaU83h66QMbI2Nqg9Jm6qzwX57Vsn1SQ=
73-
github.com/containerd/containerd v1.7.20/go.mod h1:52GsS5CwquuqPuLncsXwG0t2CiUce+KsNHJZQJvAgR0=
72+
github.com/containerd/containerd v1.7.21 h1:USGXRK1eOC/SX0L195YgxTHb0a00anxajOzgfN0qrCA=
73+
github.com/containerd/containerd v1.7.21/go.mod h1:e3Jz1rYRUZ2Lt51YrH9Rz0zPyJBOlSvB3ghr2jbVD8g=
7474
github.com/containerd/containerd/api v1.7.19 h1:VWbJL+8Ap4Ju2mx9c9qS1uFSB1OVYr5JJrW2yT5vFoA=
7575
github.com/containerd/containerd/api v1.7.19/go.mod h1:fwGavl3LNwAV5ilJ0sbrABL44AQxmNjDRcwheXDb6Ig=
7676
github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
@@ -106,8 +106,8 @@ github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WA
106106
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
107107
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
108108
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
109-
github.com/docker/docker v27.1.2+incompatible h1:AhGzR1xaQIy53qCkxARaFluI00WPGtXn0AJuoQsVYTY=
110-
github.com/docker/docker v27.1.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
109+
github.com/docker/docker v27.2.0+incompatible h1:Rk9nIVdfH3+Vz4cyI/uhbINhEZ/oLmc+CBXmH6fbNk4=
110+
github.com/docker/docker v27.2.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
111111
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
112112
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
113113
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
@@ -259,8 +259,9 @@ github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
259259
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
260260
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw=
261261
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
262-
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k=
263262
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
263+
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5 h1:5iH8iuqE5apketRbSFBy+X1V0o+l+8NF1avt4HWl7cA=
264+
github.com/google/pprof v0.0.0-20240827171923-fa2c70bbbfe5/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
264265
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4=
265266
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ=
266267
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
@@ -388,6 +389,8 @@ github.com/moby/sys/mountinfo v0.7.2 h1:1shs6aH5s4o5H2zQLn796ADW1wMrIwHsyJ2v9Kou
388389
github.com/moby/sys/mountinfo v0.7.2/go.mod h1:1YOa8w8Ih7uW0wALDUgT1dTTSBrZ+HiBLGws92L2RU4=
389390
github.com/moby/sys/symlink v0.3.0 h1:GZX89mEZ9u53f97npBy4Rc3vJKj7JBDj/PN2I22GrNU=
390391
github.com/moby/sys/symlink v0.3.0/go.mod h1:3eNdhduHmYPcgsJtZXW1W4XUJdZGBIkttZ8xKqPUJq0=
392+
github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g=
393+
github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28=
391394
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
392395
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
393396
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -438,8 +441,8 @@ github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3Hig
438441
github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=
439442
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
440443
github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=
441-
github.com/onsi/ginkgo/v2 v2.20.1 h1:YlVIbqct+ZmnEph770q9Q7NVAz4wwIiVNahee6JyUzo=
442-
github.com/onsi/ginkgo/v2 v2.20.1/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI=
444+
github.com/onsi/ginkgo/v2 v2.20.2 h1:7NVCeyIWROIAheY21RLS+3j2bb52W0W82tkberYytp4=
445+
github.com/onsi/ginkgo/v2 v2.20.2/go.mod h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5coaZoE2ag=
443446
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
444447
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
445448
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
@@ -461,8 +464,9 @@ github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3ev
461464
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
462465
github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY=
463466
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
464-
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
465467
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
468+
github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
469+
github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc=
466470
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
467471
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
468472
github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug=
@@ -506,8 +510,8 @@ github.com/prometheus-community/pro-bing v0.4.1 h1:aMaJwyifHZO0y+h8+icUz0xbToHbi
506510
github.com/prometheus-community/pro-bing v0.4.1/go.mod h1:aLsw+zqCaDoa2RLVVSX3+UiCkBBXTMtZC3c7EkfWnAE=
507511
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.76.0 h1:tRwEFYFg+To2TGnibGl8dHBCh8Z/BVNKnXj2O5Za/2M=
508512
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.76.0/go.mod h1:Rd8YnCqz+2FYsiGmE2DMlaLjQRB4v2jFNnzCt9YY4IM=
509-
github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8=
510-
github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
513+
github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg=
514+
github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
511515
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
512516
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
513517
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
@@ -581,8 +585,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtse
581585
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
582586
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=
583587
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
584-
github.com/vishvananda/netlink v1.2.1 h1:pfLv/qlJUwOTPvtWREA7c3PI4u81YkqZw1DYhI2HmLA=
585-
github.com/vishvananda/netlink v1.2.1/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
588+
github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQdrZk=
589+
github.com/vishvananda/netlink v1.3.0/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
586590
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
587591
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
588592
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
@@ -919,8 +923,8 @@ google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQ
919923
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
920924
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
921925
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
922-
google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc=
923-
google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ=
926+
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
927+
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
924928
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
925929
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
926930
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=

pkg/controller/exporter.go

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ func (c *Controller) exportSubnetMetrics() {
3939

4040
resetSubnetMetrics()
4141
for _, subnet := range subnets {
42+
if !subnet.Status.IsValidated() {
43+
continue
44+
}
45+
4246
c.exportSubnetAvailableIPsGauge(subnet)
4347
c.exportSubnetUsedIPsGauge(subnet)
4448
c.exportSubnetIPAMInfo(subnet)

pkg/controller/init.go

+32-26
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,36 @@ func (c *Controller) InitOVN() error {
6666

6767
func (c *Controller) InitDefaultVpc() error {
6868
cachedVpc, err := c.vpcsLister.Get(c.config.ClusterRouter)
69-
if !k8serrors.IsNotFound(err) {
70-
klog.Errorf("get default vpc %s failed: %v", c.config.DefaultLogicalSwitch, err)
71-
return err
72-
}
73-
74-
if k8serrors.IsNotFound(err) {
69+
if err != nil {
70+
if !k8serrors.IsNotFound(err) {
71+
klog.Errorf("failed to get default vpc %q: %v", c.config.ClusterRouter, err)
72+
return err
73+
}
74+
// create default vpc
7575
vpc := &kubeovnv1.Vpc{
7676
ObjectMeta: metav1.ObjectMeta{Name: c.config.ClusterRouter},
7777
}
7878
cachedVpc, err = c.config.KubeOvnClient.KubeovnV1().Vpcs().Create(context.Background(), vpc, metav1.CreateOptions{})
7979
if err != nil {
80-
klog.Errorf("init default vpc failed: %v", err)
80+
klog.Errorf("failed to create default vpc %q: %v", c.config.ClusterRouter, err)
8181
return err
8282
}
8383
}
8484

85+
// update default vpc status
8586
vpc := cachedVpc.DeepCopy()
86-
vpc.Status.DefaultLogicalSwitch = c.config.DefaultLogicalSwitch
87-
vpc.Status.Router = c.config.ClusterRouter
88-
vpc.Status.Standby = true
89-
vpc.Status.Default = true
90-
91-
if _, err = c.config.KubeOvnClient.KubeovnV1().Vpcs().UpdateStatus(context.Background(), vpc, metav1.UpdateOptions{}); err != nil {
92-
klog.Errorf("init default vpc failed: %v", err)
93-
return err
87+
if !vpc.Status.Default || !vpc.Status.Standby ||
88+
vpc.Status.Router != c.config.ClusterRouter ||
89+
vpc.Status.DefaultLogicalSwitch != c.config.DefaultLogicalSwitch {
90+
vpc.Status.Standby = true
91+
vpc.Status.Default = true
92+
vpc.Status.Router = c.config.ClusterRouter
93+
vpc.Status.DefaultLogicalSwitch = c.config.DefaultLogicalSwitch
94+
95+
if _, err = c.config.KubeOvnClient.KubeovnV1().Vpcs().UpdateStatus(context.Background(), vpc, metav1.UpdateOptions{}); err != nil {
96+
klog.Errorf("failed to update default vpc %q: %v", c.config.ClusterRouter, err)
97+
return err
98+
}
9499
}
95100

96101
return nil
@@ -147,8 +152,11 @@ func (c *Controller) initDefaultLogicalSwitch() error {
147152
defaultSubnet.Spec.U2OInterconnection = c.config.DefaultU2OInterconnection
148153
}
149154

150-
_, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Create(context.Background(), &defaultSubnet, metav1.CreateOptions{})
151-
return err
155+
if _, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Create(context.Background(), &defaultSubnet, metav1.CreateOptions{}); err != nil {
156+
klog.Errorf("failed to create default subnet %q: %v", c.config.DefaultLogicalSwitch, err)
157+
return err
158+
}
159+
return nil
152160
}
153161

154162
// InitNodeSwitch init node switch to connect host and pod
@@ -189,9 +197,8 @@ func (c *Controller) initNodeSwitch() error {
189197
},
190198
}
191199

192-
_, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Create(context.Background(), &nodeSubnet, metav1.CreateOptions{})
193-
if err != nil {
194-
klog.Errorf("failed to create subnet %s: %v", c.config.NodeSwitch, err)
200+
if _, err = c.config.KubeOvnClient.KubeovnV1().Subnets().Create(context.Background(), &nodeSubnet, metav1.CreateOptions{}); err != nil {
201+
klog.Errorf("failed to create node subnet %q: %v", c.config.NodeSwitch, err)
195202
return err
196203
}
197204
return nil
@@ -276,8 +283,7 @@ func (c *Controller) initLoadBalancer() error {
276283
klog.Error(err)
277284
return err
278285
}
279-
_, err = c.config.KubeOvnClient.KubeovnV1().Vpcs().Patch(context.Background(), vpc.Name, types.MergePatchType, bytes, metav1.PatchOptions{}, "status")
280-
if err != nil {
286+
if _, err = c.config.KubeOvnClient.KubeovnV1().Vpcs().Patch(context.Background(), vpc.Name, types.MergePatchType, bytes, metav1.PatchOptions{}, "status"); err != nil {
281287
klog.Error(err)
282288
return err
283289
}
@@ -686,7 +692,7 @@ func (c *Controller) syncVpcNatGatewayCR() error {
686692
// get vpc nat gateway enable state
687693
cm, err := c.configMapsLister.ConfigMaps(c.config.PodNamespace).Get(util.VpcNatGatewayConfig)
688694
if err != nil && !k8serrors.IsNotFound(err) {
689-
klog.Errorf("failed to get %s, %v", util.VpcNatGatewayConfig, err)
695+
klog.Errorf("failed to get config map %s, %v", util.VpcNatGatewayConfig, err)
690696
return err
691697
}
692698
if k8serrors.IsNotFound(err) || cm.Data["enable-vpc-nat-gw"] == "false" {
@@ -696,15 +702,15 @@ func (c *Controller) syncVpcNatGatewayCR() error {
696702
cm, err = c.configMapsLister.ConfigMaps(c.config.PodNamespace).Get(util.VpcNatConfig)
697703
if err != nil {
698704
if k8serrors.IsNotFound(err) {
699-
klog.Errorf("configMap of %s not set, %v", util.VpcNatConfig, err)
705+
klog.Errorf("should set config map for vpc-nat-gateway %s, %v", util.VpcNatConfig, err)
700706
return err
701707
}
702-
klog.Errorf("failed to get %s, %v", util.VpcNatConfig, err)
708+
klog.Errorf("failed to get config map %s, %v", util.VpcNatConfig, err)
703709
return err
704710
}
705711

706712
if cm.Data["image"] == "" {
707-
err = errors.New("image of vpc-nat-gateway not set")
713+
err = errors.New("should set image for vpc-nat-gateway pod")
708714
klog.Error(err)
709715
return err
710716
}

0 commit comments

Comments
 (0)