From 7174e6d46ee91dd598c4799fa6422f61b048afa5 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Wed, 13 Mar 2024 16:06:58 +0100 Subject: [PATCH 1/8] Upgrade ipam to 0.1.0 and capi to 1.6.3 --- ...ture.cluster.x-k8s.io_proxmoxclusters.yaml | 26 ++++ go.mod | 48 ++++---- go.sum | 113 +++++++++--------- 3 files changed, 108 insertions(+), 79 deletions(-) diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml index 45d09b39..dd32fda3 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml @@ -91,6 +91,19 @@ spec: items: type: string type: array + allocateReservedIPAddresses: + description: AllocateReservedIPAddresses causes the provider to + allocate the network address (the first address in the inferred + subnet) and broadcast address (the last address in the inferred + subnet) when IPv4. The provider will allocate the anycast address + address (the first address in the inferred subnet) when IPv6. + type: boolean + excludedAddresses: + description: ExcludedAddresses is a list of IP addresses, which + will be excluded from the set of assignable IP addresses. + items: + type: string + type: array gateway: description: Gateway type: string @@ -117,6 +130,19 @@ spec: items: type: string type: array + allocateReservedIPAddresses: + description: AllocateReservedIPAddresses causes the provider to + allocate the network address (the first address in the inferred + subnet) and broadcast address (the last address in the inferred + subnet) when IPv4. The provider will allocate the anycast address + address (the first address in the inferred subnet) when IPv6. + type: boolean + excludedAddresses: + description: ExcludedAddresses is a list of IP addresses, which + will be excluded from the set of assignable IP addresses. + items: + type: string + type: array gateway: description: Gateway type: string diff --git a/go.mod b/go.mod index 30651493..198c8f37 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/ionos-cloud/cluster-api-provider-proxmox go 1.21 -replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.1 +replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.3 require ( github.com/go-logr/logr v1.4.1 @@ -20,10 +20,10 @@ require ( k8s.io/apimachinery v0.29.2 k8s.io/client-go v0.29.2 k8s.io/klog/v2 v2.120.1 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b + k8s.io/utils v0.0.0-20240102154912-e7106e64919e sigs.k8s.io/cluster-api v1.6.1 - sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0-alpha.3 - sigs.k8s.io/cluster-api/test v1.6.2 + sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0 + sigs.k8s.io/cluster-api/test v1.6.3 sigs.k8s.io/controller-runtime v0.17.2 ) @@ -31,14 +31,14 @@ require ( github.com/BurntSushi/toml v1.2.1 // indirect github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect - github.com/Masterminds/semver/v3 v3.2.0 // indirect + github.com/Masterminds/semver/v3 v3.2.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect github.com/Microsoft/go-winio v0.5.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect - github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/buger/goterm v1.0.4 // indirect @@ -53,19 +53,19 @@ require ( github.com/docker/go-units v0.4.0 // indirect github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch v5.6.0+incompatible // indirect + github.com/evanphx/json-patch v5.7.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.8.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/zapr v1.3.0 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.20.2 // indirect + github.com/go-openapi/jsonreference v0.20.4 // indirect + github.com/go-openapi/swag v0.22.7 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect - github.com/google/cel-go v0.17.7 // indirect + github.com/google/cel-go v0.18.2 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-github/v53 v53.2.0 // indirect @@ -75,8 +75,8 @@ require ( github.com/google/safetext v0.0.0-20220905092116-b49f7bc46da2 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/huandu/xstrings v1.3.3 // indirect - github.com/imdario/mergo v0.3.15 // indirect + github.com/huandu/xstrings v1.4.0 // indirect + github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jinzhu/copier v0.3.4 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -106,29 +106,29 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/viper v1.17.0 // indirect - github.com/stoewer/go-strcase v1.2.0 // indirect + github.com/stoewer/go-strcase v1.3.0 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/valyala/fastjson v1.6.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/crypto v0.19.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/net v0.21.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/term v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/time v0.5.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/djherbis/times.v1 v1.2.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -137,9 +137,9 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.29.0 // indirect k8s.io/apiserver v0.29.0 // indirect - k8s.io/cluster-bootstrap v0.28.4 // indirect + k8s.io/cluster-bootstrap v0.29.0 // indirect k8s.io/component-base v0.29.0 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/kube-openapi v0.0.0-20240103160333-bb40bc074d37 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kind v0.20.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index 6333e17e..98983c38 100644 --- a/go.sum +++ b/go.sum @@ -48,8 +48,9 @@ github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ github.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= @@ -60,10 +61,10 @@ github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -97,7 +98,6 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -124,15 +124,15 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/evanphx/json-patch/v5 v5.8.0 h1:lRj6N9Nci7MvzrXuX6HFzU8XjmhPiXPlsKEy1u0KQro= github.com/evanphx/json-patch/v5 v5.8.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= -github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= @@ -144,12 +144,12 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= +github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= +github.com/go-openapi/jsonreference v0.20.4 h1:bKlDxQxQJgwpUSgOENiMPzCTBVuc7vTdXSSgNeAhojU= +github.com/go-openapi/jsonreference v0.20.4/go.mod h1:5pZJyJP2MnYCpoeoMAql78cCHauHj0V9Lhc506VOpw4= +github.com/go-openapi/swag v0.22.7 h1:JWrc1uc/P9cSomxfnsFSVWoE1FW6bNbrVPmpQYpCcR8= +github.com/go-openapi/swag v0.22.7/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= @@ -184,12 +184,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.17.7 h1:6ebJFzu1xO2n7TLtN+UBqShGBhlD85bhvglh5DpcfqQ= -github.com/google/cel-go v0.17.7/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4= +github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -253,13 +254,14 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/huandu/xstrings v1.3.3 h1:/Gcsuc1x8JVbJ9/rlye4xZnVAbEkGauT8lbebqcQws4= github.com/huandu/xstrings v1.3.3/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= +github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= +github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= -github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -279,7 +281,6 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -354,8 +355,8 @@ github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGy github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.3.0 h1:zT7VEGWC2DTflmccN/5T1etyKvxSxpHsjb9cJvm4SvQ= github.com/sagikazarmark/locafero v0.3.0/go.mod h1:w+v7UsPNFwzF1cHuOajOOzoq4U7v/ig1mpRjqV+Bu1U= @@ -370,8 +371,8 @@ github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIK github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= @@ -379,8 +380,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI= github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI= -github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= +github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= +github.com/stoewer/go-strcase v1.3.0/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= @@ -469,8 +470,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b h1:kLiC65FbiHWFAOu+lxwNPujcsl8VYyTYYEZnsOO1WK4= +golang.org/x/exp v0.0.0-20231226003508-02704c960a9b/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -542,8 +543,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -620,14 +621,15 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -712,8 +714,9 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -750,12 +753,12 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto v0.0.0-20231212172506-995d672761c0 h1:YJ5pD9rF8o9Qtta0Cmy9rdBwkSjrTCT6XTiUQVOtIos= +google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0vFTBPy+tFSGvXEd3z+BcoG1k7EHbqm+YBsY= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 h1:rcS6EyEaoCO52hQDupoSfrxI3R6C2Tq741is7X8OvnM= +google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917/go.mod h1:CmlNWB9lSezaYELKS5Ym1r44VrrbPUa7JTvw+6MbpJ0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -772,8 +775,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= +google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -827,16 +830,16 @@ k8s.io/apiserver v0.29.0 h1:Y1xEMjJkP+BIi0GSEv1BBrf1jLU9UPfAnnGGbbDdp7o= k8s.io/apiserver v0.29.0/go.mod h1:31n78PsRKPmfpee7/l9NYEv67u6hOL6AfcE761HapDM= k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= -k8s.io/cluster-bootstrap v0.28.4 h1:4MKNy1Qd9QY7pl47rSMGIORF+tm3CUaqC1M8U9bjn4Q= -k8s.io/cluster-bootstrap v0.28.4/go.mod h1:/c4ro/R4yf4EtJgFgFtvnHkbDOHwubeKJXh5R1c89Bc= +k8s.io/cluster-bootstrap v0.29.0 h1:zCYdZ+LWDj4O86FB5tDKckIEsf2qBHjcp78xtjOzD3A= +k8s.io/cluster-bootstrap v0.29.0/go.mod h1:PDk+ouXC6bM2FFdo4u53IlWK3ZMWebH4TeE5BGmHWRw= k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/kube-openapi v0.0.0-20240103160333-bb40bc074d37 h1:sUW8i241H8NYn3v4QIwNYpPbiyNnlunqtKFt48hxc7g= +k8s.io/kube-openapi v0.0.0-20240103160333-bb40bc074d37/go.mod h1:sIV51WBTkZrlGOJMCDZDA1IaPBUDTulPpD4y7oe038k= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= +k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -844,12 +847,12 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0 h1:TgtAeesdhpm2SGwkQasmbeqDo8th5wOBA5h/AjTKA4I= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.28.0/go.mod h1:VHVDI/KrK4fjnV61bE2g3sA7tiETLn8sooImelsCx3Y= -sigs.k8s.io/cluster-api v1.6.1 h1:I34p/fwgRlEhs+o9cUhKXDwNNfPS3no0yJsd2bJyQVc= -sigs.k8s.io/cluster-api v1.6.1/go.mod h1:DaxwruDvSaEYq5q6FREDaGzX6UsAVUCA99Sp8vfMHyQ= -sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0-alpha.3 h1:1RFzQ0zNlpFkhvPs/OPXYEr+qoRa+DlScdf0yzPqdfI= -sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0-alpha.3/go.mod h1:t8RtDNN+zdhVmRTAyV0GAvUJhRXnv0YofPgu6EVPohE= -sigs.k8s.io/cluster-api/test v1.6.2 h1:RjrYL8Ag9vBxfv++RWEKy/vgTukQYeYVJBMkWvylASc= -sigs.k8s.io/cluster-api/test v1.6.2/go.mod h1:qfkWBqONPAyOwsPFlS8tsrAq7pjKH55pCpKtjhEbUrk= +sigs.k8s.io/cluster-api v1.6.3 h1:VOlPNg92PQLlhBVLc5pg+cbAuPvGOOBujeFLk9zgnoo= +sigs.k8s.io/cluster-api v1.6.3/go.mod h1:4FzfgPPiYaFq8X9F9j2SvmggH/4OOLEDgVJuWDqKLig= +sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0 h1:k93V8X7ihC9CJff4AP7csyRIMO28cqp0pRMkvcChpis= +sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0/go.mod h1:C+C1Xos6z9H9ymJSJsjI2qfqo/EnsugS7WHCYh3O+Nc= +sigs.k8s.io/cluster-api/test v1.6.3 h1:ZCboLCTpKWzSbf+f7MpQT7EN8aeH9DNhJC1T9/vAuAM= +sigs.k8s.io/cluster-api/test v1.6.3/go.mod h1:AKs25dgW6AnyGaQBoWuXfWnBs+FT7vJmAI/aox64DEI= sigs.k8s.io/controller-runtime v0.17.2 h1:FwHwD1CTUemg0pW2otk7/U5/i5m2ymzvOXdbeGOUvw0= sigs.k8s.io/controller-runtime v0.17.2/go.mod h1:+MngTvIQQQhfXtwfdGw/UOQ/aIaqsYywfCINOtwMO/s= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From 80d49b4cfd24a379a7ab532e4db40feab8e1c9a8 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Thu, 14 Mar 2024 16:38:33 +0100 Subject: [PATCH 2/8] Update --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 198c8f37..f7f00573 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( k8s.io/client-go v0.29.2 k8s.io/klog/v2 v2.120.1 k8s.io/utils v0.0.0-20240102154912-e7106e64919e - sigs.k8s.io/cluster-api v1.6.1 + sigs.k8s.io/cluster-api v1.6.3 sigs.k8s.io/cluster-api-ipam-provider-in-cluster v0.1.0 sigs.k8s.io/cluster-api/test v1.6.3 sigs.k8s.io/controller-runtime v0.17.2 From af05127013f5c43c6c4a26c8fc0cfb683bedc2ed Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Thu, 14 Mar 2024 16:53:06 +0100 Subject: [PATCH 3/8] Fix circular dependency --- go.mod | 12 +++++++----- go.sum | 24 ++++++++++++------------ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/go.mod b/go.mod index f7f00573..8e8051cf 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.21 replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.3 +replace github.com/google/cel-go => github.com/google/cel-go v0.17.8 + require ( github.com/go-logr/logr v1.4.1 github.com/google/uuid v1.6.0 @@ -37,7 +39,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect @@ -64,7 +66,7 @@ require ( github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/google/cel-go v0.18.2 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect @@ -137,9 +139,9 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.29.0 // indirect k8s.io/apiserver v0.29.0 // indirect - k8s.io/cluster-bootstrap v0.29.0 // indirect - k8s.io/component-base v0.29.0 // indirect - k8s.io/kube-openapi v0.0.0-20240103160333-bb40bc074d37 // indirect + k8s.io/cluster-bootstrap v0.29.2 // indirect + k8s.io/component-base v0.29.2 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kind v0.20.0 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index 98983c38..0d31bdce 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -185,12 +185,12 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4= -github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= +github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -830,14 +830,14 @@ k8s.io/apiserver v0.29.0 h1:Y1xEMjJkP+BIi0GSEv1BBrf1jLU9UPfAnnGGbbDdp7o= k8s.io/apiserver v0.29.0/go.mod h1:31n78PsRKPmfpee7/l9NYEv67u6hOL6AfcE761HapDM= k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= -k8s.io/cluster-bootstrap v0.29.0 h1:zCYdZ+LWDj4O86FB5tDKckIEsf2qBHjcp78xtjOzD3A= -k8s.io/cluster-bootstrap v0.29.0/go.mod h1:PDk+ouXC6bM2FFdo4u53IlWK3ZMWebH4TeE5BGmHWRw= -k8s.io/component-base v0.29.0 h1:T7rjd5wvLnPBV1vC4zWd/iWRbV8Mdxs+nGaoaFzGw3s= -k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= +k8s.io/cluster-bootstrap v0.29.2 h1:CJ8kNpm6vqPX6laBEPGoEFpVQ0XmzgXMdQosvd5m2OA= +k8s.io/cluster-bootstrap v0.29.2/go.mod h1:75qXUXImrhRHglBCQsBvZrS4uJFyaDinOWLWbbaRRH0= +k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8= +k8s.io/component-base v0.29.2/go.mod h1:BfB3SLrefbZXiBfbM+2H1dlat21Uewg/5qtKOl8degM= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20240103160333-bb40bc074d37 h1:sUW8i241H8NYn3v4QIwNYpPbiyNnlunqtKFt48hxc7g= -k8s.io/kube-openapi v0.0.0-20240103160333-bb40bc074d37/go.mod h1:sIV51WBTkZrlGOJMCDZDA1IaPBUDTulPpD4y7oe038k= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ= k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= From d23fede3988fb9f3b18b28d439aaa9e010653d18 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Wed, 20 Mar 2024 17:34:48 +0100 Subject: [PATCH 4/8] remove ipam deps from api pkg --- api/v1alpha1/proxmoxcluster_types.go | 26 ++++++++++++++----- api/v1alpha1/proxmoxcluster_types_test.go | 6 ++--- api/v1alpha1/zz_generated.deepcopy.go | 25 +++++++++++++++--- ...ture.cluster.x-k8s.io_proxmoxclusters.yaml | 26 ------------------- .../proxmoxcluster_controller_test.go | 4 +-- internal/service/vmservice/bootstrap_test.go | 5 ++-- internal/service/vmservice/helpers_test.go | 2 +- internal/service/vmservice/ip_test.go | 3 +-- internal/service/vmservice/vm_test.go | 5 ++-- .../webhook/proxmoxcluster_webhook_test.go | 7 +++-- pkg/kubernetes/ipam/ipam_test.go | 8 +++--- 11 files changed, 60 insertions(+), 57 deletions(-) diff --git a/api/v1alpha1/proxmoxcluster_types.go b/api/v1alpha1/proxmoxcluster_types.go index eb8ad0d6..e9479950 100644 --- a/api/v1alpha1/proxmoxcluster_types.go +++ b/api/v1alpha1/proxmoxcluster_types.go @@ -19,10 +19,9 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" - "k8s.io/utils/ptr" - ipamicv1 "sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2" + clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" + "sigs.k8s.io/controller-runtime/pkg/client" ) const ( @@ -55,20 +54,35 @@ type ProxmoxClusterSpec struct { // either IPv4Config or IPv6Config must be provided. // +optional // +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv4Config addresses must be provided" - IPv4Config *ipamicv1.InClusterIPPoolSpec `json:"ipv4Config,omitempty"` + IPv4Config *IPPoolSpec `json:"ipv4Config,omitempty"` // IPv6Config contains information about available IPV6 address pools and the gateway. // this can be combined with ipv4Config in order to enable dual stack. // either IPv4Config or IPv6Config must be provided. // +optional // +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv6Config addresses must be provided" - IPv6Config *ipamicv1.InClusterIPPoolSpec `json:"ipv6Config,omitempty"` + IPv6Config *IPPoolSpec `json:"ipv6Config,omitempty"` // DNSServers contains information about nameservers used by machines network-config. // +kubebuilder:validation:MinItems=1 DNSServers []string `json:"dnsServers"` } +// IPPoolSpec defines the desired state of IP Pool. +type IPPoolSpec struct { + // Addresses is a list of IP addresses that can be assigned. This set of + // addresses can be non-contiguous. + Addresses []string `json:"addresses"` + + // Prefix is the network prefix to use. + // +kubebuilder:validation:Maximum=128 + Prefix int `json:"prefix"` + + // Gateway + // +optional + Gateway string `json:"gateway,omitempty"` +} + // SchedulerHints allows to pass the scheduler instructions to (dis)allow over- or enforce underprovisioning of resources. type SchedulerHints struct { // MemoryAdjustment allows to adjust a node's memory by a given percentage. @@ -172,7 +186,7 @@ func (c *ProxmoxCluster) SetConditions(conditions clusterv1.Conditions) { // SetInClusterIPPoolRef will set the reference to the provided InClusterIPPool. // If nil was provided, the status field will be cleared. -func (c *ProxmoxCluster) SetInClusterIPPoolRef(pool *ipamicv1.InClusterIPPool) { +func (c *ProxmoxCluster) SetInClusterIPPoolRef(pool client.Object) { if pool == nil || pool.GetName() == "" { c.Status.InClusterIPPoolRef = nil return diff --git a/api/v1alpha1/proxmoxcluster_types_test.go b/api/v1alpha1/proxmoxcluster_types_test.go index 7d4b314d..b172ccc1 100644 --- a/api/v1alpha1/proxmoxcluster_types_test.go +++ b/api/v1alpha1/proxmoxcluster_types_test.go @@ -80,7 +80,7 @@ func defaultCluster() *ProxmoxCluster { Namespace: metav1.NamespaceDefault, }, Spec: ProxmoxClusterSpec{ - IPv4Config: &ipamicv1.InClusterIPPoolSpec{ + IPv4Config: &IPPoolSpec{ Addresses: []string{"10.0.0.0/24"}, Prefix: 24, }, @@ -132,7 +132,7 @@ var _ = Describe("ProxmoxCluster Test", func() { Context("IPV6Config", func() { It("Should not allow empty addresses", func() { dc := defaultCluster() - dc.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + dc.Spec.IPv6Config = &IPPoolSpec{ Addresses: []string{}, Prefix: 0, Gateway: "", @@ -142,7 +142,7 @@ var _ = Describe("ProxmoxCluster Test", func() { It("Should not allow prefix higher than 128", func() { dc := defaultCluster() - dc.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + dc.Spec.IPv6Config = &IPPoolSpec{ Addresses: []string{}, Prefix: 129, Gateway: "", diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 6534f05c..73ec1f96 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -8,7 +8,6 @@ package v1alpha1 import ( "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2" "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/cluster-api/errors" ) @@ -74,6 +73,26 @@ func (in *IPAddress) DeepCopy() *IPAddress { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) { + *out = *in + if in.Addresses != nil { + in, out := &in.Addresses, &out.Addresses + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec. +func (in *IPPoolSpec) DeepCopy() *IPPoolSpec { + if in == nil { + return nil + } + out := new(IPPoolSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InterfaceConfig) DeepCopyInto(out *InterfaceConfig) { *out = *in @@ -298,12 +317,12 @@ func (in *ProxmoxClusterSpec) DeepCopyInto(out *ProxmoxClusterSpec) { } if in.IPv4Config != nil { in, out := &in.IPv4Config, &out.IPv4Config - *out = new(v1alpha2.InClusterIPPoolSpec) + *out = new(IPPoolSpec) (*in).DeepCopyInto(*out) } if in.IPv6Config != nil { in, out := &in.IPv6Config, &out.IPv6Config - *out = new(v1alpha2.InClusterIPPoolSpec) + *out = new(IPPoolSpec) (*in).DeepCopyInto(*out) } if in.DNSServers != nil { diff --git a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml index dd32fda3..45d09b39 100644 --- a/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml +++ b/config/crd/bases/infrastructure.cluster.x-k8s.io_proxmoxclusters.yaml @@ -91,19 +91,6 @@ spec: items: type: string type: array - allocateReservedIPAddresses: - description: AllocateReservedIPAddresses causes the provider to - allocate the network address (the first address in the inferred - subnet) and broadcast address (the last address in the inferred - subnet) when IPv4. The provider will allocate the anycast address - address (the first address in the inferred subnet) when IPv6. - type: boolean - excludedAddresses: - description: ExcludedAddresses is a list of IP addresses, which - will be excluded from the set of assignable IP addresses. - items: - type: string - type: array gateway: description: Gateway type: string @@ -130,19 +117,6 @@ spec: items: type: string type: array - allocateReservedIPAddresses: - description: AllocateReservedIPAddresses causes the provider to - allocate the network address (the first address in the inferred - subnet) and broadcast address (the last address in the inferred - subnet) when IPv4. The provider will allocate the anycast address - address (the first address in the inferred subnet) when IPv6. - type: boolean - excludedAddresses: - description: ExcludedAddresses is a list of IP addresses, which - will be excluded from the set of assignable IP addresses. - items: - type: string - type: array gateway: description: Gateway type: string diff --git a/internal/controller/proxmoxcluster_controller_test.go b/internal/controller/proxmoxcluster_controller_test.go index d15b09bf..dc6ab7ac 100644 --- a/internal/controller/proxmoxcluster_controller_test.go +++ b/internal/controller/proxmoxcluster_controller_test.go @@ -116,7 +116,7 @@ var _ = Describe("Controller Test", func() { }) It("Should successfully create IPAM IPV6 related resources", func() { cl := buildProxmoxCluster(clusterName) - cl.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + cl.Spec.IPv6Config = &infrav1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -232,7 +232,7 @@ func buildProxmoxCluster(name string) infrav1.ProxmoxCluster { Host: "10.10.10.11", Port: 6443, }, - IPv4Config: &ipamicv1.InClusterIPPoolSpec{ + IPv4Config: &infrav1.IPPoolSpec{ Addresses: []string{ "10.10.10.2-10.10.10.10", "10.10.10.100-10.10.10.125", diff --git a/internal/service/vmservice/bootstrap_test.go b/internal/service/vmservice/bootstrap_test.go index 2d8f6d43..a7d6d65e 100644 --- a/internal/service/vmservice/bootstrap_test.go +++ b/internal/service/vmservice/bootstrap_test.go @@ -24,7 +24,6 @@ import ( "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" "k8s.io/utils/ptr" - "sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2" "sigs.k8s.io/cluster-api/util/conditions" infrav1alpha1 "github.com/ionos-cloud/cluster-api-provider-proxmox/api/v1alpha1" @@ -179,7 +178,7 @@ func TestGetVirtualNetworkDevices_VRFDevice_MissingInterface(t *testing.T) { func TestReconcileBootstrapData_DualStack(t *testing.T) { machineScope, _, kubeClient := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &v1alpha2.InClusterIPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -207,7 +206,7 @@ func TestReconcileBootstrapData_DualStack(t *testing.T) { func TestReconcileBootstrapData_DualStack_AdditionalDevices(t *testing.T) { machineScope, _, kubeClient := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &v1alpha2.InClusterIPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", diff --git a/internal/service/vmservice/helpers_test.go b/internal/service/vmservice/helpers_test.go index ab7fdb4c..657446f3 100644 --- a/internal/service/vmservice/helpers_test.go +++ b/internal/service/vmservice/helpers_test.go @@ -75,7 +75,7 @@ func setupReconcilerTest(t *testing.T) (*scope.MachineScope, *proxmoxtest.MockCl }, }, Spec: infrav1alpha1.ProxmoxClusterSpec{ - IPv4Config: &ipamicv1.InClusterIPPoolSpec{ + IPv4Config: &infrav1alpha1.IPPoolSpec{ Addresses: []string{"10.0.0.10-10.0.0.20"}, Prefix: 24, Gateway: "10.0.0.1", diff --git a/internal/service/vmservice/ip_test.go b/internal/service/vmservice/ip_test.go index cd958f8e..351d33bd 100644 --- a/internal/service/vmservice/ip_test.go +++ b/internal/service/vmservice/ip_test.go @@ -24,7 +24,6 @@ import ( corev1 "k8s.io/api/core/v1" infrav1alpha1 "github.com/ionos-cloud/cluster-api-provider-proxmox/api/v1alpha1" - ipamicv1 "sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2" ) const ipTag = "ip_net0_10.10.10.10" @@ -127,7 +126,7 @@ func TestReconcileIPAddresses_MultipleDevices(t *testing.T) { func TestReconcileIPAddresses_IPV6(t *testing.T) { machineScope, _, kubeClient := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ Addresses: []string{"fe80::/64"}, Prefix: 64, Gateway: "fe80::1", diff --git a/internal/service/vmservice/vm_test.go b/internal/service/vmservice/vm_test.go index 5ba46f97..5b03c22b 100644 --- a/internal/service/vmservice/vm_test.go +++ b/internal/service/vmservice/vm_test.go @@ -28,7 +28,6 @@ import ( "github.com/ionos-cloud/cluster-api-provider-proxmox/internal/service/scheduler" "github.com/ionos-cloud/cluster-api-provider-proxmox/pkg/proxmox" "github.com/ionos-cloud/cluster-api-provider-proxmox/pkg/scope" - ipamicv1 "sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2" ) func TestReconcileVM_EverythingReady(t *testing.T) { @@ -227,7 +226,7 @@ func TestReconcileMachineAddresses_IPV4(t *testing.T) { func TestReconcileMachineAddresses_IPV6(t *testing.T) { machineScope, _, _ := setupReconcilerTest(t) machineScope.InfraCluster.ProxmoxCluster.Spec.IPv4Config = nil - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -246,7 +245,7 @@ func TestReconcileMachineAddresses_IPV6(t *testing.T) { func TestReconcileMachineAddresses_DualStack(t *testing.T) { machineScope, _, _ := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", diff --git a/internal/webhook/proxmoxcluster_webhook_test.go b/internal/webhook/proxmoxcluster_webhook_test.go index 76824b41..87952995 100644 --- a/internal/webhook/proxmoxcluster_webhook_test.go +++ b/internal/webhook/proxmoxcluster_webhook_test.go @@ -23,7 +23,6 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - ipamicv1 "sigs.k8s.io/cluster-api-ipam-provider-in-cluster/api/v1alpha2" clusterv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -65,7 +64,7 @@ var _ = Describe("Controller Test", func() { It("should disallow invalid IPV6 IPs", func() { cluster := validProxmoxCluster("test-cluster") - cluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ Addresses: []string{"invalid"}, Prefix: 64, Gateway: "2001:db8::1", @@ -76,7 +75,7 @@ var _ = Describe("Controller Test", func() { It("should disallow endpoint IP to intersect with node IPs", func() { cluster := invalidProxmoxCluster("test-cluster") cluster.Spec.ControlPlaneEndpoint.Host = "2001:db8::1" - cluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -116,7 +115,7 @@ func validProxmoxCluster(name string) infrav1.ProxmoxCluster { Host: "10.10.10.1", Port: 6443, }, - IPv4Config: &ipamicv1.InClusterIPPoolSpec{ + IPv4Config: &infrav1.IPPoolSpec{ Addresses: []string{ "10.10.10.2-10.10.10.10", }, diff --git a/pkg/kubernetes/ipam/ipam_test.go b/pkg/kubernetes/ipam/ipam_test.go index 5a42882c..c9a408dd 100644 --- a/pkg/kubernetes/ipam/ipam_test.go +++ b/pkg/kubernetes/ipam/ipam_test.go @@ -104,7 +104,7 @@ func (s *IPAMTestSuite) Test_CreateOrUpdateInClusterIPPool() { s.Equal(ipamConfig.Gateway, pool.Spec.Gateway) // ipv6 - s.cluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + s.cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -141,7 +141,7 @@ func (s *IPAMTestSuite) Test_GetDefaultInClusterIPPool() { s.Equal(&pool, found) // ipv6 - s.cluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + s.cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -303,7 +303,7 @@ func (s *IPAMTestSuite) Test_CreateIPAddressClaim() { s.NoError(err) // IPV6. - s.cluster.Spec.IPv6Config = &ipamicv1.InClusterIPPoolSpec{ + s.cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -356,7 +356,7 @@ func getCluster() *infrav1.ProxmoxCluster { Namespace: "test", }, Spec: infrav1.ProxmoxClusterSpec{ - IPv4Config: &ipamicv1.InClusterIPPoolSpec{ + IPv4Config: &infrav1.IPPoolSpec{ Addresses: []string{"10.10.0.1/24"}, Gateway: "10.0.0.0", Prefix: 24, From 7b585d264c1a5c221bf9a1cdf21451e779f10461 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Wed, 20 Mar 2024 17:51:19 +0100 Subject: [PATCH 5/8] Update e2e tests --- go.mod | 10 ++++------ go.sum | 20 ++++++++++---------- test/e2e/config/proxmox-ci.yaml | 14 +++++++------- test/e2e/config/proxmox-dev.yaml | 14 +++++++------- 4 files changed, 28 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 8e8051cf..12b81a7f 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,6 @@ go 1.21 replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.3 -replace github.com/google/cel-go => github.com/google/cel-go v0.17.8 - require ( github.com/go-logr/logr v1.4.1 github.com/google/uuid v1.6.0 @@ -18,9 +16,9 @@ require ( github.com/stretchr/testify v1.9.0 go4.org/netipx v0.0.0-20230303233057-f1b76eb4bb35 golang.org/x/tools v0.18.0 - k8s.io/api v0.29.2 - k8s.io/apimachinery v0.29.2 - k8s.io/client-go v0.29.2 + k8s.io/api v0.29.3 + k8s.io/apimachinery v0.29.3 + k8s.io/client-go v0.29.3 k8s.io/klog/v2 v2.120.1 k8s.io/utils v0.0.0-20240102154912-e7106e64919e sigs.k8s.io/cluster-api v1.6.3 @@ -39,7 +37,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index 0d31bdce..b68d35db 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -189,8 +189,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= -github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4= +github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -820,16 +820,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A= -k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0= +k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= +k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= k8s.io/apiextensions-apiserver v0.29.0 h1:0VuspFG7Hj+SxyF/Z/2T0uFbI5gb5LRgEyUVE3Q4lV0= k8s.io/apiextensions-apiserver v0.29.0/go.mod h1:TKmpy3bTS0mr9pylH0nOt/QzQRrW7/h7yLdRForMZwc= -k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8= -k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= +k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= +k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= k8s.io/apiserver v0.29.0 h1:Y1xEMjJkP+BIi0GSEv1BBrf1jLU9UPfAnnGGbbDdp7o= k8s.io/apiserver v0.29.0/go.mod h1:31n78PsRKPmfpee7/l9NYEv67u6hOL6AfcE761HapDM= -k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= -k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= +k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= +k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= k8s.io/cluster-bootstrap v0.29.2 h1:CJ8kNpm6vqPX6laBEPGoEFpVQ0XmzgXMdQosvd5m2OA= k8s.io/cluster-bootstrap v0.29.2/go.mod h1:75qXUXImrhRHglBCQsBvZrS4uJFyaDinOWLWbbaRRH0= k8s.io/component-base v0.29.2 h1:lpiLyuvPA9yV1aQwGLENYyK7n/8t6l3nn3zAtFTJYe8= diff --git a/test/e2e/config/proxmox-ci.yaml b/test/e2e/config/proxmox-ci.yaml index c72bc3f8..a9cd03a6 100644 --- a/test/e2e/config/proxmox-ci.yaml +++ b/test/e2e/config/proxmox-ci.yaml @@ -14,8 +14,8 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v1.6.1 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/core-components.yaml + - name: v1.6.3 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/core-components.yaml type: url files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" @@ -27,8 +27,8 @@ providers: - name: kubeadm type: BootstrapProvider versions: - - name: v1.6.1 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/bootstrap-components.yaml + - name: v1.6.3 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/bootstrap-components.yaml type: url files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" @@ -40,8 +40,8 @@ providers: - name: kubeadm type: ControlPlaneProvider versions: - - name: v1.6.1 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/control-plane-components.yaml + - name: v1.6.3 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/control-plane-components.yaml type: url files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" @@ -54,7 +54,7 @@ providers: type: IPAMProvider versions: - name: v0.1.0 - value: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/download/v0.1.0-alpha.3/ipam-components.yaml + value: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/download/v0.1.0/ipam-components.yaml type: url files: - sourcePath: "../data/shared/ipam/metadata.yaml" diff --git a/test/e2e/config/proxmox-dev.yaml b/test/e2e/config/proxmox-dev.yaml index b35c3db3..a1eedcb8 100644 --- a/test/e2e/config/proxmox-dev.yaml +++ b/test/e2e/config/proxmox-dev.yaml @@ -14,8 +14,8 @@ providers: - name: cluster-api type: CoreProvider versions: - - name: v1.6.1 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/core-components.yaml + - name: v1.6.3 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/core-components.yaml type: url files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" @@ -27,8 +27,8 @@ providers: - name: kubeadm type: BootstrapProvider versions: - - name: v1.6.1 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/bootstrap-components.yaml + - name: v1.6.3 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/bootstrap-components.yaml type: url files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" @@ -40,8 +40,8 @@ providers: - name: kubeadm type: ControlPlaneProvider versions: - - name: v1.6.1 - value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.1/control-plane-components.yaml + - name: v1.6.3 + value: https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.6.3/control-plane-components.yaml type: url files: - sourcePath: "../data/shared/v1beta1/metadata.yaml" @@ -54,7 +54,7 @@ providers: type: IPAMProvider versions: - name: v0.1.0 - value: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/download/v0.1.0-alpha.3/ipam-components.yaml + value: https://github.com/kubernetes-sigs/cluster-api-ipam-provider-in-cluster/releases/download/v0.1.0/ipam-components.yaml type: url files: - sourcePath: "../data/shared/ipam/metadata.yaml" From aa7f76bb3624c90d9c93c44eb2dc9e75bb32a9f5 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Wed, 20 Mar 2024 18:01:58 +0100 Subject: [PATCH 6/8] Fix deps --- go.mod | 4 +++- go.sum | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 12b81a7f..3e2e416d 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,8 @@ go 1.21 replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.6.3 +replace github.com/google/cel-go => github.com/google/cel-go v0.17.8 + require ( github.com/go-logr/logr v1.4.1 github.com/google/uuid v1.6.0 @@ -37,7 +39,7 @@ require ( github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/adrg/xdg v0.4.0 // indirect github.com/alessio/shellescape v1.4.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect diff --git a/go.sum b/go.sum index b68d35db..68d5ff87 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= -github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= +github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -189,8 +189,8 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/cel-go v0.18.2 h1:L0B6sNBSVmt0OyECi8v6VOS74KOc9W/tLiWKfZABvf4= -github.com/google/cel-go v0.18.2/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= +github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= +github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= From 12ed404cf2397c7f1fbb899fe0c8c7022974c714 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Thu, 21 Mar 2024 14:24:28 +0100 Subject: [PATCH 7/8] Rename Type --- api/v1alpha1/proxmoxcluster_types.go | 8 ++++---- api/v1alpha1/proxmoxcluster_types_test.go | 6 +++--- api/v1alpha1/zz_generated.deepcopy.go | 12 ++++++------ .../controller/proxmoxcluster_controller_test.go | 4 ++-- internal/service/vmservice/bootstrap_test.go | 4 ++-- internal/service/vmservice/helpers_test.go | 2 +- internal/service/vmservice/ip_test.go | 2 +- internal/service/vmservice/vm_test.go | 4 ++-- internal/webhook/proxmoxcluster_webhook_test.go | 6 +++--- pkg/kubernetes/ipam/ipam_test.go | 8 ++++---- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/api/v1alpha1/proxmoxcluster_types.go b/api/v1alpha1/proxmoxcluster_types.go index e9479950..6957c62b 100644 --- a/api/v1alpha1/proxmoxcluster_types.go +++ b/api/v1alpha1/proxmoxcluster_types.go @@ -54,22 +54,22 @@ type ProxmoxClusterSpec struct { // either IPv4Config or IPv6Config must be provided. // +optional // +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv4Config addresses must be provided" - IPv4Config *IPPoolSpec `json:"ipv4Config,omitempty"` + IPv4Config *IPConfigSpec `json:"ipv4Config,omitempty"` // IPv6Config contains information about available IPV6 address pools and the gateway. // this can be combined with ipv4Config in order to enable dual stack. // either IPv4Config or IPv6Config must be provided. // +optional // +kubebuilder:validation:XValidation:rule="self.addresses.size() > 0",message="IPv6Config addresses must be provided" - IPv6Config *IPPoolSpec `json:"ipv6Config,omitempty"` + IPv6Config *IPConfigSpec `json:"ipv6Config,omitempty"` // DNSServers contains information about nameservers used by machines network-config. // +kubebuilder:validation:MinItems=1 DNSServers []string `json:"dnsServers"` } -// IPPoolSpec defines the desired state of IP Pool. -type IPPoolSpec struct { +// IPConfigSpec defines the desired state of IP Pool. +type IPConfigSpec struct { // Addresses is a list of IP addresses that can be assigned. This set of // addresses can be non-contiguous. Addresses []string `json:"addresses"` diff --git a/api/v1alpha1/proxmoxcluster_types_test.go b/api/v1alpha1/proxmoxcluster_types_test.go index b172ccc1..b090a5e5 100644 --- a/api/v1alpha1/proxmoxcluster_types_test.go +++ b/api/v1alpha1/proxmoxcluster_types_test.go @@ -80,7 +80,7 @@ func defaultCluster() *ProxmoxCluster { Namespace: metav1.NamespaceDefault, }, Spec: ProxmoxClusterSpec{ - IPv4Config: &IPPoolSpec{ + IPv4Config: &IPConfigSpec{ Addresses: []string{"10.0.0.0/24"}, Prefix: 24, }, @@ -132,7 +132,7 @@ var _ = Describe("ProxmoxCluster Test", func() { Context("IPV6Config", func() { It("Should not allow empty addresses", func() { dc := defaultCluster() - dc.Spec.IPv6Config = &IPPoolSpec{ + dc.Spec.IPv6Config = &IPConfigSpec{ Addresses: []string{}, Prefix: 0, Gateway: "", @@ -142,7 +142,7 @@ var _ = Describe("ProxmoxCluster Test", func() { It("Should not allow prefix higher than 128", func() { dc := defaultCluster() - dc.Spec.IPv6Config = &IPPoolSpec{ + dc.Spec.IPv6Config = &IPConfigSpec{ Addresses: []string{}, Prefix: 129, Gateway: "", diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 73ec1f96..9fd4b107 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -74,7 +74,7 @@ func (in *IPAddress) DeepCopy() *IPAddress { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) { +func (in *IPConfigSpec) DeepCopyInto(out *IPConfigSpec) { *out = *in if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses @@ -83,12 +83,12 @@ func (in *IPPoolSpec) DeepCopyInto(out *IPPoolSpec) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPPoolSpec. -func (in *IPPoolSpec) DeepCopy() *IPPoolSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPConfigSpec. +func (in *IPConfigSpec) DeepCopy() *IPConfigSpec { if in == nil { return nil } - out := new(IPPoolSpec) + out := new(IPConfigSpec) in.DeepCopyInto(out) return out } @@ -317,12 +317,12 @@ func (in *ProxmoxClusterSpec) DeepCopyInto(out *ProxmoxClusterSpec) { } if in.IPv4Config != nil { in, out := &in.IPv4Config, &out.IPv4Config - *out = new(IPPoolSpec) + *out = new(IPConfigSpec) (*in).DeepCopyInto(*out) } if in.IPv6Config != nil { in, out := &in.IPv6Config, &out.IPv6Config - *out = new(IPPoolSpec) + *out = new(IPConfigSpec) (*in).DeepCopyInto(*out) } if in.DNSServers != nil { diff --git a/internal/controller/proxmoxcluster_controller_test.go b/internal/controller/proxmoxcluster_controller_test.go index dc6ab7ac..b0c2c27f 100644 --- a/internal/controller/proxmoxcluster_controller_test.go +++ b/internal/controller/proxmoxcluster_controller_test.go @@ -116,7 +116,7 @@ var _ = Describe("Controller Test", func() { }) It("Should successfully create IPAM IPV6 related resources", func() { cl := buildProxmoxCluster(clusterName) - cl.Spec.IPv6Config = &infrav1.IPPoolSpec{ + cl.Spec.IPv6Config = &infrav1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -232,7 +232,7 @@ func buildProxmoxCluster(name string) infrav1.ProxmoxCluster { Host: "10.10.10.11", Port: 6443, }, - IPv4Config: &infrav1.IPPoolSpec{ + IPv4Config: &infrav1.IPConfigSpec{ Addresses: []string{ "10.10.10.2-10.10.10.10", "10.10.10.100-10.10.10.125", diff --git a/internal/service/vmservice/bootstrap_test.go b/internal/service/vmservice/bootstrap_test.go index a7d6d65e..59005faf 100644 --- a/internal/service/vmservice/bootstrap_test.go +++ b/internal/service/vmservice/bootstrap_test.go @@ -178,7 +178,7 @@ func TestGetVirtualNetworkDevices_VRFDevice_MissingInterface(t *testing.T) { func TestReconcileBootstrapData_DualStack(t *testing.T) { machineScope, _, kubeClient := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -206,7 +206,7 @@ func TestReconcileBootstrapData_DualStack(t *testing.T) { func TestReconcileBootstrapData_DualStack_AdditionalDevices(t *testing.T) { machineScope, _, kubeClient := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", diff --git a/internal/service/vmservice/helpers_test.go b/internal/service/vmservice/helpers_test.go index 657446f3..4053b900 100644 --- a/internal/service/vmservice/helpers_test.go +++ b/internal/service/vmservice/helpers_test.go @@ -75,7 +75,7 @@ func setupReconcilerTest(t *testing.T) (*scope.MachineScope, *proxmoxtest.MockCl }, }, Spec: infrav1alpha1.ProxmoxClusterSpec{ - IPv4Config: &infrav1alpha1.IPPoolSpec{ + IPv4Config: &infrav1alpha1.IPConfigSpec{ Addresses: []string{"10.0.0.10-10.0.0.20"}, Prefix: 24, Gateway: "10.0.0.1", diff --git a/internal/service/vmservice/ip_test.go b/internal/service/vmservice/ip_test.go index 351d33bd..d0fe7421 100644 --- a/internal/service/vmservice/ip_test.go +++ b/internal/service/vmservice/ip_test.go @@ -126,7 +126,7 @@ func TestReconcileIPAddresses_MultipleDevices(t *testing.T) { func TestReconcileIPAddresses_IPV6(t *testing.T) { machineScope, _, kubeClient := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPConfigSpec{ Addresses: []string{"fe80::/64"}, Prefix: 64, Gateway: "fe80::1", diff --git a/internal/service/vmservice/vm_test.go b/internal/service/vmservice/vm_test.go index 5b03c22b..d58691af 100644 --- a/internal/service/vmservice/vm_test.go +++ b/internal/service/vmservice/vm_test.go @@ -226,7 +226,7 @@ func TestReconcileMachineAddresses_IPV4(t *testing.T) { func TestReconcileMachineAddresses_IPV6(t *testing.T) { machineScope, _, _ := setupReconcilerTest(t) machineScope.InfraCluster.ProxmoxCluster.Spec.IPv4Config = nil - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -245,7 +245,7 @@ func TestReconcileMachineAddresses_IPV6(t *testing.T) { func TestReconcileMachineAddresses_DualStack(t *testing.T) { machineScope, _, _ := setupReconcilerTest(t) - machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPPoolSpec{ + machineScope.InfraCluster.ProxmoxCluster.Spec.IPv6Config = &infrav1alpha1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", diff --git a/internal/webhook/proxmoxcluster_webhook_test.go b/internal/webhook/proxmoxcluster_webhook_test.go index 87952995..4bb7f982 100644 --- a/internal/webhook/proxmoxcluster_webhook_test.go +++ b/internal/webhook/proxmoxcluster_webhook_test.go @@ -64,7 +64,7 @@ var _ = Describe("Controller Test", func() { It("should disallow invalid IPV6 IPs", func() { cluster := validProxmoxCluster("test-cluster") - cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ + cluster.Spec.IPv6Config = &infrav1.IPConfigSpec{ Addresses: []string{"invalid"}, Prefix: 64, Gateway: "2001:db8::1", @@ -75,7 +75,7 @@ var _ = Describe("Controller Test", func() { It("should disallow endpoint IP to intersect with node IPs", func() { cluster := invalidProxmoxCluster("test-cluster") cluster.Spec.ControlPlaneEndpoint.Host = "2001:db8::1" - cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ + cluster.Spec.IPv6Config = &infrav1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -115,7 +115,7 @@ func validProxmoxCluster(name string) infrav1.ProxmoxCluster { Host: "10.10.10.1", Port: 6443, }, - IPv4Config: &infrav1.IPPoolSpec{ + IPv4Config: &infrav1.IPConfigSpec{ Addresses: []string{ "10.10.10.2-10.10.10.10", }, diff --git a/pkg/kubernetes/ipam/ipam_test.go b/pkg/kubernetes/ipam/ipam_test.go index c9a408dd..09fe77fb 100644 --- a/pkg/kubernetes/ipam/ipam_test.go +++ b/pkg/kubernetes/ipam/ipam_test.go @@ -104,7 +104,7 @@ func (s *IPAMTestSuite) Test_CreateOrUpdateInClusterIPPool() { s.Equal(ipamConfig.Gateway, pool.Spec.Gateway) // ipv6 - s.cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ + s.cluster.Spec.IPv6Config = &infrav1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -141,7 +141,7 @@ func (s *IPAMTestSuite) Test_GetDefaultInClusterIPPool() { s.Equal(&pool, found) // ipv6 - s.cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ + s.cluster.Spec.IPv6Config = &infrav1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -303,7 +303,7 @@ func (s *IPAMTestSuite) Test_CreateIPAddressClaim() { s.NoError(err) // IPV6. - s.cluster.Spec.IPv6Config = &infrav1.IPPoolSpec{ + s.cluster.Spec.IPv6Config = &infrav1.IPConfigSpec{ Addresses: []string{"2001:db8::/64"}, Prefix: 64, Gateway: "2001:db8::1", @@ -356,7 +356,7 @@ func getCluster() *infrav1.ProxmoxCluster { Namespace: "test", }, Spec: infrav1.ProxmoxClusterSpec{ - IPv4Config: &infrav1.IPPoolSpec{ + IPv4Config: &infrav1.IPConfigSpec{ Addresses: []string{"10.10.0.1/24"}, Gateway: "10.0.0.0", Prefix: 24, From 3682389ff5af858cdc5e39178676bbdf20435028 Mon Sep 17 00:00:00 2001 From: Mohamed Chiheb Ben Jemaa Date: Thu, 21 Mar 2024 15:05:03 +0100 Subject: [PATCH 8/8] Update godoc --- api/v1alpha1/proxmoxcluster_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1alpha1/proxmoxcluster_types.go b/api/v1alpha1/proxmoxcluster_types.go index 6957c62b..62988d3a 100644 --- a/api/v1alpha1/proxmoxcluster_types.go +++ b/api/v1alpha1/proxmoxcluster_types.go @@ -68,7 +68,7 @@ type ProxmoxClusterSpec struct { DNSServers []string `json:"dnsServers"` } -// IPConfigSpec defines the desired state of IP Pool. +// IPConfigSpec contains information about available IP config. type IPConfigSpec struct { // Addresses is a list of IP addresses that can be assigned. This set of // addresses can be non-contiguous.