From 4f0018d9a87c25bfab3280bd6aebb0cdf8f334b4 Mon Sep 17 00:00:00 2001 From: Federico Paolinelli Date: Wed, 21 Aug 2024 08:37:47 -0400 Subject: [PATCH 01/10] Update the k8s api to 1.31 and regenerate the clientset / informers Bumping the codegen version and API to get rid of the core symlink. Signed-off-by: Federico Paolinelli --- core | 1 - e2etests/go.mod | 26 +-- e2etests/go.sum | 60 +++--- e2etests/go.work.sum | 76 +++++++- go.mod | 29 +-- go.sum | 64 ++++--- hack/update-codegen.sh | 11 +- pkg/client/clientset/versioned/clientset.go | 16 +- .../versioned/fake/clientset_generated.go | 16 +- .../clientset/versioned/fake/register.go | 4 +- .../clientset/versioned/scheme/register.go | 4 +- .../v1beta1/api_client.go} | 34 ++-- .../typed/{core => api}/v1beta1/doc.go | 0 .../typed/{core => api}/v1beta1/fake/doc.go | 0 .../v1beta1/fake/fake_api_client.go} | 8 +- .../v1beta1/fake/fake_frrconfiguration.go | 40 ++-- .../typed/api/v1beta1/frrconfiguration.go | 55 ++++++ .../v1beta1/generated_expansion.go | 0 .../typed/core/v1beta1/frrconfiguration.go | 181 ------------------ .../{core => api}/interface.go | 4 +- .../{core => api}/v1beta1/frrconfiguration.go | 6 +- .../{core => api}/v1beta1/interface.go | 0 .../informers/externalversions/factory.go | 9 +- .../informers/externalversions/generic.go | 4 +- .../v1beta1/expansion_generated.go | 0 .../{core => api}/v1beta1/frrconfiguration.go | 39 +--- 26 files changed, 316 insertions(+), 371 deletions(-) delete mode 120000 core rename pkg/client/clientset/versioned/typed/{core/v1beta1/core_client.go => api/v1beta1/api_client.go} (60%) rename pkg/client/clientset/versioned/typed/{core => api}/v1beta1/doc.go (100%) rename pkg/client/clientset/versioned/typed/{core => api}/v1beta1/fake/doc.go (100%) rename pkg/client/clientset/versioned/typed/{core/v1beta1/fake/fake_core_client.go => api/v1beta1/fake/fake_api_client.go} (68%) rename pkg/client/clientset/versioned/typed/{core => api}/v1beta1/fake/fake_frrconfiguration.go (73%) create mode 100644 pkg/client/clientset/versioned/typed/api/v1beta1/frrconfiguration.go rename pkg/client/clientset/versioned/typed/{core => api}/v1beta1/generated_expansion.go (100%) delete mode 100644 pkg/client/clientset/versioned/typed/core/v1beta1/frrconfiguration.go rename pkg/client/informers/externalversions/{core => api}/interface.go (96%) rename pkg/client/informers/externalversions/{core => api}/v1beta1/frrconfiguration.go (92%) rename pkg/client/informers/externalversions/{core => api}/v1beta1/interface.go (100%) rename pkg/client/listers/{core => api}/v1beta1/expansion_generated.go (100%) rename pkg/client/listers/{core => api}/v1beta1/frrconfiguration.go (60%) diff --git a/core b/core deleted file mode 120000 index 9e5bfb42..00000000 --- a/core +++ /dev/null @@ -1 +0,0 @@ -api \ No newline at end of file diff --git a/e2etests/go.mod b/e2etests/go.mod index a225fcb8..7ddfd9ef 100644 --- a/e2etests/go.mod +++ b/e2etests/go.mod @@ -12,26 +12,27 @@ replace ( require ( github.com/metallb/frr-k8s v0.0.11 - github.com/onsi/ginkgo/v2 v2.17.2 + github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/openshift-kni/k8sreporter v1.0.4 github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.54.0 + github.com/prometheus/common v0.55.0 go.universe.tf/e2etest v0.0.0-00010101000000-000000000000 - k8s.io/api v0.30.2 - k8s.io/apimachinery v0.30.2 - k8s.io/client-go v0.30.2 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 - sigs.k8s.io/controller-runtime v0.18.4 + k8s.io/api v0.31.0 + k8s.io/apimachinery v0.31.0 + k8s.io/client-go v0.31.0 + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 + sigs.k8s.io/controller-runtime v0.19.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -45,7 +46,7 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect + github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/josharian/intern v1.0.0 // indirect @@ -58,6 +59,7 @@ require ( github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/x448/float16 v0.8.4 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.universe.tf/metallb v0.13.7 // indirect @@ -75,9 +77,9 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.30.2 // indirect - k8s.io/component-base v0.30.2 // indirect - k8s.io/klog/v2 v2.130.0 // indirect + k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/component-base v0.31.0 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a // indirect k8s.io/pod-security-admission v0.28.4 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/e2etests/go.sum b/e2etests/go.sum index 5947842a..9c9d682a 100644 --- a/e2etests/go.sum +++ b/e2etests/go.sum @@ -3,8 +3,9 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 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= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= @@ -13,6 +14,8 @@ github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0 github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ= 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/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -41,8 +44,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -70,32 +73,35 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/openshift-kni/k8sreporter v1.0.4 h1:jEwX6Pqei60kO1U0JLo+ePjQaP7DNn/M6d63KCS2tS0= github.com/openshift-kni/k8sreporter v1.0.4/go.mod h1:fg8HI9yxiKAi6UzR6NTtrmQmA2WKzUqmkRUHwQ1+Bj8= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -154,6 +160,8 @@ google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWn gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -161,26 +169,26 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= -k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= -k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= -k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= -k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= -k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= -k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= -k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII= -k8s.io/component-base v0.30.2/go.mod h1:yQLkQDrkK8J6NtP+MGJOws+/PPeEXNpwFixsUI7h/OE= -k8s.io/klog/v2 v2.130.0 h1:5nB3+3HpqKqXJIXNtJdtxcDCfaa9KL8StJgMzGJkUkM= -k8s.io/klog/v2 v2.130.0/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= +k8s.io/component-base v0.31.0 h1:/KIzGM5EvPNQcYgwq5NwoQBaOlVFrghoVGr8lG6vNRs= +k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a h1:zD1uj3Jf+mD4zmA7W+goE5TxDkI7OGJjBNBzq5fJtLA= k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= k8s.io/pod-security-admission v0.28.4 h1:b9d6zfKNjkawrO2gF7rBr5XoSZqPfE6UjKLNjgXYrr0= k8s.io/pod-security-admission v0.28.4/go.mod h1:MVYrZx0Q6ewsZ05Ml2+Ox03HQMAVjO60oombQNmJ44E= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= -sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/e2etests/go.work.sum b/e2etests/go.work.sum index 98b03694..48b1c9bb 100644 --- a/e2etests/go.work.sum +++ b/e2etests/go.work.sum @@ -445,6 +445,7 @@ github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kd github.com/antlr/antlr4/runtime/Go/antlr v1.4.10/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= 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/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/apache/arrow/go/v12 v12.0.0/go.mod h1:d+tV/eHZZ7Dz7RPrFKtPK02tpr+c9/PEd/zm8mDS9Vg= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -467,15 +468,18 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chai2010/gettext-go v1.0.2/go.mod h1:y+wnP2cHYaVj19NZhYKAwEMH2CI1gNHeQQ+5AjwawxA= github.com/checkpoint-restore/go-criu/v5 v5.3.0 h1:wpFFOoomK3389ue2lAb0Boag6XPht5QYpipxmSNL4d8= github.com/chromedp/cdproto v0.0.0-20230802225258-3cf4e6d46a89/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= github.com/chromedp/chromedp v0.9.2/go.mod h1:LkSXJKONWTCHAfQasKFUZI+mxqS4tZqhmtGzzhLsnLs= github.com/chromedp/sysutil v1.0.0/go.mod h1:kgWmDdq8fTzXYcKIBqIYvRRTnYb9aNS9moAV0xufSww= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= +github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= +github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/cilium/ebpf v0.7.0 h1:1k/q3ATgxSXRdrmPfH8d7YK0GfqVsEKZAX9dQZvs56k= github.com/cilium/ebpf v0.9.1/go.mod h1:+OhNOIXx/Fnu1IE8bJz2dzOA+VSfyTfdNUVdlQnxUFY= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= @@ -512,6 +516,7 @@ 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.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.3 h1:YX6ebbZCZP7VkM3scTTokDgBL2TY741X51MTk3ycuNI= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= @@ -537,6 +542,7 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.9.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -559,6 +565,7 @@ github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZM github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3 h1:8sXhOn0uLys67V8EsXLc6eszDs8VXWxL3iRvebPhedY= github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= @@ -579,17 +586,23 @@ github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9 github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 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.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/jsonreference v0.20.1/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= @@ -607,6 +620,8 @@ github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -618,6 +633,7 @@ github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= @@ -630,6 +646,7 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 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.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -643,6 +660,7 @@ github.com/google/cel-go v0.16.1/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulN 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.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= @@ -696,6 +714,7 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjd github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= @@ -796,8 +815,10 @@ github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hx github.com/moby/ipvs v1.1.0/go.mod h1:4VJMWuf098bsUMmZEiD4Tjk/O7mOn3l1PTD3s4OoYAs= github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI= github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= @@ -838,6 +859,7 @@ github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= @@ -874,6 +896,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/rubiojr/go-vhd v0.0.0-20200706105327-02e210299021/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -895,6 +918,7 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/viper v1.6.3/go.mod h1:jUMtyi0/lB5yZH/FjyGAoH7IMNrIhlBf6pXZmbMDvzw= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= @@ -922,7 +946,6 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df h1:OviZH7qLw/7Zo github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= @@ -942,41 +965,49 @@ go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo= go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ= go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= +go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= +go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= go.etcd.io/etcd/pkg/v3 v3.5.5/go.mod h1:6ksYFxttiUGzC2uxyqiyOEvhAiD0tuIqSZkX3TyPdaE= go.etcd.io/etcd/pkg/v3 v3.5.9 h1:6R2jg/aWd/zB9+9JxmijDKStGJAPFsX3e6BeJkMi6eQ= go.etcd.io/etcd/pkg/v3 v3.5.9/go.mod h1:BZl0SAShQFk0IpLWR78T/+pyt8AruMHhTNNX73hkNVY= go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= +go.etcd.io/etcd/pkg/v3 v3.5.13/go.mod h1:N+4PLrp7agI/Viy+dUYpX7iRtSPvKq+w8Y14d1vX+m0= go.etcd.io/etcd/raft/v3 v3.5.5/go.mod h1:76TA48q03g1y1VpTue92jZLr9lIHKUNcYdZOOGyx8rI= go.etcd.io/etcd/raft/v3 v3.5.9 h1:ZZ1GIHoUlHsn0QVqiRysAm3/81Xx7+i2d7nSdWxlOiI= go.etcd.io/etcd/raft/v3 v3.5.9/go.mod h1:WnFkqzFdZua4LVlVXQEGhmooLeyS7mqzS4Pf4BCVqXg= go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= +go.etcd.io/etcd/raft/v3 v3.5.13/go.mod h1:uUFibGLn2Ksm2URMxN1fICGhk8Wu96EfDQyuLhAcAmw= go.etcd.io/etcd/server/v3 v3.5.5/go.mod h1:rZ95vDw/jrvsbj9XpTqPrTAB9/kzchVdhRirySPkUBc= go.etcd.io/etcd/server/v3 v3.5.9 h1:vomEmmxeztLtS5OEH7d0hBAg4cjVIu9wXuNzUZx2ZA0= go.etcd.io/etcd/server/v3 v3.5.9/go.mod h1:GgI1fQClQCFIzuVjlvdbMxNbnISt90gdfYyqiAIt65g= go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= +go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -990,37 +1021,46 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.3 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.35.0/go.mod h1:h8TWwRAhQpOd0aM5nYsRD8+flnkj+526GEIVlarH7eY= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.35.1/go.mod h1:9NiG9I2aHTKkcxqCILhjtyNA1QEiCjdBACv4IvrFQ+c= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= go.opentelemetry.io/otel v1.18.0/go.mod h1:9lWqYO0Db579XzVuCKFNPDl4s73Voa+zEck3wHaAYQI= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/otlp v0.20.0 h1:PTNgq9MRmQqqJY0REVbZFvwkYOA85vbdQU/nVfxDyqg= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= go.opentelemetry.io/otel/metric v0.31.0/go.mod h1:ohmwj9KTSIeBnDBm/ZwH2PSZxZzoOaG2xZeekTRzL5A= go.opentelemetry.io/otel/metric v1.18.0/go.mod h1:nNSpsVDjWGfb7chbRLUNW+PBNdcSTHD4Uu5pfFMOI0k= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= go.opentelemetry.io/otel/trace v1.18.0/go.mod h1:T2+SGJGuYZY3bjj5rgh/hN7KIrlpWC5nS8Mjvzckz+0= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1054,6 +1094,7 @@ 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-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= 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= @@ -1078,11 +1119,13 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1123,6 +1166,8 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1142,6 +1187,7 @@ golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= 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= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1179,10 +1225,13 @@ golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1200,6 +1249,8 @@ golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= @@ -1218,12 +1269,16 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.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.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 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= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= @@ -1261,6 +1316,7 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= @@ -1270,6 +1326,9 @@ golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg= +golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.0/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= @@ -1343,11 +1402,13 @@ google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:O9kGHb51 google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= @@ -1356,6 +1417,7 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= 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= @@ -1385,6 +1447,7 @@ google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= 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= @@ -1396,6 +1459,7 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= @@ -1437,6 +1501,7 @@ k8s.io/apiserver v0.29.0/go.mod h1:31n78PsRKPmfpee7/l9NYEv67u6hOL6AfcE761HapDM= k8s.io/apiserver v0.29.3 h1:xR7ELlJ/BZSr2n4CnD3lfA4gzFivh0wwfNfz9L0WZcE= k8s.io/apiserver v0.29.3/go.mod h1:hrvXlwfRulbMbBgmWRQlFru2b/JySDpmzvQwwk4GUOs= k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8= +k8s.io/apiserver v0.31.0/go.mod h1:KI9ox5Yu902iBnnyMmy7ajonhKnkeZYJhTZ/YI+WEMk= k8s.io/cli-runtime v0.26.0/go.mod h1:o+4KmwHzO/UK0wepE1qpRk6l3o60/txUZ1fEXWGIKTY= k8s.io/client-go v0.29.0/go.mod h1:yLkXH4HKMAywcrD82KMSmfYg2DlE8mepPR4JGSo5n38= k8s.io/cloud-provider v0.26.0 h1:kO2BIgCou71QNRHGkpFi/8lnas9UIr+fJz1l/nuiOMo= @@ -1450,7 +1515,10 @@ k8s.io/code-generator v0.28.3/go.mod h1:A2EAHTRYvCvBrb/MM2zZBNipeCk3f8NtpdNIKawC k8s.io/code-generator v0.29.3 h1:m7E25/t9R9NvejspO2zBdyu+/Gl0Z5m7dCRc680KS14= k8s.io/code-generator v0.29.3/go.mod h1:x47ofBhN4gxYFcxeKA1PYXeaPreAGaDN85Y/lNUsPoM= k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA= +k8s.io/code-generator v0.31.0/go.mod h1:84y4w3es8rOJOUUP1rLsIiGlO1JuEaPFXQPA9e/K6U0= k8s.io/component-base v0.29.0/go.mod h1:sADonFTQ9Zc9yFLghpDpmNXEdHyQmFIGbiuZbqAXQ1M= +k8s.io/component-base v0.31.0 h1:/KIzGM5EvPNQcYgwq5NwoQBaOlVFrghoVGr8lG6vNRs= +k8s.io/component-base v0.31.0/go.mod h1:TYVuzI1QmN4L5ItVdMSXKvH7/DtvIuas5/mm8YT3rTo= k8s.io/component-helpers v0.28.3 h1:te9ieTGzcztVktUs92X53P6BamAoP73MK0qQP0WmDqc= k8s.io/component-helpers v0.28.3/go.mod h1:oJR7I9ist5UAQ3y/CTdbw6CXxdMZ1Lw2Ua/EZEwnVLs= k8s.io/controller-manager v0.26.0/go.mod h1:GxUYtQDBE/RHh7AnZSZqwi2xBPIXlOaWsnDLflKGYrE= @@ -1467,16 +1535,19 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= +k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kms v0.26.0/go.mod h1:ReC1IEGuxgfN+PDCIpR6w8+XMmDE7uJhxcCwMZFdIYc= k8s.io/kms v0.28.3 h1:jYwwAe96XELNjYWv1G4kNzizcFoZ50OOElvPansbw70= k8s.io/kms v0.28.3/go.mod h1:kSMjU2tg7vjqqoWVVCcmPmNZ/CofPsoTbSxAipCvZuE= k8s.io/kms v0.29.3 h1:ReljsAUhYlm2spdT4yXmY+9a8x8dc/OT4mXvwQPPteQ= k8s.io/kms v0.29.3/go.mod h1:TBGbJKpRUMk59neTMDMddjIDL+D4HuFUbpuiuzmOPg0= k8s.io/kms v0.30.2/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4= +k8s.io/kms v0.31.0/go.mod h1:OZKwl1fan3n3N5FFxnW5C4V3ygrah/3YXeJWS3O6+94= k8s.io/kube-aggregator v0.26.0/go.mod h1:QUGAvubVFZ43JiT2gMm6f15FvFkyJcZeDcV1nIbmfgk= k8s.io/kube-controller-manager v0.26.0/go.mod h1:e7C5Xk68HhOUprH6CE55jt7PhTUeEaBNwnwGeoe3OEo= k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= k8s.io/kube-proxy v0.26.0/go.mod h1:4kz3dPdMUnspJnFgoJG9lWn1UCiho85Gyn1WLInK0XA= k8s.io/kube-scheduler v0.26.0/go.mod h1:FmptJbq36ATKYxeR+UqAvUtFaLeoFWgoDk1cdCpVPYQ= k8s.io/kubectl v0.28.3 h1:H1Peu1O3EbN9zHkJCcvhiJ4NUj6lb88sGPO5wrWIM6k= @@ -1498,6 +1569,7 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= @@ -1505,6 +1577,7 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2/go.mod h1:+qG7ISX 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/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.12.1/go.mod h1:y3JUhimkZkR6sbLNwfJHxvo1TCLwuwm14sCYnkH6S1s= @@ -1513,4 +1586,5 @@ sigs.k8s.io/kustomize/kustomize/v4 v4.5.7/go.mod h1:VSNKEH9D9d9bLiWEGbS6Xbg/Ih0t sigs.k8s.io/kustomize/kustomize/v5 v5.0.4-0.20230601165947-6ce0bf390ce3/go.mod h1:/d88dHCvoy7d0AKFT0yytezSGZKjsZBVs9YTkBHSGFk= sigs.k8s.io/kustomize/kyaml v0.13.9/go.mod h1:QsRbD0/KcU+wdk0/L0fIp2KLnohkVzs6fQ85/nOXac4= sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3/go.mod h1:JWP1Fj0VWGHyw3YUPjXSQnRnrwezrZSrApfX5S0nIag= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/go.mod b/go.mod index c0b54e36..b0b3d52f 100644 --- a/go.mod +++ b/go.mod @@ -5,20 +5,20 @@ go 1.22.0 toolchain go1.22.4 require ( - github.com/davecgh/go-spew v1.1.1 + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/go-kit/log v0.2.1 github.com/google/go-cmp v0.6.0 - github.com/onsi/ginkgo/v2 v2.17.2 + github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/open-policy-agent/cert-controller v0.10.2-0.20240531181455-2649f121ab97 github.com/ory/dockertest/v3 v3.10.0 github.com/prometheus/client_golang v1.19.1 - k8s.io/api v0.30.2 - k8s.io/apimachinery v0.30.2 - k8s.io/client-go v0.30.2 + k8s.io/api v0.31.0 + k8s.io/apimachinery v0.31.0 + k8s.io/client-go v0.31.0 k8s.io/klog v1.0.0 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 - sigs.k8s.io/controller-runtime v0.18.4 + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 + sigs.k8s.io/controller-runtime v0.19.0 ) require ( @@ -26,7 +26,7 @@ require ( github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/docker/cli v20.10.17+incompatible // indirect @@ -37,6 +37,7 @@ require ( github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/zapr v1.3.0 // indirect @@ -49,7 +50,7 @@ require ( github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect + github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.6.0 // indirect github.com/imdario/mergo v0.3.16 // indirect @@ -66,10 +67,11 @@ require ( github.com/opencontainers/runc v1.1.5 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect + github.com/prometheus/common v0.55.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/sirupsen/logrus v1.9.0 // indirect + github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect @@ -88,11 +90,12 @@ require ( golang.org/x/tools v0.22.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.30.2 // indirect - k8s.io/klog/v2 v2.130.0 // indirect + k8s.io/apiextensions-apiserver v0.31.0 // indirect + k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index 352d019e..2c9f405f 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= 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/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= @@ -22,8 +22,9 @@ github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 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= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/cli v20.10.17+incompatible h1:eO2KS7ZFeov5UJeaDmIs1NFEDRf32PaqRpvoEkKBy5M= github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= @@ -41,6 +42,8 @@ github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= 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/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= @@ -79,8 +82,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -117,8 +120,8 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/open-policy-agent/cert-controller v0.10.2-0.20240531181455-2649f121ab97 h1:otk1yQtHleQq5VIy5C+rAYnErOT/WrvDyplqPhYDqb8= @@ -137,24 +140,25 @@ github.com/ory/dockertest/v3 v3.10.0 h1:4K3z2VMe8Woe++invjaTB7VRyQXQy5UY+loujO4a github.com/ory/dockertest/v3 v3.10.0/go.mod h1:nr57ZbRWMqfsdGdFNLHz5jjNdDb7VVFnzAeW1n5N1Lg= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -167,6 +171,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= @@ -249,6 +255,8 @@ google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWn gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -260,26 +268,26 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo= gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= -k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= -k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= -k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= -k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= -k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= -k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= -k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= +k8s.io/api v0.31.0 h1:b9LiSjR2ym/SzTOlfMHm1tr7/21aD7fSkqgD/CVJBCo= +k8s.io/api v0.31.0/go.mod h1:0YiFF+JfFxMM6+1hQei8FY8M7s1Mth+z/q7eF1aJkTE= +k8s.io/apiextensions-apiserver v0.31.0 h1:fZgCVhGwsclj3qCw1buVXCV6khjRzKC5eCFt24kyLSk= +k8s.io/apiextensions-apiserver v0.31.0/go.mod h1:b9aMDEYaEe5sdK+1T0KU78ApR/5ZVp4i56VacZYEHxk= +k8s.io/apimachinery v0.31.0 h1:m9jOiSr3FoSSL5WO9bjm1n6B9KROYYgNZOb4tyZ1lBc= +k8s.io/apimachinery v0.31.0/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.0 h1:QqEJzNjbN2Yv1H79SsS+SWnXkBgVu4Pj3CJQgbx0gI8= +k8s.io/client-go v0.31.0/go.mod h1:Y9wvC76g4fLjmU0BA+rV+h2cncoadjvjjkkIGoTLcGU= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.130.0 h1:5nB3+3HpqKqXJIXNtJdtxcDCfaa9KL8StJgMzGJkUkM= -k8s.io/klog/v2 v2.130.0/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-aggregator v0.30.1 h1:ymR2BsxDacTKwzKTuNhGZttuk009c+oZbSeD+IPX5q4= k8s.io/kube-aggregator v0.30.1/go.mod h1:SFbqWsM6ea8dHd3mPLsZFzJHbjBOS5ykIgJh4znZ5iQ= k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a h1:zD1uj3Jf+mD4zmA7W+goE5TxDkI7OGJjBNBzq5fJtLA= k8s.io/kube-openapi v0.0.0-20240521193020-835d969ad83a/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.18.4 h1:87+guW1zhvuPLh1PHybKdYFLU0YJp4FhJRmiHvm5BZw= -sigs.k8s.io/controller-runtime v0.18.4/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q= +sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 232e5ad7..6da86d45 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -77,13 +77,8 @@ readonly COMMON_FLAGS="${VERIFY_FLAG:-} --go-header-file ${SCRIPT_ROOT}/hack/boi new_report="$(mktemp -t "$(basename "$0").api_violations.XXXXXX")" -# TEMPORARY FIX (sure!) until https://github.com/kubernetes/kubernetes/pull/125162 -# lands on a tagged release. See also https://github.com/kubernetes/code-generator/issues/167 -rm core || true -ln -s api core - echo "Generating clientset at ${OUTPUT_PKG}/${CLIENTSET_PKG_NAME}" -go run k8s.io/code-generator/cmd/client-gen@v0.30.2 \ +go run k8s.io/code-generator/cmd/client-gen@v0.31.0 \ --clientset-name "${CLIENTSET_NAME}" \ --input-base "${APIS_PKG}" \ --input "${INPUT_DIRS_COMMA//${APIS_PKG}/}" \ @@ -92,14 +87,14 @@ go run k8s.io/code-generator/cmd/client-gen@v0.30.2 \ ${COMMON_FLAGS} echo "Generating listers at ${OUTPUT_PKG}/listers" -go run k8s.io/code-generator/cmd/lister-gen@v0.30.2 \ +go run k8s.io/code-generator/cmd/lister-gen@v0.31.0 \ --output-dir "pkg/client/listers" \ --output-pkg "${OUTPUT_PKG}/listers" \ ${COMMON_FLAGS} \ ${INPUT_DIRS_SPACE} echo "Generating informers at ${OUTPUT_PKG}/informers" -go run k8s.io/code-generator/cmd/informer-gen@v0.30.2 \ +go run k8s.io/code-generator/cmd/informer-gen@v0.31.0 \ --versioned-clientset-package "${OUTPUT_PKG}/${CLIENTSET_PKG_NAME}/${CLIENTSET_NAME}" \ --listers-package "${OUTPUT_PKG}/listers" \ --output-dir "pkg/client/informers" \ diff --git a/pkg/client/clientset/versioned/clientset.go b/pkg/client/clientset/versioned/clientset.go index 4b69af41..5c92e695 100644 --- a/pkg/client/clientset/versioned/clientset.go +++ b/pkg/client/clientset/versioned/clientset.go @@ -8,7 +8,7 @@ import ( "fmt" "net/http" - corev1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/core/v1beta1" + apiv1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/api/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" flowcontrol "k8s.io/client-go/util/flowcontrol" @@ -16,18 +16,18 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface - CoreV1beta1() corev1beta1.CoreV1beta1Interface + ApiV1beta1() apiv1beta1.ApiV1beta1Interface } // Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - coreV1beta1 *corev1beta1.CoreV1beta1Client + apiV1beta1 *apiv1beta1.ApiV1beta1Client } -// CoreV1beta1 retrieves the CoreV1beta1Client -func (c *Clientset) CoreV1beta1() corev1beta1.CoreV1beta1Interface { - return c.coreV1beta1 +// ApiV1beta1 retrieves the ApiV1beta1Client +func (c *Clientset) ApiV1beta1() apiv1beta1.ApiV1beta1Interface { + return c.apiV1beta1 } // Discovery retrieves the DiscoveryClient @@ -74,7 +74,7 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error - cs.coreV1beta1, err = corev1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) + cs.apiV1beta1, err = apiv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err } @@ -99,7 +99,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset - cs.coreV1beta1 = corev1beta1.New(c) + cs.apiV1beta1 = apiv1beta1.New(c) cs.DiscoveryClient = discovery.NewDiscoveryClient(c) return &cs diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go index 11d5f43c..d6e24860 100644 --- a/pkg/client/clientset/versioned/fake/clientset_generated.go +++ b/pkg/client/clientset/versioned/fake/clientset_generated.go @@ -6,8 +6,8 @@ package fake import ( clientset "github.com/metallb/frr-k8s/pkg/client/clientset/versioned" - corev1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/core/v1beta1" - fakecorev1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/core/v1beta1/fake" + apiv1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/api/v1beta1" + fakeapiv1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/api/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" "k8s.io/client-go/discovery" @@ -17,8 +17,12 @@ import ( // NewSimpleClientset returns a clientset that will respond with the provided objects. // It's backed by a very simple object tracker that processes creates, updates and deletions as-is, -// without applying any validations and/or defaults. It shouldn't be considered a replacement +// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement // for a real clientset and is mostly useful in simple unit tests. +// +// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves +// server side apply testing. NewClientset is only available when apply configurations are generated (e.g. +// via --with-applyconfig). func NewSimpleClientset(objects ...runtime.Object) *Clientset { o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder()) for _, obj := range objects { @@ -65,7 +69,7 @@ var ( _ testing.FakeClient = &Clientset{} ) -// CoreV1beta1 retrieves the CoreV1beta1Client -func (c *Clientset) CoreV1beta1() corev1beta1.CoreV1beta1Interface { - return &fakecorev1beta1.FakeCoreV1beta1{Fake: &c.Fake} +// ApiV1beta1 retrieves the ApiV1beta1Client +func (c *Clientset) ApiV1beta1() apiv1beta1.ApiV1beta1Interface { + return &fakeapiv1beta1.FakeApiV1beta1{Fake: &c.Fake} } diff --git a/pkg/client/clientset/versioned/fake/register.go b/pkg/client/clientset/versioned/fake/register.go index a2c58746..7e347a2b 100644 --- a/pkg/client/clientset/versioned/fake/register.go +++ b/pkg/client/clientset/versioned/fake/register.go @@ -5,7 +5,7 @@ package fake import ( - corev1beta1 "github.com/metallb/frr-k8s/core/v1beta1" + apiv1beta1 "github.com/metallb/frr-k8s/api/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -17,7 +17,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - corev1beta1.AddToScheme, + apiv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/scheme/register.go b/pkg/client/clientset/versioned/scheme/register.go index 42279688..ed900d3f 100644 --- a/pkg/client/clientset/versioned/scheme/register.go +++ b/pkg/client/clientset/versioned/scheme/register.go @@ -5,7 +5,7 @@ package scheme import ( - corev1beta1 "github.com/metallb/frr-k8s/core/v1beta1" + apiv1beta1 "github.com/metallb/frr-k8s/api/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" schema "k8s.io/apimachinery/pkg/runtime/schema" @@ -17,7 +17,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ - corev1beta1.AddToScheme, + apiv1beta1.AddToScheme, } // AddToScheme adds all types of this clientset into the given scheme. This allows composition diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/core_client.go b/pkg/client/clientset/versioned/typed/api/v1beta1/api_client.go similarity index 60% rename from pkg/client/clientset/versioned/typed/core/v1beta1/core_client.go rename to pkg/client/clientset/versioned/typed/api/v1beta1/api_client.go index 20061aac..6aebb413 100644 --- a/pkg/client/clientset/versioned/typed/core/v1beta1/core_client.go +++ b/pkg/client/clientset/versioned/typed/api/v1beta1/api_client.go @@ -7,29 +7,29 @@ package v1beta1 import ( "net/http" - v1beta1 "github.com/metallb/frr-k8s/core/v1beta1" + v1beta1 "github.com/metallb/frr-k8s/api/v1beta1" "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/scheme" rest "k8s.io/client-go/rest" ) -type CoreV1beta1Interface interface { +type ApiV1beta1Interface interface { RESTClient() rest.Interface FRRConfigurationsGetter } -// CoreV1beta1Client is used to interact with features provided by the group. -type CoreV1beta1Client struct { +// ApiV1beta1Client is used to interact with features provided by the api group. +type ApiV1beta1Client struct { restClient rest.Interface } -func (c *CoreV1beta1Client) FRRConfigurations(namespace string) FRRConfigurationInterface { +func (c *ApiV1beta1Client) FRRConfigurations(namespace string) FRRConfigurationInterface { return newFRRConfigurations(c, namespace) } -// NewForConfig creates a new CoreV1beta1Client for the given config. +// NewForConfig creates a new ApiV1beta1Client for the given config. // NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), // where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*CoreV1beta1Client, error) { +func NewForConfig(c *rest.Config) (*ApiV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -41,9 +41,9 @@ func NewForConfig(c *rest.Config) (*CoreV1beta1Client, error) { return NewForConfigAndClient(&config, httpClient) } -// NewForConfigAndClient creates a new CoreV1beta1Client for the given config and http client. +// NewForConfigAndClient creates a new ApiV1beta1Client for the given config and http client. // Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoreV1beta1Client, error) { +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiV1beta1Client, error) { config := *c if err := setConfigDefaults(&config); err != nil { return nil, err @@ -52,12 +52,12 @@ func NewForConfigAndClient(c *rest.Config, h *http.Client) (*CoreV1beta1Client, if err != nil { return nil, err } - return &CoreV1beta1Client{client}, nil + return &ApiV1beta1Client{client}, nil } -// NewForConfigOrDie creates a new CoreV1beta1Client for the given config and +// NewForConfigOrDie creates a new ApiV1beta1Client for the given config and // panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *CoreV1beta1Client { +func NewForConfigOrDie(c *rest.Config) *ApiV1beta1Client { client, err := NewForConfig(c) if err != nil { panic(err) @@ -65,15 +65,15 @@ func NewForConfigOrDie(c *rest.Config) *CoreV1beta1Client { return client } -// New creates a new CoreV1beta1Client for the given RESTClient. -func New(c rest.Interface) *CoreV1beta1Client { - return &CoreV1beta1Client{c} +// New creates a new ApiV1beta1Client for the given RESTClient. +func New(c rest.Interface) *ApiV1beta1Client { + return &ApiV1beta1Client{c} } func setConfigDefaults(config *rest.Config) error { gv := v1beta1.SchemeGroupVersion config.GroupVersion = &gv - config.APIPath = "/api" + config.APIPath = "/apis" config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() if config.UserAgent == "" { @@ -85,7 +85,7 @@ func setConfigDefaults(config *rest.Config) error { // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *CoreV1beta1Client) RESTClient() rest.Interface { +func (c *ApiV1beta1Client) RESTClient() rest.Interface { if c == nil { return nil } diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/doc.go b/pkg/client/clientset/versioned/typed/api/v1beta1/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/core/v1beta1/doc.go rename to pkg/client/clientset/versioned/typed/api/v1beta1/doc.go diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/fake/doc.go b/pkg/client/clientset/versioned/typed/api/v1beta1/fake/doc.go similarity index 100% rename from pkg/client/clientset/versioned/typed/core/v1beta1/fake/doc.go rename to pkg/client/clientset/versioned/typed/api/v1beta1/fake/doc.go diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go b/pkg/client/clientset/versioned/typed/api/v1beta1/fake/fake_api_client.go similarity index 68% rename from pkg/client/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go rename to pkg/client/clientset/versioned/typed/api/v1beta1/fake/fake_api_client.go index 7a0f7211..21b5048f 100644 --- a/pkg/client/clientset/versioned/typed/core/v1beta1/fake/fake_core_client.go +++ b/pkg/client/clientset/versioned/typed/api/v1beta1/fake/fake_api_client.go @@ -5,22 +5,22 @@ package fake import ( - v1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/core/v1beta1" + v1beta1 "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/typed/api/v1beta1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) -type FakeCoreV1beta1 struct { +type FakeApiV1beta1 struct { *testing.Fake } -func (c *FakeCoreV1beta1) FRRConfigurations(namespace string) v1beta1.FRRConfigurationInterface { +func (c *FakeApiV1beta1) FRRConfigurations(namespace string) v1beta1.FRRConfigurationInterface { return &FakeFRRConfigurations{c, namespace} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. -func (c *FakeCoreV1beta1) RESTClient() rest.Interface { +func (c *FakeApiV1beta1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret } diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/fake/fake_frrconfiguration.go b/pkg/client/clientset/versioned/typed/api/v1beta1/fake/fake_frrconfiguration.go similarity index 73% rename from pkg/client/clientset/versioned/typed/core/v1beta1/fake/fake_frrconfiguration.go rename to pkg/client/clientset/versioned/typed/api/v1beta1/fake/fake_frrconfiguration.go index 6c07e123..70a9e8d0 100644 --- a/pkg/client/clientset/versioned/typed/core/v1beta1/fake/fake_frrconfiguration.go +++ b/pkg/client/clientset/versioned/typed/api/v1beta1/fake/fake_frrconfiguration.go @@ -7,7 +7,7 @@ package fake import ( "context" - v1beta1 "github.com/metallb/frr-k8s/core/v1beta1" + v1beta1 "github.com/metallb/frr-k8s/api/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" types "k8s.io/apimachinery/pkg/types" @@ -17,7 +17,7 @@ import ( // FakeFRRConfigurations implements FRRConfigurationInterface type FakeFRRConfigurations struct { - Fake *FakeCoreV1beta1 + Fake *FakeApiV1beta1 ns string } @@ -27,22 +27,24 @@ var frrconfigurationsKind = v1beta1.SchemeGroupVersion.WithKind("FRRConfiguratio // Get takes name of the fRRConfiguration, and returns the corresponding fRRConfiguration object, and an error if there is any. func (c *FakeFRRConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.FRRConfiguration, err error) { + emptyResult := &v1beta1.FRRConfiguration{} obj, err := c.Fake. - Invokes(testing.NewGetAction(frrconfigurationsResource, c.ns, name), &v1beta1.FRRConfiguration{}) + Invokes(testing.NewGetActionWithOptions(frrconfigurationsResource, c.ns, name, options), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1beta1.FRRConfiguration), err } // List takes label and field selectors, and returns the list of FRRConfigurations that match those selectors. func (c *FakeFRRConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FRRConfigurationList, err error) { + emptyResult := &v1beta1.FRRConfigurationList{} obj, err := c.Fake. - Invokes(testing.NewListAction(frrconfigurationsResource, frrconfigurationsKind, c.ns, opts), &v1beta1.FRRConfigurationList{}) + Invokes(testing.NewListActionWithOptions(frrconfigurationsResource, frrconfigurationsKind, c.ns, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } label, _, _ := testing.ExtractFromListOptions(opts) @@ -61,40 +63,43 @@ func (c *FakeFRRConfigurations) List(ctx context.Context, opts v1.ListOptions) ( // Watch returns a watch.Interface that watches the requested fRRConfigurations. func (c *FakeFRRConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { return c.Fake. - InvokesWatch(testing.NewWatchAction(frrconfigurationsResource, c.ns, opts)) + InvokesWatch(testing.NewWatchActionWithOptions(frrconfigurationsResource, c.ns, opts)) } // Create takes the representation of a fRRConfiguration and creates it. Returns the server's representation of the fRRConfiguration, and an error, if there is any. func (c *FakeFRRConfigurations) Create(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.CreateOptions) (result *v1beta1.FRRConfiguration, err error) { + emptyResult := &v1beta1.FRRConfiguration{} obj, err := c.Fake. - Invokes(testing.NewCreateAction(frrconfigurationsResource, c.ns, fRRConfiguration), &v1beta1.FRRConfiguration{}) + Invokes(testing.NewCreateActionWithOptions(frrconfigurationsResource, c.ns, fRRConfiguration, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1beta1.FRRConfiguration), err } // Update takes the representation of a fRRConfiguration and updates it. Returns the server's representation of the fRRConfiguration, and an error, if there is any. func (c *FakeFRRConfigurations) Update(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (result *v1beta1.FRRConfiguration, err error) { + emptyResult := &v1beta1.FRRConfiguration{} obj, err := c.Fake. - Invokes(testing.NewUpdateAction(frrconfigurationsResource, c.ns, fRRConfiguration), &v1beta1.FRRConfiguration{}) + Invokes(testing.NewUpdateActionWithOptions(frrconfigurationsResource, c.ns, fRRConfiguration, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1beta1.FRRConfiguration), err } // UpdateStatus was generated because the type contains a Status member. // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *FakeFRRConfigurations) UpdateStatus(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (*v1beta1.FRRConfiguration, error) { +func (c *FakeFRRConfigurations) UpdateStatus(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (result *v1beta1.FRRConfiguration, err error) { + emptyResult := &v1beta1.FRRConfiguration{} obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceAction(frrconfigurationsResource, "status", c.ns, fRRConfiguration), &v1beta1.FRRConfiguration{}) + Invokes(testing.NewUpdateSubresourceActionWithOptions(frrconfigurationsResource, "status", c.ns, fRRConfiguration, opts), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1beta1.FRRConfiguration), err } @@ -109,7 +114,7 @@ func (c *FakeFRRConfigurations) Delete(ctx context.Context, name string, opts v1 // DeleteCollection deletes a collection of objects. func (c *FakeFRRConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionAction(frrconfigurationsResource, c.ns, listOpts) + action := testing.NewDeleteCollectionActionWithOptions(frrconfigurationsResource, c.ns, opts, listOpts) _, err := c.Fake.Invokes(action, &v1beta1.FRRConfigurationList{}) return err @@ -117,11 +122,12 @@ func (c *FakeFRRConfigurations) DeleteCollection(ctx context.Context, opts v1.De // Patch applies the patch and returns the patched fRRConfiguration. func (c *FakeFRRConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FRRConfiguration, err error) { + emptyResult := &v1beta1.FRRConfiguration{} obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceAction(frrconfigurationsResource, c.ns, name, pt, data, subresources...), &v1beta1.FRRConfiguration{}) + Invokes(testing.NewPatchSubresourceActionWithOptions(frrconfigurationsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) if obj == nil { - return nil, err + return emptyResult, err } return obj.(*v1beta1.FRRConfiguration), err } diff --git a/pkg/client/clientset/versioned/typed/api/v1beta1/frrconfiguration.go b/pkg/client/clientset/versioned/typed/api/v1beta1/frrconfiguration.go new file mode 100644 index 00000000..8b098aa1 --- /dev/null +++ b/pkg/client/clientset/versioned/typed/api/v1beta1/frrconfiguration.go @@ -0,0 +1,55 @@ +// SPDX-License-Identifier:Apache-2.0 + +// Code generated by client-gen. DO NOT EDIT. + +package v1beta1 + +import ( + "context" + + v1beta1 "github.com/metallb/frr-k8s/api/v1beta1" + scheme "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/scheme" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// FRRConfigurationsGetter has a method to return a FRRConfigurationInterface. +// A group's client should implement this interface. +type FRRConfigurationsGetter interface { + FRRConfigurations(namespace string) FRRConfigurationInterface +} + +// FRRConfigurationInterface has methods to work with FRRConfiguration resources. +type FRRConfigurationInterface interface { + Create(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.CreateOptions) (*v1beta1.FRRConfiguration, error) + Update(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (*v1beta1.FRRConfiguration, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (*v1beta1.FRRConfiguration, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.FRRConfiguration, error) + List(ctx context.Context, opts v1.ListOptions) (*v1beta1.FRRConfigurationList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FRRConfiguration, err error) + FRRConfigurationExpansion +} + +// fRRConfigurations implements FRRConfigurationInterface +type fRRConfigurations struct { + *gentype.ClientWithList[*v1beta1.FRRConfiguration, *v1beta1.FRRConfigurationList] +} + +// newFRRConfigurations returns a FRRConfigurations +func newFRRConfigurations(c *ApiV1beta1Client, namespace string) *fRRConfigurations { + return &fRRConfigurations{ + gentype.NewClientWithList[*v1beta1.FRRConfiguration, *v1beta1.FRRConfigurationList]( + "frrconfigurations", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *v1beta1.FRRConfiguration { return &v1beta1.FRRConfiguration{} }, + func() *v1beta1.FRRConfigurationList { return &v1beta1.FRRConfigurationList{} }), + } +} diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/generated_expansion.go b/pkg/client/clientset/versioned/typed/api/v1beta1/generated_expansion.go similarity index 100% rename from pkg/client/clientset/versioned/typed/core/v1beta1/generated_expansion.go rename to pkg/client/clientset/versioned/typed/api/v1beta1/generated_expansion.go diff --git a/pkg/client/clientset/versioned/typed/core/v1beta1/frrconfiguration.go b/pkg/client/clientset/versioned/typed/core/v1beta1/frrconfiguration.go deleted file mode 100644 index aa57b44f..00000000 --- a/pkg/client/clientset/versioned/typed/core/v1beta1/frrconfiguration.go +++ /dev/null @@ -1,181 +0,0 @@ -// SPDX-License-Identifier:Apache-2.0 - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "time" - - v1beta1 "github.com/metallb/frr-k8s/core/v1beta1" - scheme "github.com/metallb/frr-k8s/pkg/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// FRRConfigurationsGetter has a method to return a FRRConfigurationInterface. -// A group's client should implement this interface. -type FRRConfigurationsGetter interface { - FRRConfigurations(namespace string) FRRConfigurationInterface -} - -// FRRConfigurationInterface has methods to work with FRRConfiguration resources. -type FRRConfigurationInterface interface { - Create(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.CreateOptions) (*v1beta1.FRRConfiguration, error) - Update(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (*v1beta1.FRRConfiguration, error) - UpdateStatus(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (*v1beta1.FRRConfiguration, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.FRRConfiguration, error) - List(ctx context.Context, opts v1.ListOptions) (*v1beta1.FRRConfigurationList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FRRConfiguration, err error) - FRRConfigurationExpansion -} - -// fRRConfigurations implements FRRConfigurationInterface -type fRRConfigurations struct { - client rest.Interface - ns string -} - -// newFRRConfigurations returns a FRRConfigurations -func newFRRConfigurations(c *CoreV1beta1Client, namespace string) *fRRConfigurations { - return &fRRConfigurations{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the fRRConfiguration, and returns the corresponding fRRConfiguration object, and an error if there is any. -func (c *fRRConfigurations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.FRRConfiguration, err error) { - result = &v1beta1.FRRConfiguration{} - err = c.client.Get(). - Namespace(c.ns). - Resource("frrconfigurations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of FRRConfigurations that match those selectors. -func (c *fRRConfigurations) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.FRRConfigurationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1beta1.FRRConfigurationList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("frrconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested fRRConfigurations. -func (c *fRRConfigurations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("frrconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a fRRConfiguration and creates it. Returns the server's representation of the fRRConfiguration, and an error, if there is any. -func (c *fRRConfigurations) Create(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.CreateOptions) (result *v1beta1.FRRConfiguration, err error) { - result = &v1beta1.FRRConfiguration{} - err = c.client.Post(). - Namespace(c.ns). - Resource("frrconfigurations"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(fRRConfiguration). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a fRRConfiguration and updates it. Returns the server's representation of the fRRConfiguration, and an error, if there is any. -func (c *fRRConfigurations) Update(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (result *v1beta1.FRRConfiguration, err error) { - result = &v1beta1.FRRConfiguration{} - err = c.client.Put(). - Namespace(c.ns). - Resource("frrconfigurations"). - Name(fRRConfiguration.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(fRRConfiguration). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *fRRConfigurations) UpdateStatus(ctx context.Context, fRRConfiguration *v1beta1.FRRConfiguration, opts v1.UpdateOptions) (result *v1beta1.FRRConfiguration, err error) { - result = &v1beta1.FRRConfiguration{} - err = c.client.Put(). - Namespace(c.ns). - Resource("frrconfigurations"). - Name(fRRConfiguration.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(fRRConfiguration). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the fRRConfiguration and deletes it. Returns an error if one occurs. -func (c *fRRConfigurations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("frrconfigurations"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *fRRConfigurations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("frrconfigurations"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched fRRConfiguration. -func (c *fRRConfigurations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.FRRConfiguration, err error) { - result = &v1beta1.FRRConfiguration{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("frrconfigurations"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/pkg/client/informers/externalversions/core/interface.go b/pkg/client/informers/externalversions/api/interface.go similarity index 96% rename from pkg/client/informers/externalversions/core/interface.go rename to pkg/client/informers/externalversions/api/interface.go index 4534f623..31f3cca1 100644 --- a/pkg/client/informers/externalversions/core/interface.go +++ b/pkg/client/informers/externalversions/api/interface.go @@ -2,10 +2,10 @@ // Code generated by informer-gen. DO NOT EDIT. -package core +package api import ( - v1beta1 "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/core/v1beta1" + v1beta1 "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/api/v1beta1" internalinterfaces "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/internalinterfaces" ) diff --git a/pkg/client/informers/externalversions/core/v1beta1/frrconfiguration.go b/pkg/client/informers/externalversions/api/v1beta1/frrconfiguration.go similarity index 92% rename from pkg/client/informers/externalversions/core/v1beta1/frrconfiguration.go rename to pkg/client/informers/externalversions/api/v1beta1/frrconfiguration.go index 9348c109..93414be8 100644 --- a/pkg/client/informers/externalversions/core/v1beta1/frrconfiguration.go +++ b/pkg/client/informers/externalversions/api/v1beta1/frrconfiguration.go @@ -11,7 +11,7 @@ import ( apiv1beta1 "github.com/metallb/frr-k8s/api/v1beta1" versioned "github.com/metallb/frr-k8s/pkg/client/clientset/versioned" internalinterfaces "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/internalinterfaces" - v1beta1 "github.com/metallb/frr-k8s/pkg/client/listers/core/v1beta1" + v1beta1 "github.com/metallb/frr-k8s/pkg/client/listers/api/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" watch "k8s.io/apimachinery/pkg/watch" @@ -48,13 +48,13 @@ func NewFilteredFRRConfigurationInformer(client versioned.Interface, namespace s if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1beta1().FRRConfigurations(namespace).List(context.TODO(), options) + return client.ApiV1beta1().FRRConfigurations(namespace).List(context.TODO(), options) }, WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { if tweakListOptions != nil { tweakListOptions(&options) } - return client.CoreV1beta1().FRRConfigurations(namespace).Watch(context.TODO(), options) + return client.ApiV1beta1().FRRConfigurations(namespace).Watch(context.TODO(), options) }, }, &apiv1beta1.FRRConfiguration{}, diff --git a/pkg/client/informers/externalversions/core/v1beta1/interface.go b/pkg/client/informers/externalversions/api/v1beta1/interface.go similarity index 100% rename from pkg/client/informers/externalversions/core/v1beta1/interface.go rename to pkg/client/informers/externalversions/api/v1beta1/interface.go diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go index b5fc1ba3..e0802fd3 100644 --- a/pkg/client/informers/externalversions/factory.go +++ b/pkg/client/informers/externalversions/factory.go @@ -10,7 +10,7 @@ import ( time "time" versioned "github.com/metallb/frr-k8s/pkg/client/clientset/versioned" - core "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/core" + api "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/api" internalinterfaces "github.com/metallb/frr-k8s/pkg/client/informers/externalversions/internalinterfaces" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -214,6 +214,7 @@ type SharedInformerFactory interface { // Start initializes all requested informers. They are handled in goroutines // which run until the stop channel gets closed. + // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync. Start(stopCh <-chan struct{}) // Shutdown marks a factory as shutting down. At that point no new @@ -239,9 +240,9 @@ type SharedInformerFactory interface { // client. InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer - Core() core.Interface + Api() api.Interface } -func (f *sharedInformerFactory) Core() core.Interface { - return core.New(f, f.namespace, f.tweakListOptions) +func (f *sharedInformerFactory) Api() api.Interface { + return api.New(f, f.namespace, f.tweakListOptions) } diff --git a/pkg/client/informers/externalversions/generic.go b/pkg/client/informers/externalversions/generic.go index 40a8eee2..9c85f3dd 100644 --- a/pkg/client/informers/externalversions/generic.go +++ b/pkg/client/informers/externalversions/generic.go @@ -38,9 +38,9 @@ func (f *genericInformer) Lister() cache.GenericLister { // TODO extend this to unknown resources with a client pool func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { switch resource { - // Group=core, Version=v1beta1 + // Group=api, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithResource("frrconfigurations"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Core().V1beta1().FRRConfigurations().Informer()}, nil + return &genericInformer{resource: resource.GroupResource(), informer: f.Api().V1beta1().FRRConfigurations().Informer()}, nil } diff --git a/pkg/client/listers/core/v1beta1/expansion_generated.go b/pkg/client/listers/api/v1beta1/expansion_generated.go similarity index 100% rename from pkg/client/listers/core/v1beta1/expansion_generated.go rename to pkg/client/listers/api/v1beta1/expansion_generated.go diff --git a/pkg/client/listers/core/v1beta1/frrconfiguration.go b/pkg/client/listers/api/v1beta1/frrconfiguration.go similarity index 60% rename from pkg/client/listers/core/v1beta1/frrconfiguration.go rename to pkg/client/listers/api/v1beta1/frrconfiguration.go index cbf83854..f0799a93 100644 --- a/pkg/client/listers/core/v1beta1/frrconfiguration.go +++ b/pkg/client/listers/api/v1beta1/frrconfiguration.go @@ -6,8 +6,8 @@ package v1beta1 import ( v1beta1 "github.com/metallb/frr-k8s/api/v1beta1" - "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/labels" + "k8s.io/client-go/listers" "k8s.io/client-go/tools/cache" ) @@ -24,25 +24,17 @@ type FRRConfigurationLister interface { // fRRConfigurationLister implements the FRRConfigurationLister interface. type fRRConfigurationLister struct { - indexer cache.Indexer + listers.ResourceIndexer[*v1beta1.FRRConfiguration] } // NewFRRConfigurationLister returns a new FRRConfigurationLister. func NewFRRConfigurationLister(indexer cache.Indexer) FRRConfigurationLister { - return &fRRConfigurationLister{indexer: indexer} -} - -// List lists all FRRConfigurations in the indexer. -func (s *fRRConfigurationLister) List(selector labels.Selector) (ret []*v1beta1.FRRConfiguration, err error) { - err = cache.ListAll(s.indexer, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.FRRConfiguration)) - }) - return ret, err + return &fRRConfigurationLister{listers.New[*v1beta1.FRRConfiguration](indexer, v1beta1.Resource("frrconfiguration"))} } // FRRConfigurations returns an object that can list and get FRRConfigurations. func (s *fRRConfigurationLister) FRRConfigurations(namespace string) FRRConfigurationNamespaceLister { - return fRRConfigurationNamespaceLister{indexer: s.indexer, namespace: namespace} + return fRRConfigurationNamespaceLister{listers.NewNamespaced[*v1beta1.FRRConfiguration](s.ResourceIndexer, namespace)} } // FRRConfigurationNamespaceLister helps list and get FRRConfigurations. @@ -60,26 +52,5 @@ type FRRConfigurationNamespaceLister interface { // fRRConfigurationNamespaceLister implements the FRRConfigurationNamespaceLister // interface. type fRRConfigurationNamespaceLister struct { - indexer cache.Indexer - namespace string -} - -// List lists all FRRConfigurations in the indexer for a given namespace. -func (s fRRConfigurationNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.FRRConfiguration, err error) { - err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) { - ret = append(ret, m.(*v1beta1.FRRConfiguration)) - }) - return ret, err -} - -// Get retrieves the FRRConfiguration from the indexer for a given namespace and name. -func (s fRRConfigurationNamespaceLister) Get(name string) (*v1beta1.FRRConfiguration, error) { - obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name) - if err != nil { - return nil, err - } - if !exists { - return nil, errors.NewNotFound(v1beta1.Resource("frrconfiguration"), name) - } - return obj.(*v1beta1.FRRConfiguration), nil + listers.ResourceIndexer[*v1beta1.FRRConfiguration] } From b1b2a5f663f1a3c7106d4e013f8323411bb19abb Mon Sep 17 00:00:00 2001 From: karampok Date: Tue, 23 Jul 2024 09:23:05 +0200 Subject: [PATCH 02/10] Revert "E2E: verify frrk8s daemonset is ready before tests" This reverts commit 6750d26a096fb2036663b5515a443cb991886e3e. Signed-off-by: karampok --- e2etests/e2etest_suite_test.go | 5 ----- e2etests/pkg/k8s/pods.go | 22 ---------------------- 2 files changed, 27 deletions(-) diff --git a/e2etests/e2etest_suite_test.go b/e2etests/e2etest_suite_test.go index 4c3e458b..0e651caa 100644 --- a/e2etests/e2etest_suite_test.go +++ b/e2etests/e2etest_suite_test.go @@ -9,7 +9,6 @@ import ( "github.com/metallb/frrk8stests/pkg/dump" "github.com/metallb/frrk8stests/pkg/infra" - "github.com/metallb/frrk8stests/pkg/k8s" "github.com/metallb/frrk8stests/pkg/k8sclient" "github.com/metallb/frrk8stests/tests" "github.com/onsi/ginkgo/v2" @@ -87,10 +86,6 @@ var _ = ginkgo.BeforeSuite(func() { } tests.PrometheusNamespace = prometheusNamespace - - h, err := k8s.FRRK8isDaemonSetReady(cs) - Expect(err).NotTo(HaveOccurred()) - Expect(h).Should(BeTrue(), "frr-k8s daemonset should be ready before test") }) var _ = ginkgo.AfterSuite(func() { diff --git a/e2etests/pkg/k8s/pods.go b/e2etests/pkg/k8s/pods.go index 64c35a35..9406120d 100644 --- a/e2etests/pkg/k8s/pods.go +++ b/e2etests/pkg/k8s/pods.go @@ -4,7 +4,6 @@ package k8s import ( "context" - "fmt" "slices" "time" @@ -89,24 +88,3 @@ func podIsRunningAndReady(pod *v1.Pod) bool { return true } - -func FRRK8isDaemonSetReady(clientset clientset.Interface) (bool, error) { - - // common labels in helm, kustomize - l := "app.kubernetes.io/component=frr-k8s,app.kubernetes.io/name=frr-k8s" - dss, err := clientset.AppsV1().DaemonSets(FRRK8sNamespace).List(context.Background(), metav1.ListOptions{ - LabelSelector: l, - }) - if len(dss.Items) != 1 { - return false, fmt.Errorf("found more or less than single daemonset") - } - - n := dss.Items[0].Name - ds, err := clientset.AppsV1().DaemonSets(FRRK8sNamespace).Get(context.Background(), - n, metav1.GetOptions{}) - if err != nil { - return false, err - } - - return ds.Status.DesiredNumberScheduled == ds.Status.NumberAvailable, nil -} From 3cafec5866f8a6114004bfebda64c6dad8a5e277 Mon Sep 17 00:00:00 2001 From: Federico Paolinelli Date: Fri, 30 Aug 2024 11:23:45 -0400 Subject: [PATCH 03/10] E2E: allow setting the namespace frrk8s run in The namespace is hardcoded, we want to make it possible to override it so we can run the tests in other deployments. Signed-off-by: Federico Paolinelli --- e2etests/e2etest_suite_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2etests/e2etest_suite_test.go b/e2etests/e2etest_suite_test.go index 0e651caa..5865f366 100644 --- a/e2etests/e2etest_suite_test.go +++ b/e2etests/e2etest_suite_test.go @@ -9,6 +9,7 @@ import ( "github.com/metallb/frrk8stests/pkg/dump" "github.com/metallb/frrk8stests/pkg/infra" + "github.com/metallb/frrk8stests/pkg/k8s" "github.com/metallb/frrk8stests/pkg/k8sclient" "github.com/metallb/frrk8stests/tests" "github.com/onsi/ginkgo/v2" @@ -38,6 +39,7 @@ func handleFlags() { flag.StringVar(&externalContainers, "external-containers", "", "a comma separated list of external containers names to use for the test. (valid parameters are: ibgp-single-hop / ibgp-multi-hop / ebgp-single-hop / ebgp-multi-hop)") flag.StringVar(&executor.Kubectl, "kubectl", "kubectl", "the path for the kubectl binary") flag.StringVar(&frrImage, "frr-image", "quay.io/frrouting/frr:9.1.0", "the image to use for the external frr containers") + flag.StringVar(&k8s.FRRK8sNamespace, "frr-k8s-namespace", "frr-k8s-system", "the namespace frr-k8s is running in") flag.Parse() From e72e9f3a6e0fa09b4188dabde8fb914187f38a73 Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Thu, 29 Aug 2024 11:37:52 +0300 Subject: [PATCH 04/10] API: Add DynamicASN field for Neighbors Add the field to support FRR's automatic ASN detection (https://docs.frrouting.org/en/latest/bgp.html#clicmd-neighbor-PEER-remote-as-internal). Dynamic ASN is not an official name of this feature, but should be understandable. Modifying the original ASN field to be IntOrString was considered but left out since IntOrString is actually Int32OrString, and we explicitly need 32 bits (uint32) for the ASN. Signed-off-by: Ori Braunshtein --- api/v1beta1/frrconfiguration_types.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/api/v1beta1/frrconfiguration_types.go b/api/v1beta1/frrconfiguration_types.go index cb99bfc8..421f38a1 100644 --- a/api/v1beta1/frrconfiguration_types.go +++ b/api/v1beta1/frrconfiguration_types.go @@ -95,9 +95,20 @@ type Import struct { // Neighbor represents a BGP Neighbor we want FRR to connect to. type Neighbor struct { // ASN is the AS number to use for the local end of the session. + // ASN and DynamicASN are mutually exclusive and one of them must be specified. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=4294967295 - ASN uint32 `json:"asn"` + // +optional + ASN uint32 `json:"asn,omitempty"` + + // DynamicASN detects the AS number to use for the local end of the session + // without explicitly setting it via the ASN field. Limited to: + // internal - if the neighbor's ASN is different than the router's the connection is denied. + // external - if the neighbor's ASN is the same as the router's the connection is denied. + // ASN and DynamicASN are mutually exclusive and one of them must be specified. + // +kubebuilder:validation:Enum=internal;external + // +optional + DynamicASN DynamicASNMode `json:"dynamicASN,omitempty"` // SourceAddress is the IPv4 or IPv6 source address to use for the BGP // session to this neighbour, may be specified as either an IP address @@ -371,3 +382,10 @@ const ( AllowAll AllowMode = "all" AllowRestricted AllowMode = "filtered" ) + +type DynamicASNMode string + +const ( + InternalASNMode DynamicASNMode = "internal" + ExternalASNMode DynamicASNMode = "external" +) From 53bc68e5245a0825df777a21b4527a1cd4af032e Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Thu, 29 Aug 2024 12:09:39 +0300 Subject: [PATCH 05/10] Controller: Support Dynamic ASN field Signed-off-by: Ori Braunshtein --- internal/controller/api_to_config.go | 43 +++- internal/controller/api_to_config_test.go | 191 +++++++++++++++--- .../frrconfiguration_controller_test.go | 4 +- internal/controller/merge_test.go | 74 +++---- internal/frr/config.go | 30 ++- internal/frr/frr_bfd_test.go | 6 +- internal/frr/frr_test.go | 134 +++++++++--- .../TestSingleSessionWithExternalASN.golden | 65 ++++++ .../TestSingleSessionWithInternalASN.golden | 65 ++++++ 9 files changed, 500 insertions(+), 112 deletions(-) create mode 100644 internal/frr/testdata/TestSingleSessionWithExternalASN.golden create mode 100644 internal/frr/testdata/TestSingleSessionWithInternalASN.golden diff --git a/internal/controller/api_to_config.go b/internal/controller/api_to_config.go index 03b45084..becf6a45 100644 --- a/internal/controller/api_to_config.go +++ b/internal/controller/api_to_config.go @@ -8,6 +8,7 @@ import ( "net" "reflect" "sort" + "strconv" "time" v1beta1 "github.com/metallb/frr-k8s/api/v1beta1" @@ -132,7 +133,7 @@ func routerToFRRConfig(r v1beta1.Router, alwaysBlock []frr.IncomingFilter, secre for _, n := range r.Neighbors { frrNeigh, err := neighborToFRR(n, routerPrefixes, alwaysBlock, r.VRF, secrets, bfdProfiles) if err != nil { - return nil, fmt.Errorf("failed to process neighbor %s for router %d-%s: %w", neighborName(n.ASN, n.Address), r.ASN, r.VRF, err) + return nil, fmt.Errorf("failed to process neighbor %s for router %d-%s: %w", neighborName(n), r.ASN, r.VRF, err) } res.Neighbors = append(res.Neighbors, frrNeigh) } @@ -149,11 +150,24 @@ func neighborToFRR(n v1beta1.Neighbor, prefixesInRouter []string, alwaysBlock [] return nil, fmt.Errorf("failed to find ipfamily for %s, %w", n.Address, err) } if _, ok := bfdProfiles[n.BFDProfile]; n.BFDProfile != "" && !ok { - return nil, fmt.Errorf("neighbor %s referencing non existing BFDProfile %s", neighborName(n.ASN, n.Address), n.BFDProfile) + return nil, fmt.Errorf("neighbor %s referencing non existing BFDProfile %s", neighborName(n), n.BFDProfile) } + + if n.ASN == 0 && n.DynamicASN == "" { + return nil, fmt.Errorf("neighbor %s has no ASN or DynamicASN specified", neighborName(n)) + } + + if n.ASN != 0 && n.DynamicASN != "" { + return nil, fmt.Errorf("neighbor %s has both ASN and DynamicASN specified", neighborName(n)) + } + + if n.DynamicASN != "" && n.DynamicASN != v1beta1.InternalASNMode && n.DynamicASN != v1beta1.ExternalASNMode { + return nil, fmt.Errorf("neighbor %s has invalid DynamicASN %s specified, must be one of %s,%s", neighborName(n), n.DynamicASN, v1beta1.InternalASNMode, v1beta1.ExternalASNMode) + } + res := &frr.NeighborConfig{ - Name: neighborName(n.ASN, n.Address), - ASN: n.ASN, + Name: neighborName(n), + ASN: asnFor(n), SrcAddr: n.SourceAddress, Addr: n.Address, Port: n.Port, @@ -167,7 +181,7 @@ func neighborToFRR(n v1beta1.Neighbor, prefixesInRouter []string, alwaysBlock [] } res.HoldTime, res.KeepaliveTime, err = parseTimers(n.HoldTime, n.KeepaliveTime) if err != nil { - return nil, fmt.Errorf("invalid timers for neighbor %s, err: %w", neighborName(n.ASN, n.Address), err) + return nil, fmt.Errorf("invalid timers for neighbor %s, err: %w", neighborName(n), err) } if n.ConnectTime != nil { @@ -191,7 +205,7 @@ func neighborToFRR(n v1beta1.Neighbor, prefixesInRouter []string, alwaysBlock [] func passwordForNeighbor(n v1beta1.Neighbor, passwordSecrets map[string]corev1.Secret) (string, error) { if n.Password != "" && n.PasswordSecret.Name != "" { - return "", fmt.Errorf("neighbor %s specifies both cleartext password and secret ref", neighborName(n.ASN, n.Address)) + return "", fmt.Errorf("neighbor %s specifies both cleartext password and secret ref", neighborName(n)) } if n.Password != "" { @@ -204,7 +218,7 @@ func passwordForNeighbor(n v1beta1.Neighbor, passwordSecrets map[string]corev1.S secret, ok := passwordSecrets[n.PasswordSecret.Name] if !ok { - return "", TransientError{Message: fmt.Sprintf("secret %s not found for neighbor %s", n.PasswordSecret.Name, neighborName(n.ASN, n.Address))} + return "", TransientError{Message: fmt.Sprintf("secret %s not found for neighbor %s", n.PasswordSecret.Name, neighborName(n))} } if secret.Type != corev1.SecretTypeBasicAuth { return "", fmt.Errorf("secret type mismatch on %q/%q, type %q is expected ", secret.Namespace, @@ -412,15 +426,24 @@ func validateOutgoingPrefixes(prefixesInRouter []string, routerConfig v1beta1.Ro } for _, p := range n.ToAdvertise.Allowed.Prefixes { if !prefixesSet.Has(p) { - return fmt.Errorf("trying to advertise non configured prefix %s to neighbor %s, vrf %s", p, neighborName(n.ASN, n.Address), routerConfig.VRF) + return fmt.Errorf("trying to advertise non configured prefix %s to neighbor %s, vrf %s", p, neighborName(n), routerConfig.VRF) } } } return nil } -func neighborName(ASN uint32, peerAddr string) string { - return fmt.Sprintf("%d@%s", ASN, peerAddr) +func asnFor(n v1beta1.Neighbor) string { + asn := strconv.FormatUint(uint64(n.ASN), 10) + if n.DynamicASN != "" { + asn = string(n.DynamicASN) + } + + return asn +} + +func neighborName(n v1beta1.Neighbor) string { + return fmt.Sprintf("%s@%s", asnFor(n), n.Address) } type communityPrefixes struct { diff --git a/internal/controller/api_to_config_test.go b/internal/controller/api_to_config_test.go index 1db78de1..d0afcf01 100644 --- a/internal/controller/api_to_config_test.go +++ b/internal/controller/api_to_config_test.go @@ -79,7 +79,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65002@192.0.2.2", - ASN: 65002, + ASN: "65002", Port: ptr.To[uint16](179), SrcAddr: "192.1.1.1", Addr: "192.0.2.2", @@ -141,7 +141,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65002@192.0.2.2", - ASN: 65002, + ASN: "65002", Port: ptr.To[uint16](179), Addr: "192.0.2.2", KeepaliveTime: ptr.To[uint64](20), @@ -205,13 +205,13 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65011@192.0.2.6", - ASN: 65011, + ASN: "65011", Addr: "192.0.2.6", }, { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", }, }, @@ -224,7 +224,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv6, Name: "65014@2001:db8::4", - ASN: 65014, + ASN: "65014", Addr: "2001:db8::4", VRFName: "vrf2", }, @@ -270,7 +270,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65021@192.0.2.11", - ASN: 65021, + ASN: "65021", Addr: "192.0.2.11", }, }, @@ -324,7 +324,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65031@192.0.2.16", - ASN: 65031, + ASN: "65031", Addr: "192.0.2.16", VRFName: "vrf1", }, @@ -375,7 +375,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -441,7 +441,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -459,7 +459,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.22", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -586,7 +586,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -615,7 +615,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.22", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -880,7 +880,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Incoming: frr.AllowedIn{ All: true, @@ -936,7 +936,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Incoming: frr.AllowedIn{ All: false, @@ -1000,7 +1000,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Incoming: frr.AllowedIn{ All: false, @@ -1141,7 +1141,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1252,7 +1252,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", Incoming: frr.AllowedIn{ PrefixesV4: []frr.IncomingFilter{ @@ -1446,7 +1446,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65011@192.0.2.6", - ASN: 65011, + ASN: "65011", Addr: "192.0.2.6", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1464,7 +1464,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1504,7 +1504,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65017@192.0.2.7", - ASN: 65017, + ASN: "65017", Addr: "192.0.2.7", VRFName: "vrf2", Outgoing: frr.AllowedOut{ @@ -1519,7 +1519,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv6, Name: "65014@2001:db8::4", - ASN: 65014, + ASN: "65014", Addr: "2001:db8::4", VRFName: "vrf2", Outgoing: frr.AllowedOut{ @@ -1624,14 +1624,14 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", Password: "password1", }, { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.8", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.8", Password: "cleartext-password", }, @@ -1645,14 +1645,14 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65017@192.0.2.7", - ASN: 65017, + ASN: "65017", Addr: "192.0.2.7", VRFName: "vrf2", }, { IPFamily: ipfamily.IPv6, Name: "65014@2001:db8::4", - ASN: 65014, + ASN: "65014", Addr: "2001:db8::4", VRFName: "vrf2", Password: "password2", @@ -1866,7 +1866,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", BFDProfile: "bfd1", }, @@ -2183,7 +2183,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65011@192.0.2.6", - ASN: 65011, + ASN: "65011", Addr: "192.0.2.6", AlwaysBlock: []frr.IncomingFilter{ { @@ -2206,7 +2206,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv6, Name: "65014@2001:db8::4", - ASN: 65014, + ASN: "65014", Addr: "2001:db8::4", VRFName: "vrf2", AlwaysBlock: []frr.IncomingFilter{ @@ -2328,7 +2328,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.21", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -2346,7 +2346,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.22", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -2466,7 +2466,7 @@ func TestConversion(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65041@192.0.2.22", - ASN: 65041, + ASN: "65041", Addr: "192.0.2.22", VRFName: "red", Outgoing: frr.AllowedOut{ @@ -2499,6 +2499,135 @@ func TestConversion(t *testing.T) { }, }, }, + { + name: "Neighbor without ASN or DynamicASN", + fromK8s: []v1beta1.FRRConfiguration{ + { + Spec: v1beta1.FRRConfigurationSpec{ + BGP: v1beta1.BGPConfig{ + Routers: []v1beta1.Router{ + { + ASN: 65010, + ID: "192.0.2.5", + VRF: "", + Neighbors: []v1beta1.Neighbor{ + { + Address: "192.0.2.22", + ToAdvertise: v1beta1.Advertise{ + Allowed: v1beta1.AllowedOutPrefixes{ + Mode: v1beta1.AllowAll, + }, + }, + }, + }, + Prefixes: []string{"192.0.2.0/24", "2001:db8::/64"}, + }, + }, + }, + }, + }, + }, + secrets: map[string]v1.Secret{}, + err: errors.New("65010-: neighbor 0@192.0.2.22 has no ASN or DynamicASN specified"), + }, + { + name: "Neighbor with both ASN and DynamicASN", + fromK8s: []v1beta1.FRRConfiguration{ + { + Spec: v1beta1.FRRConfigurationSpec{ + BGP: v1beta1.BGPConfig{ + Routers: []v1beta1.Router{ + { + ASN: 65010, + ID: "192.0.2.5", + VRF: "", + Neighbors: []v1beta1.Neighbor{ + { + Address: "192.0.2.22", + ASN: 65010, + DynamicASN: "internal", + ToAdvertise: v1beta1.Advertise{ + Allowed: v1beta1.AllowedOutPrefixes{ + Mode: v1beta1.AllowAll, + }, + }, + }, + }, + Prefixes: []string{"192.0.2.0/24", "2001:db8::/64"}, + }, + }, + }, + }, + }, + }, + secrets: map[string]v1.Secret{}, + err: errors.New("neighbor internal@192.0.2.22 has both ASN and DynamicASN specified"), + }, + { + name: "Neighbor with DynamicASN", + fromK8s: []v1beta1.FRRConfiguration{ + { + Spec: v1beta1.FRRConfigurationSpec{ + BGP: v1beta1.BGPConfig{ + Routers: []v1beta1.Router{ + { + ASN: 65010, + ID: "192.0.2.5", + VRF: "", + Neighbors: []v1beta1.Neighbor{ + { + Address: "192.0.2.22", + DynamicASN: "internal", + ToAdvertise: v1beta1.Advertise{ + Allowed: v1beta1.AllowedOutPrefixes{ + Mode: v1beta1.AllowAll, + }, + }, + }, + }, + Prefixes: []string{"192.0.2.0/24", "2001:db8::/64"}, + }, + }, + }, + }, + }, + }, + expected: &frr.Config{ + Routers: []*frr.RouterConfig{ + { + MyASN: 65010, + VRF: "", + RouterID: "192.0.2.5", + Neighbors: []*frr.NeighborConfig{ + { + IPFamily: ipfamily.IPv4, + Name: "internal@192.0.2.22", + ASN: "internal", + Addr: "192.0.2.22", + Outgoing: frr.AllowedOut{ + PrefixesV4: []frr.OutgoingFilter{ + { + IPFamily: ipfamily.IPv4, + Prefix: "192.0.2.0/24", + }, + }, + PrefixesV6: []frr.OutgoingFilter{ + { + IPFamily: ipfamily.IPv6, + Prefix: "2001:db8::/64", + }, + }, + }, + }, + }, + IPV4Prefixes: []string{"192.0.2.0/24"}, + IPV6Prefixes: []string{"2001:db8::/64"}, + }, + }, + }, + secrets: map[string]v1.Secret{}, + err: nil, + }, } for _, test := range tests { diff --git a/internal/controller/frrconfiguration_controller_test.go b/internal/controller/frrconfiguration_controller_test.go index 1c600ef0..f8875b42 100644 --- a/internal/controller/frrconfiguration_controller_test.go +++ b/internal/controller/frrconfiguration_controller_test.go @@ -548,7 +548,7 @@ var _ = Describe("Frrk8s controller", func() { { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", Password: "password2", Outgoing: frr.AllowedOut{ @@ -585,7 +585,7 @@ var _ = Describe("Frrk8s controller", func() { { IPFamily: ipfamily.IPv4, Name: "65012@192.0.2.7", - ASN: 65012, + ASN: "65012", Addr: "192.0.2.7", Password: "password3", Outgoing: frr.AllowedOut{ diff --git a/internal/controller/merge_test.go b/internal/controller/merge_test.go index f26534bd..a546eae5 100644 --- a/internal/controller/merge_test.go +++ b/internal/controller/merge_test.go @@ -31,7 +31,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -68,7 +68,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.21", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -105,7 +105,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.22", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -153,7 +153,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -201,7 +201,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.21", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -249,7 +249,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.23", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.23", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -306,7 +306,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -356,7 +356,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.21", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -406,7 +406,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.22", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -443,7 +443,7 @@ func TestMergeRouters(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.23", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.23", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -560,7 +560,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -599,7 +599,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -649,7 +649,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -705,7 +705,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -742,7 +742,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.21", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -779,7 +779,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.22", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -818,7 +818,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -866,7 +866,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.21", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -914,7 +914,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.23", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.23", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -964,7 +964,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1014,7 +1014,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.21", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.21", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1064,7 +1064,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.22", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.22", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1101,7 +1101,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.23", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.23", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1155,7 +1155,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Incoming: frr.AllowedIn{ All: true, @@ -1168,7 +1168,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Incoming: frr.AllowedIn{ All: false, @@ -1186,7 +1186,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{}, @@ -1207,7 +1207,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Incoming: frr.AllowedIn{ All: false, @@ -1225,7 +1225,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Incoming: frr.AllowedIn{ All: true, @@ -1238,7 +1238,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{}, @@ -1259,7 +1259,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1277,7 +1277,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{ @@ -1299,7 +1299,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", }, }, @@ -1307,7 +1307,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", HoldTime: ptr.To(uint64(180)), KeepaliveTime: ptr.To(uint64(60)), @@ -1318,7 +1318,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", Outgoing: frr.AllowedOut{ PrefixesV4: []frr.OutgoingFilter{}, @@ -1339,7 +1339,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", HoldTime: ptr.To(uint64(180)), KeepaliveTime: ptr.To(uint64(60)), @@ -1350,7 +1350,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", }, }, @@ -1358,7 +1358,7 @@ func TestMergeNeighbors(t *testing.T) { { IPFamily: ipfamily.IPv4, Name: "65040@192.0.1.20", - ASN: 65040, + ASN: "65040", Addr: "192.0.1.20", }, }, diff --git a/internal/frr/config.go b/internal/frr/config.go index cf9442e6..21f80206 100644 --- a/internal/frr/config.go +++ b/internal/frr/config.go @@ -65,7 +65,7 @@ type BFDProfile struct { type NeighborConfig struct { IPFamily ipfamily.Family Name string - ASN uint32 + ASN string SrcAddr string Addr string Port *uint16 @@ -187,11 +187,33 @@ func templateConfig(data interface{}) (string, error) { "deniedIncomingList": func(neighbor *NeighborConfig) string { return fmt.Sprintf("%s-denied-inpl-%s", neighbor.ID(), neighbor.IPFamily) }, - "mustDisableConnectedCheck": func(ipFamily ipfamily.Family, myASN, asn uint32, eBGPMultiHop bool) bool { - // return true only for IPv6 eBGP sessions - if ipFamily == "ipv6" && myASN != asn && !eBGPMultiHop { + "mustDisableConnectedCheck": func(ipFamily ipfamily.Family, myASN uint32, asn string, eBGPMultiHop bool) bool { + // return true only for non-multihop IPv6 eBGP sessions + + if ipFamily != ipfamily.IPv6 { + return false + } + + if eBGPMultiHop { + return false + } + + // internal means we expect the session to be iBGP + if asn == "internal" { + return false + } + + // external means we expect the session to be eBGP + if asn == "external" { return true } + + // the peer's asn is not dynamic (it is a number), + // we check if it is different than ours for eBGP + if strconv.FormatUint(uint64(myASN), 10) != asn { + return true + } + return false }, "dict": func(values ...interface{}) (map[string]interface{}, error) { diff --git a/internal/frr/frr_bfd_test.go b/internal/frr/frr_bfd_test.go index daa12e26..f5c64ec9 100644 --- a/internal/frr/frr_bfd_test.go +++ b/internal/frr/frr_bfd_test.go @@ -25,7 +25,7 @@ func TestSingleSessionBFD(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", BFDProfile: "test", }, @@ -68,7 +68,7 @@ func TestTwoRoutersTwoNeighborsBFD(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", }, }, @@ -79,7 +79,7 @@ func TestTwoRoutersTwoNeighborsBFD(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.3", BFDProfile: "testdefault", }, diff --git a/internal/frr/frr_test.go b/internal/frr/frr_test.go index e92b7980..2ce7af65 100644 --- a/internal/frr/frr_test.go +++ b/internal/frr/frr_test.go @@ -110,7 +110,7 @@ func TestSingleSession(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", Port: ptr.To[uint16](4567), Outgoing: AllowedOut{ @@ -152,7 +152,7 @@ func TestTwoRoutersTwoNeighbors(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", HoldTime: ptr.To[uint64](80), KeepaliveTime: ptr.To[uint64](40), @@ -189,7 +189,7 @@ func TestTwoRoutersTwoNeighbors(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.3", Outgoing: AllowedOut{ PrefixesV4: []OutgoingFilter{ @@ -226,14 +226,14 @@ func TestTwoSessionsAcceptAll(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", Incoming: AllowedIn{ All: true, }, }, { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.3", Incoming: AllowedIn{ All: true, @@ -264,7 +264,7 @@ func TestTwoSessionsAcceptSomeV4(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", Incoming: AllowedIn{ PrefixesV4: []IncomingFilter{ @@ -276,7 +276,7 @@ func TestTwoSessionsAcceptSomeV4(t *testing.T) { }, }, { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.3", Incoming: AllowedIn{ PrefixesV4: []IncomingFilter{ @@ -316,7 +316,7 @@ func TestTwoSessionsAcceptV4AndV6(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", Incoming: AllowedIn{ PrefixesV4: []IncomingFilter{ @@ -348,7 +348,7 @@ func TestTwoSessionsAcceptV4AndV6(t *testing.T) { }, }, { IPFamily: ipfamily.IPv4, - ASN: 65002, + ASN: "65002", Addr: "192.168.1.3", Incoming: AllowedIn{ PrefixesV4: []IncomingFilter{ @@ -376,7 +376,7 @@ func TestTwoSessionsAcceptV4AndV6(t *testing.T) { }, }, { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.4", Incoming: AllowedIn{ PrefixesV4: []IncomingFilter{ @@ -434,7 +434,7 @@ func TestSingleSessionWithEBGPMultihop(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", EBGPMultiHop: true, Outgoing: AllowedOut{ @@ -479,7 +479,7 @@ func TestSingleSessionWithIPv6SingleHop(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv6, - ASN: 65001, + ASN: "65001", Addr: "2001:db8::1", EBGPMultiHop: false, // Single hop Outgoing: AllowedOut{ @@ -520,7 +520,7 @@ func TestMultipleNeighborsOneV4AndOneV6(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", SrcAddr: "192.168.1.50", Addr: "192.168.1.2", Outgoing: AllowedOut{ @@ -534,7 +534,7 @@ func TestMultipleNeighborsOneV4AndOneV6(t *testing.T) { }, { IPFamily: ipfamily.IPv6, - ASN: 65002, + ASN: "65002", Addr: "2001:db8::1", EBGPMultiHop: true, Outgoing: AllowedOut{ @@ -576,7 +576,7 @@ func TestMultipleNeighborsOneV4AndOneV6DisableMP(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", DisableMP: true, Outgoing: AllowedOut{ @@ -590,7 +590,7 @@ func TestMultipleNeighborsOneV4AndOneV6DisableMP(t *testing.T) { }, { IPFamily: ipfamily.IPv6, - ASN: 65002, + ASN: "65002", Addr: "2001:db8::1", EBGPMultiHop: true, DisableMP: true, @@ -633,7 +633,7 @@ func TestMultipleRoutersMultipleNeighs(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", EBGPMultiHop: true, Outgoing: AllowedOut{ @@ -647,7 +647,7 @@ func TestMultipleRoutersMultipleNeighs(t *testing.T) { }, { IPFamily: ipfamily.IPv6, - ASN: 65002, + ASN: "65002", Addr: "2001:db8::1", EBGPMultiHop: true, Outgoing: AllowedOut{ @@ -669,7 +669,7 @@ func TestMultipleRoutersMultipleNeighs(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.170.1.2", Outgoing: AllowedOut{ PrefixesV4: []OutgoingFilter{ @@ -682,7 +682,7 @@ func TestMultipleRoutersMultipleNeighs(t *testing.T) { }, { IPFamily: ipfamily.IPv6, - ASN: 65002, + ASN: "65002", Addr: "2001:db9::1", EBGPMultiHop: true, Outgoing: AllowedOut{ @@ -724,7 +724,7 @@ func TestSingleSessionWithEBGPMultihopAndExtras(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", EBGPMultiHop: true, Outgoing: AllowedOut{ @@ -770,7 +770,7 @@ func TestSingleSessionWithAlwaysBlock(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", Incoming: AllowedIn{ All: true, @@ -790,7 +790,7 @@ func TestSingleSessionWithAlwaysBlock(t *testing.T) { }, { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.6", Incoming: AllowedIn{ PrefixesV4: []IncomingFilter{ @@ -841,7 +841,7 @@ func TestSingleSessionWithGracefulRestart(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", GracefulRestart: true, }, @@ -873,7 +873,7 @@ func TestMultipleRoutersImportVRFs(t *testing.T) { Neighbors: []*NeighborConfig{ { IPFamily: ipfamily.IPv4, - ASN: 65001, + ASN: "65001", Addr: "192.168.1.2", EBGPMultiHop: true, }, @@ -904,3 +904,87 @@ func TestMultipleRoutersImportVRFs(t *testing.T) { testCheckConfigFile(t) } + +func TestSingleSessionWithInternalASN(t *testing.T) { + testSetup(t) + ctx, cancel := context.WithCancel(context.Background()) + frr := NewFRR(ctx, emptyCB, log.NewNopLogger(), logging.LevelInfo) + defer cancel() + + config := Config{ + Routers: []*RouterConfig{ + { + MyASN: 65000, + Neighbors: []*NeighborConfig{ + { + IPFamily: ipfamily.IPv4, + ASN: "internal", + Addr: "192.168.1.2", + Port: ptr.To[uint16](4567), + Outgoing: AllowedOut{ + PrefixesV4: []OutgoingFilter{ + { + IPFamily: ipfamily.IPv4, + Prefix: "192.169.1.0/24", + }, + { + IPFamily: ipfamily.IPv4, + Prefix: "192.170.1.0/22", + }, + }, + }, + }, + }, + IPV4Prefixes: []string{"192.169.1.0/24", "192.170.1.0/22"}, + }, + }, + } + err := frr.ApplyConfig(&config) + if err != nil { + t.Fatalf("Failed to apply config: %s", err) + } + + testCheckConfigFile(t) +} + +func TestSingleSessionWithExternalASN(t *testing.T) { + testSetup(t) + ctx, cancel := context.WithCancel(context.Background()) + frr := NewFRR(ctx, emptyCB, log.NewNopLogger(), logging.LevelInfo) + defer cancel() + + config := Config{ + Routers: []*RouterConfig{ + { + MyASN: 65000, + Neighbors: []*NeighborConfig{ + { + IPFamily: ipfamily.IPv4, + ASN: "external", + Addr: "192.168.1.2", + Port: ptr.To[uint16](4567), + Outgoing: AllowedOut{ + PrefixesV4: []OutgoingFilter{ + { + IPFamily: ipfamily.IPv4, + Prefix: "192.169.1.0/24", + }, + { + IPFamily: ipfamily.IPv4, + Prefix: "192.170.1.0/22", + }, + }, + }, + }, + }, + IPV4Prefixes: []string{"192.169.1.0/24", "192.170.1.0/22"}, + }, + }, + } + err := frr.ApplyConfig(&config) + if err != nil { + t.Fatalf("Failed to apply config: %s", err) + } + + testCheckConfigFile(t) +} diff --git a/internal/frr/testdata/TestSingleSessionWithExternalASN.golden b/internal/frr/testdata/TestSingleSessionWithExternalASN.golden new file mode 100644 index 00000000..94459372 --- /dev/null +++ b/internal/frr/testdata/TestSingleSessionWithExternalASN.golden @@ -0,0 +1,65 @@ +log file /etc/frr/frr.log informational +log timestamp precision 3 +hostname dummyhostname +ip nht resolve-via-default +ipv6 nht resolve-via-default + + + + +ip prefix-list 192.168.1.2-pl-ipv4 seq 1 permit 192.169.1.0/24 + + + +ip prefix-list 192.168.1.2-pl-ipv4 seq 2 permit 192.170.1.0/22 + +route-map 192.168.1.2-out permit 1 + match ip address prefix-list 192.168.1.2-pl-ipv4 +route-map 192.168.1.2-out permit 2 + match ipv6 address prefix-list 192.168.1.2-pl-ipv4 + + + +ipv6 prefix-list 192.168.1.2-pl-ipv4 seq 3 deny any + + + + + + +ip prefix-list 192.168.1.2-inpl-ipv4 seq 1 deny any + +ipv6 prefix-list 192.168.1.2-inpl-ipv4 seq 2 deny any +route-map 192.168.1.2-in permit 3 + match ip address prefix-list 192.168.1.2-inpl-ipv4 +route-map 192.168.1.2-in permit 4 + match ipv6 address prefix-list 192.168.1.2-inpl-ipv4 + +router bgp 65000 + no bgp ebgp-requires-policy + no bgp network import-check + no bgp default ipv4-unicast + bgp graceful-restart preserve-fw-state + + neighbor 192.168.1.2 remote-as external + neighbor 192.168.1.2 port 4567 + + + + + address-family ipv4 unicast + neighbor 192.168.1.2 activate + neighbor 192.168.1.2 route-map 192.168.1.2-in in + neighbor 192.168.1.2 route-map 192.168.1.2-out out + exit-address-family + address-family ipv6 unicast + neighbor 192.168.1.2 activate + neighbor 192.168.1.2 route-map 192.168.1.2-in in + neighbor 192.168.1.2 route-map 192.168.1.2-out out + exit-address-family + address-family ipv4 unicast + network 192.169.1.0/24 + network 192.170.1.0/22 + exit-address-family + + diff --git a/internal/frr/testdata/TestSingleSessionWithInternalASN.golden b/internal/frr/testdata/TestSingleSessionWithInternalASN.golden new file mode 100644 index 00000000..8bc6ac21 --- /dev/null +++ b/internal/frr/testdata/TestSingleSessionWithInternalASN.golden @@ -0,0 +1,65 @@ +log file /etc/frr/frr.log informational +log timestamp precision 3 +hostname dummyhostname +ip nht resolve-via-default +ipv6 nht resolve-via-default + + + + +ip prefix-list 192.168.1.2-pl-ipv4 seq 1 permit 192.169.1.0/24 + + + +ip prefix-list 192.168.1.2-pl-ipv4 seq 2 permit 192.170.1.0/22 + +route-map 192.168.1.2-out permit 1 + match ip address prefix-list 192.168.1.2-pl-ipv4 +route-map 192.168.1.2-out permit 2 + match ipv6 address prefix-list 192.168.1.2-pl-ipv4 + + + +ipv6 prefix-list 192.168.1.2-pl-ipv4 seq 3 deny any + + + + + + +ip prefix-list 192.168.1.2-inpl-ipv4 seq 1 deny any + +ipv6 prefix-list 192.168.1.2-inpl-ipv4 seq 2 deny any +route-map 192.168.1.2-in permit 3 + match ip address prefix-list 192.168.1.2-inpl-ipv4 +route-map 192.168.1.2-in permit 4 + match ipv6 address prefix-list 192.168.1.2-inpl-ipv4 + +router bgp 65000 + no bgp ebgp-requires-policy + no bgp network import-check + no bgp default ipv4-unicast + bgp graceful-restart preserve-fw-state + + neighbor 192.168.1.2 remote-as internal + neighbor 192.168.1.2 port 4567 + + + + + address-family ipv4 unicast + neighbor 192.168.1.2 activate + neighbor 192.168.1.2 route-map 192.168.1.2-in in + neighbor 192.168.1.2 route-map 192.168.1.2-out out + exit-address-family + address-family ipv6 unicast + neighbor 192.168.1.2 activate + neighbor 192.168.1.2 route-map 192.168.1.2-in in + neighbor 192.168.1.2 route-map 192.168.1.2-out out + exit-address-family + address-family ipv4 unicast + network 192.169.1.0/24 + network 192.170.1.0/22 + exit-address-family + + From fd27de193eb3d7e05aac395dbb1716536ea44a22 Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Thu, 29 Aug 2024 12:10:54 +0300 Subject: [PATCH 06/10] Manifests: bump with Dynamic ASN Signed-off-by: Ori Braunshtein --- API-DOCS.md | 16 +++++++++++++++- .../frrk8s.metallb.io_frrconfigurations.yaml | 17 ++++++++++++++--- config/all-in-one/frr-k8s-prometheus.yaml | 17 ++++++++++++++--- config/all-in-one/frr-k8s.yaml | 17 ++++++++++++++--- .../frrk8s.metallb.io_frrconfigurations.yaml | 17 ++++++++++++++--- 5 files changed, 71 insertions(+), 13 deletions(-) diff --git a/API-DOCS.md b/API-DOCS.md index 96cdab0c..2a4cbbdc 100644 --- a/API-DOCS.md +++ b/API-DOCS.md @@ -122,6 +122,19 @@ _Appears in:_ | `community` _string_ | Community is the community associated to the prefixes. | | | +#### DynamicASNMode + +_Underlying type:_ _string_ + + + + + +_Appears in:_ +- [Neighbor](#neighbor) + + + #### FRRConfiguration @@ -268,7 +281,8 @@ _Appears in:_ | Field | Description | Default | Validation | | --- | --- | --- | --- | -| `asn` _integer_ | ASN is the AS number to use for the local end of the session. | | Maximum: 4.294967295e+09
Minimum: 0
| +| `asn` _integer_ | ASN is the AS number to use for the local end of the session.
ASN and DynamicASN are mutually exclusive and one of them must be specified. | | Maximum: 4.294967295e+09
Minimum: 0
| +| `dynamicASN` _[DynamicASNMode](#dynamicasnmode)_ | DynamicASN detects the AS number to use for the local end of the session
without explicitly setting it via the ASN field. Limited to:
internal - if the neighbor's ASN is different than the router's the connection is denied.
external - if the neighbor's ASN is the same as the router's the connection is denied.
ASN and DynamicASN are mutually exclusive and one of them must be specified. | | Enum: [internal external]
| | `sourceaddress` _string_ | SourceAddress is the IPv4 or IPv6 source address to use for the BGP
session to this neighbour, may be specified as either an IP address
directly or as an interface name | | | | `address` _string_ | Address is the IP address to establish the session with. | | | | `port` _integer_ | Port is the port to dial when establishing the session.
Defaults to 179. | | Maximum: 16384
Minimum: 0
| diff --git a/charts/frr-k8s/charts/crds/templates/frrk8s.metallb.io_frrconfigurations.yaml b/charts/frr-k8s/charts/crds/templates/frrk8s.metallb.io_frrconfigurations.yaml index b6867651..251143d3 100644 --- a/charts/frr-k8s/charts/crds/templates/frrk8s.metallb.io_frrconfigurations.yaml +++ b/charts/frr-k8s/charts/crds/templates/frrk8s.metallb.io_frrconfigurations.yaml @@ -156,8 +156,9 @@ spec: the session with. type: string asn: - description: ASN is the AS number to use for the local - end of the session. + description: |- + ASN is the AS number to use for the local end of the session. + ASN and DynamicASN are mutually exclusive and one of them must be specified. format: int32 maximum: 4294967295 minimum: 0 @@ -187,6 +188,17 @@ spec: will separate IPv4 and IPv6 route exchanges into distinct BGP sessions. type: boolean + dynamicASN: + description: |- + DynamicASN detects the AS number to use for the local end of the session + without explicitly setting it via the ASN field. Limited to: + internal - if the neighbor's ASN is different than the router's the connection is denied. + external - if the neighbor's ASN is the same as the router's the connection is denied. + ASN and DynamicASN are mutually exclusive and one of them must be specified. + enum: + - internal + - external + type: string ebgpMultiHop: description: EBGPMultiHop indicates if the BGPPeer is multi-hops away. @@ -366,7 +378,6 @@ spec: type: object required: - address - - asn type: object type: array prefixes: diff --git a/config/all-in-one/frr-k8s-prometheus.yaml b/config/all-in-one/frr-k8s-prometheus.yaml index e413c48c..d33e1fdc 100644 --- a/config/all-in-one/frr-k8s-prometheus.yaml +++ b/config/all-in-one/frr-k8s-prometheus.yaml @@ -171,8 +171,9 @@ spec: the session with. type: string asn: - description: ASN is the AS number to use for the local - end of the session. + description: |- + ASN is the AS number to use for the local end of the session. + ASN and DynamicASN are mutually exclusive and one of them must be specified. format: int32 maximum: 4294967295 minimum: 0 @@ -202,6 +203,17 @@ spec: will separate IPv4 and IPv6 route exchanges into distinct BGP sessions. type: boolean + dynamicASN: + description: |- + DynamicASN detects the AS number to use for the local end of the session + without explicitly setting it via the ASN field. Limited to: + internal - if the neighbor's ASN is different than the router's the connection is denied. + external - if the neighbor's ASN is the same as the router's the connection is denied. + ASN and DynamicASN are mutually exclusive and one of them must be specified. + enum: + - internal + - external + type: string ebgpMultiHop: description: EBGPMultiHop indicates if the BGPPeer is multi-hops away. @@ -381,7 +393,6 @@ spec: type: object required: - address - - asn type: object type: array prefixes: diff --git a/config/all-in-one/frr-k8s.yaml b/config/all-in-one/frr-k8s.yaml index 2885da9f..db4c90f5 100644 --- a/config/all-in-one/frr-k8s.yaml +++ b/config/all-in-one/frr-k8s.yaml @@ -171,8 +171,9 @@ spec: the session with. type: string asn: - description: ASN is the AS number to use for the local - end of the session. + description: |- + ASN is the AS number to use for the local end of the session. + ASN and DynamicASN are mutually exclusive and one of them must be specified. format: int32 maximum: 4294967295 minimum: 0 @@ -202,6 +203,17 @@ spec: will separate IPv4 and IPv6 route exchanges into distinct BGP sessions. type: boolean + dynamicASN: + description: |- + DynamicASN detects the AS number to use for the local end of the session + without explicitly setting it via the ASN field. Limited to: + internal - if the neighbor's ASN is different than the router's the connection is denied. + external - if the neighbor's ASN is the same as the router's the connection is denied. + ASN and DynamicASN are mutually exclusive and one of them must be specified. + enum: + - internal + - external + type: string ebgpMultiHop: description: EBGPMultiHop indicates if the BGPPeer is multi-hops away. @@ -381,7 +393,6 @@ spec: type: object required: - address - - asn type: object type: array prefixes: diff --git a/config/crd/bases/frrk8s.metallb.io_frrconfigurations.yaml b/config/crd/bases/frrk8s.metallb.io_frrconfigurations.yaml index b6867651..251143d3 100644 --- a/config/crd/bases/frrk8s.metallb.io_frrconfigurations.yaml +++ b/config/crd/bases/frrk8s.metallb.io_frrconfigurations.yaml @@ -156,8 +156,9 @@ spec: the session with. type: string asn: - description: ASN is the AS number to use for the local - end of the session. + description: |- + ASN is the AS number to use for the local end of the session. + ASN and DynamicASN are mutually exclusive and one of them must be specified. format: int32 maximum: 4294967295 minimum: 0 @@ -187,6 +188,17 @@ spec: will separate IPv4 and IPv6 route exchanges into distinct BGP sessions. type: boolean + dynamicASN: + description: |- + DynamicASN detects the AS number to use for the local end of the session + without explicitly setting it via the ASN field. Limited to: + internal - if the neighbor's ASN is different than the router's the connection is denied. + external - if the neighbor's ASN is the same as the router's the connection is denied. + ASN and DynamicASN are mutually exclusive and one of them must be specified. + enum: + - internal + - external + type: string ebgpMultiHop: description: EBGPMultiHop indicates if the BGPPeer is multi-hops away. @@ -366,7 +378,6 @@ spec: type: object required: - address - - asn type: object type: array prefixes: From 90513a063964b36a933afc7b9035e6a73acc05fa Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Thu, 29 Aug 2024 12:11:09 +0300 Subject: [PATCH 07/10] E2E: Establish session using DynamicASN Signed-off-by: Ori Braunshtein --- e2etests/tests/session.go | 65 ++++++++++++++++++++++++++++++++++++++ e2etests/tests/webhooks.go | 32 +++++++++++++++++++ 2 files changed, 97 insertions(+) diff --git a/e2etests/tests/session.go b/e2etests/tests/session.go index 7f56fa4c..46251525 100644 --- a/e2etests/tests/session.go +++ b/e2etests/tests/session.go @@ -263,5 +263,70 @@ var _ = ginkgo.Describe("Session", func() { ginkgo.Entry("IPV4", ipfamily.IPv4), ginkgo.Entry("IPV6", ipfamily.IPv6), ) + + ginkgo.DescribeTable("Establishes sessions with dynamicASN", func(family ipfamily.Family) { + frrs := config.ContainersForVRF(infra.FRRContainers, "") + neighbors := []frrk8sv1beta1.Neighbor{} + + for _, f := range frrs { + addresses := f.AddressesForFamily(family) + ebgpMultihop := false + if f.NeighborConfig.MultiHop && f.NeighborConfig.ASN != f.RouterConfig.ASN { + ebgpMultihop = true + } + + dynamicASN := frrk8sv1beta1.InternalASNMode + if f.RouterConfig.ASN != infra.FRRK8sASN { + dynamicASN = frrk8sv1beta1.ExternalASNMode + } + + for _, address := range addresses { + neighbors = append(neighbors, frrk8sv1beta1.Neighbor{ + DynamicASN: dynamicASN, + Address: address, + Password: f.RouterConfig.Password, + Port: &f.RouterConfig.BGPPort, + EBGPMultiHop: ebgpMultihop, + }) + } + } + + config := frrk8sv1beta1.FRRConfiguration{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: k8s.FRRK8sNamespace, + }, + Spec: frrk8sv1beta1.FRRConfigurationSpec{ + BGP: frrk8sv1beta1.BGPConfig{ + Routers: []frrk8sv1beta1.Router{ + { + ASN: infra.FRRK8sASN, + VRF: "", + Neighbors: neighbors, + }, + }, + }, + }, + } + + ginkgo.By("pairing with nodes") + for _, c := range frrs { + err := frrcontainer.PairWithNodes(cs, c, family) + Expect(err).NotTo(HaveOccurred()) + } + + err := updater.Update([]corev1.Secret{}, config) + Expect(err).NotTo(HaveOccurred()) + + nodes, err := k8s.Nodes(cs) + Expect(err).NotTo(HaveOccurred()) + + for _, c := range frrs { + ValidateFRRPeeredWithNodes(nodes, c, family) + } + }, + ginkgo.Entry("IPV4", ipfamily.IPv4), + ginkgo.Entry("IPV6", ipfamily.IPv6), + ) }) }) diff --git a/e2etests/tests/webhooks.go b/e2etests/tests/webhooks.go index ad2873db..46ac01e4 100644 --- a/e2etests/tests/webhooks.go +++ b/e2etests/tests/webhooks.go @@ -88,6 +88,7 @@ var _ = ginkgo.Describe("Webhooks", func() { ASN: 100, Neighbors: []frrk8sv1beta1.Neighbor{ { + ASN: 100, Address: "192.a.b.10", }, }, @@ -102,6 +103,7 @@ var _ = ginkgo.Describe("Webhooks", func() { { Neighbors: []frrk8sv1beta1.Neighbor{ { + ASN: 100, Address: "1.2.3.4", ToAdvertise: frrk8sv1beta1.Advertise{ PrefixesWithLocalPref: []frrk8sv1beta1.LocalPrefPrefixes{ @@ -118,6 +120,36 @@ var _ = ginkgo.Describe("Webhooks", func() { }, "localPref associated to non existing prefix", ), + ginkgo.Entry("both asn and dynamicASN not specified", + func(cfg *frrk8sv1beta1.FRRConfiguration) { + cfg.Spec.BGP.Routers = []frrk8sv1beta1.Router{ + { + Neighbors: []frrk8sv1beta1.Neighbor{ + { + Address: "1.2.3.4", + }, + }, + }, + } + }, + "has no ASN or DynamicASN specified", + ), + ginkgo.Entry("both asn and dynamicASN specified", + func(cfg *frrk8sv1beta1.FRRConfiguration) { + cfg.Spec.BGP.Routers = []frrk8sv1beta1.Router{ + { + Neighbors: []frrk8sv1beta1.Neighbor{ + { + ASN: 100, + DynamicASN: frrk8sv1beta1.ExternalASNMode, + Address: "1.2.3.4", + }, + }, + }, + } + }, + "has both ASN and DynamicASN specified", + ), ) ginkgo.It("Should reject create/update when there is a conflict with an existing config", func() { From 3bfd588f7ee59ddd799b694ad3e9af21bb204af8 Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Tue, 17 Sep 2024 10:15:25 +0300 Subject: [PATCH 08/10] Pin the securego github action Signed-off-by: Ori Braunshtein --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 32a78107..b76ea8cd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,7 +27,7 @@ jobs: - name: Checkout Source uses: actions/checkout@v4 - name: Run Gosec Security Scanner - uses: securego/gosec@master + uses: securego/gosec@v2.21.2 with: args: -exclude-dir e2etest -severity medium ./... From 7b2f8997e2071bb14855e64597eb285909f34176 Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Tue, 17 Sep 2024 10:16:00 +0300 Subject: [PATCH 09/10] Check for overflows when converting ints to uints As was done in MetalLB, we fix the G115 gosec errors by converting ints to uints more carefully. Signed-off-by: Ori Braunshtein --- internal/controller/api_to_config.go | 21 +++++++++++++-------- internal/controller/api_to_config_test.go | 12 ++++++------ internal/controller/merge_test.go | 12 ++++++------ internal/frr/config.go | 6 +++--- internal/frr/frr_test.go | 6 +++--- internal/safeconvert/convertuint32.go | 21 +++++++++++++++++++++ internal/safeconvert/convertuint32_arm.go | 18 ++++++++++++++++++ 7 files changed, 70 insertions(+), 26 deletions(-) create mode 100644 internal/safeconvert/convertuint32.go create mode 100644 internal/safeconvert/convertuint32_arm.go diff --git a/internal/controller/api_to_config.go b/internal/controller/api_to_config.go index becf6a45..1d7f992b 100644 --- a/internal/controller/api_to_config.go +++ b/internal/controller/api_to_config.go @@ -15,6 +15,7 @@ import ( "github.com/metallb/frr-k8s/internal/community" "github.com/metallb/frr-k8s/internal/frr" "github.com/metallb/frr-k8s/internal/ipfamily" + "github.com/metallb/frr-k8s/internal/safeconvert" corev1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" @@ -185,7 +186,7 @@ func neighborToFRR(n v1beta1.Neighbor, prefixesInRouter []string, alwaysBlock [] } if n.ConnectTime != nil { - res.ConnectTime = ptr.To(uint64(n.ConnectTime.Duration / time.Second)) + res.ConnectTime = ptr.To(int64(n.ConnectTime.Duration / time.Second)) } res.Password, err = passwordForNeighbor(n, passwordSecrets) @@ -373,7 +374,11 @@ func filterForSelector(selector v1beta1.PrefixSelector) (frr.IncomingFilter, err return frr.IncomingFilter{}, fmt.Errorf("failed to parse prefix %s: %w", selector.Prefix, err) } maskLen, _ := cidr.Mask.Size() - err = validateSelectorLengths(maskLen, selector.LE, selector.GE) + maskLenUint, err := safeconvert.IntToUInt32(maskLen) + if err != nil { + return frr.IncomingFilter{}, fmt.Errorf("failed to convert maskLen from CIDR %s to uint32: %w", cidr, err) + } + err = validateSelectorLengths(maskLenUint, selector.LE, selector.GE) if err != nil { return frr.IncomingFilter{}, err } @@ -390,17 +395,17 @@ func filterForSelector(selector v1beta1.PrefixSelector) (frr.IncomingFilter, err // validateSelectorLengths checks the lengths respect the following // condition: mask length <= ge <= le -func validateSelectorLengths(mask int, le, ge uint32) error { +func validateSelectorLengths(mask, le, ge uint32) error { if ge == 0 && le == 0 { return nil } if le > 0 && ge > le { return fmt.Errorf("invalid selector lengths: ge %d is bigger than le %d", ge, le) } - if le > 0 && uint32(mask) > le { + if le > 0 && mask > le { return fmt.Errorf("invalid selector lengths: cidr mask %d is bigger than le %d", mask, le) } - if ge > 0 && uint32(mask) > ge { + if ge > 0 && mask > ge { return fmt.Errorf("invalid selector lengths: cidr mask %d is bigger than ge %d", mask, ge) } return nil @@ -604,7 +609,7 @@ func alwaysBlockToFRR(cidrs []net.IPNet) []frr.IncomingFilter { return res } -func parseTimers(ht, ka *v1.Duration) (*uint64, *uint64, error) { +func parseTimers(ht, ka *v1.Duration) (*int64, *int64, error) { if ht == nil && ka != nil || ht != nil && ka == nil { return nil, nil, fmt.Errorf("one of KeepaliveTime/HoldTime specified, both must be set or none") } @@ -625,8 +630,8 @@ func parseTimers(ht, ka *v1.Duration) (*uint64, *uint64, error) { return nil, nil, fmt.Errorf("invalid keepaliveTime %q, must be lower than holdTime %q", ka, ht) } - htSeconds := uint64(holdTime / time.Second) - kaSeconds := uint64(keepaliveTime / time.Second) + htSeconds := int64(holdTime / time.Second) + kaSeconds := int64(keepaliveTime / time.Second) return &htSeconds, &kaSeconds, nil } diff --git a/internal/controller/api_to_config_test.go b/internal/controller/api_to_config_test.go index d0afcf01..a81dfd36 100644 --- a/internal/controller/api_to_config_test.go +++ b/internal/controller/api_to_config_test.go @@ -83,9 +83,9 @@ func TestConversion(t *testing.T) { Port: ptr.To[uint16](179), SrcAddr: "192.1.1.1", Addr: "192.0.2.2", - KeepaliveTime: ptr.To[uint64](20), - HoldTime: ptr.To[uint64](40), - ConnectTime: ptr.To(uint64(2)), + KeepaliveTime: ptr.To[int64](20), + HoldTime: ptr.To[int64](40), + ConnectTime: ptr.To(int64(2)), DisableMP: true, GracefulRestart: true, }, @@ -144,9 +144,9 @@ func TestConversion(t *testing.T) { ASN: "65002", Port: ptr.To[uint16](179), Addr: "192.0.2.2", - KeepaliveTime: ptr.To[uint64](20), - HoldTime: ptr.To[uint64](40), - ConnectTime: ptr.To(uint64(2)), + KeepaliveTime: ptr.To[int64](20), + HoldTime: ptr.To[int64](40), + ConnectTime: ptr.To(int64(2)), DisableMP: true, }, }, diff --git a/internal/controller/merge_test.go b/internal/controller/merge_test.go index a546eae5..034e279c 100644 --- a/internal/controller/merge_test.go +++ b/internal/controller/merge_test.go @@ -1309,9 +1309,9 @@ func TestMergeNeighbors(t *testing.T) { Name: "65040@192.0.1.20", ASN: "65040", Addr: "192.0.1.20", - HoldTime: ptr.To(uint64(180)), - KeepaliveTime: ptr.To(uint64(60)), - ConnectTime: ptr.To(uint64(60)), + HoldTime: ptr.To(int64(180)), + KeepaliveTime: ptr.To(int64(60)), + ConnectTime: ptr.To(int64(60)), }, }, expected: []*frr.NeighborConfig{ @@ -1341,9 +1341,9 @@ func TestMergeNeighbors(t *testing.T) { Name: "65040@192.0.1.20", ASN: "65040", Addr: "192.0.1.20", - HoldTime: ptr.To(uint64(180)), - KeepaliveTime: ptr.To(uint64(60)), - ConnectTime: ptr.To(uint64(60)), + HoldTime: ptr.To(int64(180)), + KeepaliveTime: ptr.To(int64(60)), + ConnectTime: ptr.To(int64(60)), }, }, toMerge: []*frr.NeighborConfig{ diff --git a/internal/frr/config.go b/internal/frr/config.go index 21f80206..816f7d77 100644 --- a/internal/frr/config.go +++ b/internal/frr/config.go @@ -69,9 +69,9 @@ type NeighborConfig struct { SrcAddr string Addr string Port *uint16 - HoldTime *uint64 - KeepaliveTime *uint64 - ConnectTime *uint64 + HoldTime *int64 + KeepaliveTime *int64 + ConnectTime *int64 Password string BFDProfile string GracefulRestart bool diff --git a/internal/frr/frr_test.go b/internal/frr/frr_test.go index 2ce7af65..fc69bba2 100644 --- a/internal/frr/frr_test.go +++ b/internal/frr/frr_test.go @@ -154,9 +154,9 @@ func TestTwoRoutersTwoNeighbors(t *testing.T) { IPFamily: ipfamily.IPv4, ASN: "65001", Addr: "192.168.1.2", - HoldTime: ptr.To[uint64](80), - KeepaliveTime: ptr.To[uint64](40), - ConnectTime: ptr.To(uint64(10)), + HoldTime: ptr.To[int64](80), + KeepaliveTime: ptr.To[int64](40), + ConnectTime: ptr.To(int64(10)), Outgoing: AllowedOut{ PrefixesV4: []OutgoingFilter{ { diff --git a/internal/safeconvert/convertuint32.go b/internal/safeconvert/convertuint32.go new file mode 100644 index 00000000..c0b28173 --- /dev/null +++ b/internal/safeconvert/convertuint32.go @@ -0,0 +1,21 @@ +//go:build !arm +// +build !arm + +// SPDX-License-Identifier:Apache-2.0 + +package safeconvert + +import ( + "fmt" + "math" +) + +func IntToUInt32(toConvert int) (uint32, error) { + if toConvert < 0 { + return 0, fmt.Errorf("trying to convert negative value to uint32: %d", toConvert) + } + if toConvert > math.MaxUint32 { + return 0, fmt.Errorf("trying to convert value to uint32: %d, would overflow", toConvert) + } + return uint32(toConvert), nil +} diff --git a/internal/safeconvert/convertuint32_arm.go b/internal/safeconvert/convertuint32_arm.go new file mode 100644 index 00000000..de86254e --- /dev/null +++ b/internal/safeconvert/convertuint32_arm.go @@ -0,0 +1,18 @@ +//go:build arm +// +build arm + +// SPDX-License-Identifier:Apache-2.0 + +package safeconvert + +import ( + "fmt" +) + +func IntToUInt32(toConvert int) (uint32, error) { + if toConvert < 0 { + return 0, fmt.Errorf("trying to convert negative value to uint32: %d", toConvert) + } + // No need to check for upper limit on arm as maxInt is lower than maxuint32 + return uint32(toConvert), nil +} From 1637470130020840c5b6b775f741de68481b790f Mon Sep 17 00:00:00 2001 From: Ori Braunshtein Date: Tue, 17 Sep 2024 13:54:19 +0300 Subject: [PATCH 10/10] Prepare the release notes for 0.0.15 Signed-off-by: Ori Braunshtein --- RELEASE_NOTES.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 98333cdd..216922be 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,15 @@ # FRRK8s Release Notes +## Release v0.0.15 + +### New Features + +- Add DynamicASN field for a neighbor, which allows the daemon to detect the AS number to use without explicitly setting it. The new field is mutually exclusive with the existing ASN field, and one of them must be specified for any given Neighbor. (#194, @oribon) + +### Bug fixes + +- Update the kubernetes api / codegen and get rid of the core symlink hack. (#186, @fedepaol) + ## Release v0.0.14 ### New Features