diff --git a/config/crd/bases/operator.kcp.io_frontproxies.yaml b/config/crd/bases/operator.kcp.io_frontproxies.yaml index 91e3a5c..2670576 100644 --- a/config/crd/bases/operator.kcp.io_frontproxies.yaml +++ b/config/crd/bases/operator.kcp.io_frontproxies.yaml @@ -164,6 +164,26 @@ spec: x-kubernetes-validations: - message: OIDC requires ServiceAccount auth to be enabled. rule: '!has(self.oidc) || (has(self.serviceAccount) && self.serviceAccount.enabled)' + caBundleSecretRef: + description: |- + CABundle references a v1.Secret object that contains the CA bundle + that should be used to validate the API server's TLS certificate. + The secret must contain a key named `tls.crt` that holds the PEM encoded CA certificate. + It will be merged into the "external-logical-cluster-admin-kubeconfig" kubeconfig under the `certificate-authority-data` field. + If not specified, the kubeconfig will use the CA bundle of the root shard or front-proxy referenced in the Target field. + It will NOT be used to configure the API server's own TLS certificate or any other component. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic certificateTemplates: additionalProperties: properties: @@ -188,6 +208,9 @@ spec: description: |- Requested DNS subject alternative names. The values given here will be merged into the DNS names determined automatically by the kcp-operator. + If DNSNames is used together with IssuerRef, DNSNames will be uses as-is and not merged. + If IssuerRef is not set, DNSNames will be merged with the defaults. This is to avoid + trying to guess what DNSNames configued issuer might support. items: type: string type: array @@ -208,6 +231,22 @@ spec: items: type: string type: array + issuerRef: + description: IssuerRef is a reference to the issuer for + this certificate. + properties: + group: + description: Group of the object being referred to. + type: string + kind: + description: Kind of the object being referred to. + type: string + name: + description: Name of the object being referred to. + type: string + required: + - name + type: object privateKey: description: |- Private key options. These include the key algorithm and size, the used diff --git a/config/crd/bases/operator.kcp.io_kubeconfigs.yaml b/config/crd/bases/operator.kcp.io_kubeconfigs.yaml index bacfd38..8c1b430 100644 --- a/config/crd/bases/operator.kcp.io_kubeconfigs.yaml +++ b/config/crd/bases/operator.kcp.io_kubeconfigs.yaml @@ -65,6 +65,9 @@ spec: description: |- Requested DNS subject alternative names. The values given here will be merged into the DNS names determined automatically by the kcp-operator. + If DNSNames is used together with IssuerRef, DNSNames will be uses as-is and not merged. + If IssuerRef is not set, DNSNames will be merged with the defaults. This is to avoid + trying to guess what DNSNames configued issuer might support. items: type: string type: array @@ -85,6 +88,22 @@ spec: items: type: string type: array + issuerRef: + description: IssuerRef is a reference to the issuer for this + certificate. + properties: + group: + description: Group of the object being referred to. + type: string + kind: + description: Kind of the object being referred to. + type: string + name: + description: Name of the object being referred to. + type: string + required: + - name + type: object privateKey: description: |- Private key options. These include the key algorithm and size, the used diff --git a/config/crd/bases/operator.kcp.io_rootshards.yaml b/config/crd/bases/operator.kcp.io_rootshards.yaml index 6ee13d0..c6352a6 100644 --- a/config/crd/bases/operator.kcp.io_rootshards.yaml +++ b/config/crd/bases/operator.kcp.io_rootshards.yaml @@ -234,6 +234,26 @@ spec: type: string type: object type: object + caBundleSecretRef: + description: |- + CABundle references a v1.Secret object that contains the CA bundle + that should be used to validate the API server's TLS certificate. + The secret must contain a key named `tls.crt` that holds the PEM encoded CA certificate. + It will be merged into the "external-logical-cluster-admin-kubeconfig" kubeconfig under the `certificate-authority-data` field. + If not specified, the kubeconfig will use the CA bundle of the root shard or front-proxy referenced in the Target field. + It will NOT be used to configure the API server's own TLS certificate or any other component. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic cache: description: Cache configures the cache server (with a Kubernetes-like API) used by a sharded kcp instance. @@ -274,6 +294,9 @@ spec: description: |- Requested DNS subject alternative names. The values given here will be merged into the DNS names determined automatically by the kcp-operator. + If DNSNames is used together with IssuerRef, DNSNames will be uses as-is and not merged. + If IssuerRef is not set, DNSNames will be merged with the defaults. This is to avoid + trying to guess what DNSNames configued issuer might support. items: type: string type: array @@ -294,6 +317,22 @@ spec: items: type: string type: array + issuerRef: + description: IssuerRef is a reference to the issuer for + this certificate. + properties: + group: + description: Group of the object being referred to. + type: string + kind: + description: Kind of the object being referred to. + type: string + name: + description: Name of the object being referred to. + type: string + required: + - name + type: object privateKey: description: |- Private key options. These include the key algorithm and size, the used @@ -485,6 +524,8 @@ spec: type: object type: object clusterDomain: + description: ClusterDomain is the DNS domain for services in the cluster. + Defaults to "cluster.local" if not set. type: string deploymentTemplate: description: 'Optional: DeploymentTemplate configures the Kubernetes @@ -1689,6 +1730,9 @@ spec: description: |- Requested DNS subject alternative names. The values given here will be merged into the DNS names determined automatically by the kcp-operator. + If DNSNames is used together with IssuerRef, DNSNames will be uses as-is and not merged. + If IssuerRef is not set, DNSNames will be merged with the defaults. This is to avoid + trying to guess what DNSNames configued issuer might support. items: type: string type: array @@ -1709,6 +1753,23 @@ spec: items: type: string type: array + issuerRef: + description: IssuerRef is a reference to the issuer + for this certificate. + properties: + group: + description: Group of the object being referred + to. + type: string + kind: + description: Kind of the object being referred to. + type: string + name: + description: Name of the object being referred to. + type: string + required: + - name + type: object privateKey: description: |- Private key options. These include the key algorithm and size, the used @@ -3198,6 +3259,11 @@ spec: type: string type: object type: object + shardBaseURL: + description: |- + ShardBaseURL is the base URL under which this shard should be reachable. This is used to configure + the external URL. If not provided, the operator will use kubernetes service address to generate it. + type: string required: - cache - certificates diff --git a/config/crd/bases/operator.kcp.io_shards.yaml b/config/crd/bases/operator.kcp.io_shards.yaml index bb30395..1b16cc4 100644 --- a/config/crd/bases/operator.kcp.io_shards.yaml +++ b/config/crd/bases/operator.kcp.io_shards.yaml @@ -234,6 +234,26 @@ spec: type: string type: object type: object + caBundleSecretRef: + description: |- + CABundle references a v1.Secret object that contains the CA bundle + that should be used to validate the API server's TLS certificate. + The secret must contain a key named `tls.crt` that holds the PEM encoded CA certificate. + It will be merged into the "external-logical-cluster-admin-kubeconfig" kubeconfig under the `certificate-authority-data` field. + If not specified, the kubeconfig will use the CA bundle of the root shard or front-proxy referenced in the Target field. + It will NOT be used to configure the API server's own TLS certificate or any other component. + properties: + name: + default: "" + description: |- + Name of the referent. + This field is effectively required, but due to backwards compatibility is + allowed to be empty. Instances of this type with an empty value here are + almost certainly wrong. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: string + type: object + x-kubernetes-map-type: atomic certificateTemplates: additionalProperties: properties: @@ -258,6 +278,9 @@ spec: description: |- Requested DNS subject alternative names. The values given here will be merged into the DNS names determined automatically by the kcp-operator. + If DNSNames is used together with IssuerRef, DNSNames will be uses as-is and not merged. + If IssuerRef is not set, DNSNames will be merged with the defaults. This is to avoid + trying to guess what DNSNames configued issuer might support. items: type: string type: array @@ -278,6 +301,22 @@ spec: items: type: string type: array + issuerRef: + description: IssuerRef is a reference to the issuer for + this certificate. + properties: + group: + description: Group of the object being referred to. + type: string + kind: + description: Kind of the object being referred to. + type: string + name: + description: Name of the object being referred to. + type: string + required: + - name + type: object privateKey: description: |- Private key options. These include the key algorithm and size, the used @@ -428,6 +467,8 @@ spec: certificates for this shard. type: object clusterDomain: + description: ClusterDomain is the DNS domain for services in the cluster. + Defaults to "cluster.local" if not set. type: string deploymentTemplate: description: 'Optional: DeploymentTemplate configures the Kubernetes @@ -1702,6 +1743,11 @@ spec: type: string type: object type: object + shardBaseURL: + description: |- + ShardBaseURL is the base URL under which this shard should be reachable. This is used to configure + the external URL. If not provided, the operator will use kubernetes service address to generate it. + type: string required: - etcd - rootShard diff --git a/go.mod b/go.mod index 936b16e..46fc179 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.0 replace github.com/kcp-dev/kcp-operator/sdk => ./sdk require ( - github.com/cert-manager/cert-manager v1.16.2 + github.com/cert-manager/cert-manager v1.18.2 github.com/go-logr/logr v1.4.2 github.com/go-logr/zapr v1.3.0 github.com/go-test/deep v1.1.0 @@ -13,22 +13,23 @@ require ( github.com/kcp-dev/kcp-operator/sdk v0.0.0-00010101000000-000000000000 github.com/kcp-dev/kcp/sdk v0.27.1 github.com/kcp-dev/logicalcluster/v3 v3.0.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/zap v1.27.0 k8c.io/reconciler v0.5.0 - k8s.io/api v0.31.6 - k8s.io/apimachinery v0.31.6 - k8s.io/client-go v0.31.6 - k8s.io/code-generator v0.31.6 - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 + k8s.io/api v0.32.0 + k8s.io/apimachinery v0.32.0 + k8s.io/client-go v0.32.0 + k8s.io/code-generator v0.32.0 + k8s.io/utils v0.0.0-20241210054802-24370beab758 sigs.k8s.io/controller-runtime v0.19.0 sigs.k8s.io/controller-tools v0.16.1 sigs.k8s.io/yaml v1.4.0 ) require ( + cel.dev/expr v0.19.1 // indirect github.com/Masterminds/semver/v3 v3.2.1 // indirect - github.com/antlr4-go/antlr/v4 v4.13.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect @@ -39,7 +40,7 @@ require ( github.com/evanphx/json-patch/v5 v5.9.0 // indirect github.com/fatih/color v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect @@ -47,72 +48,71 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/cel-go v0.20.1 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/cel-go v0.22.1 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.9 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/onsi/gomega v1.34.1 // indirect + github.com/onsi/gomega v1.35.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.4 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/common v0.61.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/x448/float16 v0.8.4 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect - go.opentelemetry.io/otel v1.29.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect - go.opentelemetry.io/otel/metric v1.29.0 // indirect - go.opentelemetry.io/otel/sdk v1.28.0 // indirect - go.opentelemetry.io/otel/trace v1.29.0 // indirect - go.opentelemetry.io/proto/otlp v1.3.1 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect + go.opentelemetry.io/otel v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect + go.opentelemetry.io/otel/metric v1.33.0 // indirect + go.opentelemetry.io/otel/sdk v1.33.0 // indirect + go.opentelemetry.io/otel/trace v1.33.0 // indirect + go.opentelemetry.io/proto/otlp v1.4.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect + golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect golang.org/x/mod v0.24.0 // indirect golang.org/x/net v0.40.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect + golang.org/x/oauth2 v0.28.0 // indirect golang.org/x/sync v0.14.0 // indirect golang.org/x/sys v0.33.0 // indirect golang.org/x/term v0.32.0 // indirect golang.org/x/text v0.25.0 // indirect - golang.org/x/time v0.6.0 // indirect - golang.org/x/tools v0.25.1 // indirect + golang.org/x/time v0.8.0 // indirect + golang.org/x/tools v0.28.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.66.2 // indirect - google.golang.org/protobuf v1.34.2 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect + google.golang.org/grpc v1.69.2 // indirect + google.golang.org/protobuf v1.36.0 // 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.31.6 // indirect - k8s.io/apiserver v0.31.6 // indirect - k8s.io/component-base v0.31.6 // indirect - k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 // indirect + k8s.io/apiextensions-apiserver v0.32.0 // indirect + k8s.io/apiserver v0.32.0 // indirect + k8s.io/component-base v0.32.0 // indirect + k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect + k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 // indirect sigs.k8s.io/gateway-api v1.1.0 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect ) diff --git a/go.sum b/go.sum index 131e79e..2731ba1 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,9 @@ +cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= +cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= -github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -10,8 +12,8 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= 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/cert-manager/cert-manager v1.16.2 h1:c9UU2E+8XWGruyvC/mdpc1wuLddtgmNr8foKdP7a8Jg= -github.com/cert-manager/cert-manager v1.16.2/go.mod h1:MfLVTL45hFZsqmaT1O0+b2ugaNNQQZttSFV9hASHUb0= +github.com/cert-manager/cert-manager v1.18.2 h1:H2P75ycGcTMauV3gvpkDqLdS3RSXonWF2S49QGA1PZE= +github.com/cert-manager/cert-manager v1.18.2/go.mod h1:icDJx4kG9BCNpGjBvrmsFd99d+lXUvWdkkcrSSQdIiw= 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/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -29,8 +31,8 @@ github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4= github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -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/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= 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.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -54,28 +56,24 @@ github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= -github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/cel-go v0.22.1 h1:AfVXx3chM2qwoSbM7Da8g8hX8OVSkBFwX+rz2+PcK40= +github.com/google/cel-go v0.22.1/go.mod h1:BuznPXXfQDpXKWQ9sPW3TzlAJN5zzFe+i9tIs0yC4s8= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea h1:VcIYpAGBae3Z6BVncE0OnTE/ZjlDXqtYhOZky88neLM= github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= 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/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -90,16 +88,16 @@ github.com/kcp-dev/logicalcluster/v3 v3.0.5 h1:JbYakokb+5Uinz09oTXomSUJVQsqfxEvU github.com/kcp-dev/logicalcluster/v3 v3.0.5/go.mod h1:EWBUBxdr49fUB1cLMO4nOdBWmYifLbP1LfoL20KkXYY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -116,25 +114,25 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= -github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= 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/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.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= -github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= 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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= -github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= 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.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= @@ -150,28 +148,32 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0/go.mod h1:L7UH0GbB0p47T4Rri3uHjbpCFYrVrwc1I25QhNPiGK8= -go.opentelemetry.io/otel v1.29.0 h1:PdomN/Al4q/lN6iBJEN3AwPvUiHPMlt93c8bqTG5Llw= -go.opentelemetry.io/otel v1.29.0/go.mod h1:N/WtXPs1CNCUEx+Agz5uouwCba+i+bJGFicT8SR4NP8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2g+8YLc= -go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= -go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= -go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= -go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= -go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= -go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= -go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= +go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= +go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= +go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= +go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= +go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= +go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= +go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -181,8 +183,8 @@ go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= +golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo= +golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= @@ -193,8 +195,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY= golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= +golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -213,28 +215,28 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.25.1 h1:YeIyhd0M7gStYR9jb2IFXVVT+QJhgXu1ZECOuRwofh4= -golang.org/x/tools v0.25.1/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= +golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb h1:B7GIB7sr443wZ/EAEl7VZjmh1V6qzkt5V+RYcUYtS1U= +google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:E5//3O5ZIG2l71Xnt+P/CYUY8Bxs8E7WMoZ9tlcMbAY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb h1:3oy2tynMOP1QbTC0MsNNAV+Se8M2Bd0A5+x1QHyw+pI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 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= @@ -244,7 +246,6 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -252,39 +253,39 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8c.io/reconciler v0.5.0 h1:BHpelg1UfI/7oBFctqOq8sX6qzflXpl3SlvHe7e8wak= k8c.io/reconciler v0.5.0/go.mod h1:pT1+SVcVXJQeBJhpJBXQ5XW64QnKKeYTnVlQf0dGE0k= -k8s.io/api v0.31.6 h1:ocWG/UhC9Mqp5oEfYWy9wCddbZiZyBAFTlBt0LVlhDg= -k8s.io/api v0.31.6/go.mod h1:i16xSiKMgVIVhsJMxfWq0mJbXA+Z7KhjPgYmwT41hl4= -k8s.io/apiextensions-apiserver v0.31.6 h1:v9sqyWlrgFZpAPdEb/bEiXfM98TfSppwRF0X/uWKXh0= -k8s.io/apiextensions-apiserver v0.31.6/go.mod h1:QVH3CFwqzGZtwsxPYzJlA/Qiwgb5FXmRMGls3CjzvbI= -k8s.io/apimachinery v0.31.6 h1:Pn96A0wHD0X8+l7QTdAzdLQPrpav1s8rU6A+v2/9UEY= -k8s.io/apimachinery v0.31.6/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/apiserver v0.31.6 h1:FEhEGLsz1PbMOHeQZDbOUlMh36zRZbjgKwJCoMhdGmw= -k8s.io/apiserver v0.31.6/go.mod h1:dpFh+xqFQ02O8vLYCIqoiV7sJIpZsUULeNuag6Y9HGo= -k8s.io/client-go v0.31.6 h1:51HT40qVIZ13BrHKeWxFuU52uoPnFhxTYJnv4+LTgp4= -k8s.io/client-go v0.31.6/go.mod h1:MEq7JQJelUQ0/4fMoPEUrc/OOFyGo/9LmGA38H6O6xY= -k8s.io/code-generator v0.31.6 h1:CX4/NGV5UIdt7+nYG/G4+eGHOvcXAlKWswUhPPOtPtc= -k8s.io/code-generator v0.31.6/go.mod h1:vbqDrvP5hJJ5S/jzBtyMJoH5kJBWZMo/DZwMYiOQniE= -k8s.io/component-base v0.31.6 h1:FgI25PuZtCp2n7AFpOaDpMQOLieFdrpAbpeoZu7VhDI= -k8s.io/component-base v0.31.6/go.mod h1:aVRrh8lAI1kSShFmwcKLhc3msQoUcmFWPBDf0sXaISM= -k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7 h1:cErOOTkQ3JW19o4lo91fFurouhP8NcoBvb7CkvhZZpk= -k8s.io/gengo/v2 v2.0.0-20240826214909-a7b603a56eb7/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= +k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= +k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= +k8s.io/apiextensions-apiserver v0.32.0 h1:S0Xlqt51qzzqjKPxfgX1xh4HBZE+p8KKBq+k2SWNOE0= +k8s.io/apiextensions-apiserver v0.32.0/go.mod h1:86hblMvN5yxMvZrZFX2OhIHAuFIMJIZ19bTvzkP+Fmw= +k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= +k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apiserver v0.32.0 h1:VJ89ZvQZ8p1sLeiWdRJpRD6oLozNZD2+qVSLi+ft5Qs= +k8s.io/apiserver v0.32.0/go.mod h1:HFh+dM1/BE/Hm4bS4nTXHVfN6Z6tFIZPi649n83b4Ag= +k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= +k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= +k8s.io/code-generator v0.32.0 h1:s0lNN8VSWny8LBz5t5iy7MCdgwdOhdg7vAGVxvS+VWU= +k8s.io/code-generator v0.32.0/go.mod h1:b7Q7KMZkvsYFy72A79QYjiv4aTz3GvW0f1T3UfhFq4s= +k8s.io/component-base v0.32.0 h1:d6cWHZkCiiep41ObYQS6IcgzOUQUNpywm39KVYaUqzU= +k8s.io/component-base v0.32.0/go.mod h1:JLG2W5TUxUu5uDyKiH2R/7NnxJo1HlPoRIIbVLkK5eM= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4= +k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU= 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-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas= +k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= +k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1 h1:uOuSLOMBWkJH0TWa9X6l+mj5nZdm6Ay6Bli8HL8rNfk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.1/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= 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/controller-tools v0.16.1 h1:gvIsZm+2aimFDIBiDKumR7EBkc+oLxljoUVfRbDI6RI= sigs.k8s.io/controller-tools v0.16.1/go.mod h1:0I0xqjR65YTfoO12iR+mZR6s6UAVcUARgXRlsu0ljB0= sigs.k8s.io/gateway-api v1.1.0 h1:DsLDXCi6jR+Xz8/xd0Z1PYl2Pn0TyaFMOPPZIj4inDM= sigs.k8s.io/gateway-api v1.1.0/go.mod h1:ZH4lHrL2sDi0FHZ9jjneb8kKnGzFWyrTya35sWUTrRs= -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= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/structured-merge-diff/v4 v4.5.0 h1:nbCitCK2hfnhyiKo6uf2HxUPTCodY6Qaf85SbDIaMBk= +sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/hack/ci/build-image.sh b/hack/ci/build-image.sh index 230d463..f43a472 100755 --- a/hack/ci/build-image.sh +++ b/hack/ci/build-image.sh @@ -18,7 +18,7 @@ set -euo pipefail # make git available if ! [ -x "$(command -v git)" ]; then - echo "Installing git…" + echo "Installing git..." dnf install -y git fi @@ -27,7 +27,7 @@ if [ -n "${DOCKER_REGISTRY_MIRROR_ADDR:-}" ]; then # remove "http://" or "https://" prefix mirror="$(echo "$DOCKER_REGISTRY_MIRROR_ADDR" | awk -F// '{print $NF}')" - echo "Configuring registry mirror for docker.io…" + echo "Configuring registry mirror for docker.io..." cat < /etc/containers/registries.conf.d/mirror.conf [[registry]] @@ -65,13 +65,13 @@ if [ -z "$version" ]; then fi image="$repository:$version" -echo "Building container image $image…" +echo "Building container image $image..." # build image for all architectures for arch in $architectures; do fullTag="$image-$arch" - echo "Building $version-$arch…" + echo "Building $version-$arch..." buildah build-using-dockerfile \ --file Dockerfile \ --tag "$fullTag" \ @@ -94,7 +94,7 @@ function create_manifest() { buildah manifest create "$name" } -echo "Creating manifest $image…" +echo "Creating manifest $image..." create_manifest "$image" for arch in $architectures; do buildah manifest add "$image" "$image-$arch" @@ -107,7 +107,7 @@ done if [ -n "$branchName" ]; then branchImage="$repository:$branchName" - echo "Creating manifest $branchImage…" + echo "Creating manifest $branchImage..." create_manifest "$branchImage" for arch in $architectures; do buildah manifest add "$branchImage" "$image-$arch" @@ -116,10 +116,10 @@ fi # push manifest, except in presubmits if [ -z "${DRY_RUN:-}" ]; then - echo "Logging into GHCR…" + echo "Logging into GHCR..." buildah login --username "$KCP_GHCR_USERNAME" --password "$KCP_GHCR_PASSWORD" ghcr.io - echo "Pushing manifest and images…" + echo "Pushing manifest and images..." buildah manifest push --all "$image" "docker://$image" if [ -n "${branchImage:-}" ]; then diff --git a/hack/ci/run-e2e-tests.sh b/hack/ci/run-e2e-tests.sh index f6cebc8..cee06ab 100755 --- a/hack/ci/run-e2e-tests.sh +++ b/hack/ci/run-e2e-tests.sh @@ -21,7 +21,7 @@ set -euo pipefail if [ -n "${KCP_TAG:-}" ]; then # resolve what looks like branch names if [[ "$KCP_TAG" == main ]] || [[ "$KCP_TAG" =~ ^release- ]]; then - echo "Resolving kcp $KCP_TAG …" + echo "Resolving kcp $KCP_TAG ..." tmpdir="$(mktemp -d)" here="$(pwd)" @@ -46,7 +46,7 @@ fi # build the image(s) export IMAGE_TAG=local -echo "Building container images…" +echo "Building container images..." ARCHITECTURES=arm64 DRY_RUN=yes ./hack/ci/build-image.sh # start docker so we can run kind @@ -55,11 +55,11 @@ start-docker.sh # create a local kind cluster KIND_CLUSTER_NAME=e2e -echo "Preloading the kindest/node image…" +echo "Preloading the kindest/node image..." docker load --input /kindest.tar export KUBECONFIG=$(mktemp) -echo "Creating kind cluster $KIND_CLUSTER_NAME…" +echo "Creating kind cluster $KIND_CLUSTER_NAME..." kind create cluster --name "$KIND_CLUSTER_NAME" chmod 600 "$KUBECONFIG" @@ -74,18 +74,18 @@ make helm image="ghcr.io/kcp-dev/kcp-operator:$IMAGE_TAG" archive=operator.tar -echo "Loading operator image into kind…" +echo "Loading operator image into kind..." buildah manifest push --all "$image" "oci-archive:$archive:$image" kind load image-archive "$archive" --name "$KIND_CLUSTER_NAME" # deploy the operator -echo "Deploying operator…" +echo "Deploying operator..." kubectl kustomize hack/ci/testdata | kubectl apply --filename - kubectl --namespace kcp-operator-system wait deployment kcp-operator-controller-manager --for condition=Available kubectl --namespace kcp-operator-system wait pod --all --for condition=Ready # deploying cert-manager -echo "Deploying cert-manager…" +echo "Deploying cert-manager..." _tools/helm repo add jetstack https://charts.jetstack.io --force-update _tools/helm repo update @@ -100,7 +100,7 @@ _tools/helm upgrade \ kubectl apply --filename hack/ci/testdata/clusterissuer.yaml -echo "Running e2e tests…" +echo "Running e2e tests..." export HELM_BINARY="$(realpath _tools/helm)" export ETCD_HELM_CHART="$(realpath hack/ci/testdata/etcd)" diff --git a/hack/download-tool.sh b/hack/download-tool.sh index 8136dd3..3d9c8e2 100755 --- a/hack/download-tool.sh +++ b/hack/download-tool.sh @@ -46,7 +46,7 @@ fi mkdir -p tmp cd tmp - echo "Downloading $BINARY version $VERSION …" >&2 + echo "Downloading $BINARY version $VERSION ..." >&2 if $GO_MODULE; then GOBIN=$(realpath .) go install "$URL@$VERSION" diff --git a/hack/run-e2e-tests.sh b/hack/run-e2e-tests.sh index dd4a6c0..eb316d2 100755 --- a/hack/run-e2e-tests.sh +++ b/hack/run-e2e-tests.sh @@ -30,19 +30,19 @@ DATA_DIR="$(realpath "$DATA_DIR")" # create a local kind cluster export KUBECONFIG="$DATA_DIR/kind.kubeconfig" -echo "Creating kind cluster $KIND_CLUSTER_NAME…" +echo "Creating kind cluster $KIND_CLUSTER_NAME..." kind create cluster --name "$KIND_CLUSTER_NAME" chmod 600 "$KUBECONFIG" teardown_kind() { if [[ $OPERATOR_PID -gt 0 ]]; then - echo "Stopping kcp-operator…" + echo "Stopping kcp-operator..." kill -TERM $OPERATOR_PID wait $OPERATOR_PID fi if [[ $PROTOKOL_PID -gt 0 ]]; then - echo "Stopping protokol…" + echo "Stopping protokol..." kill -TERM $PROTOKOL_PID # no wait because protokol ends quickly and wait would fail fi @@ -59,11 +59,11 @@ fi echo "Kubeconfig is in $KUBECONFIG." # deploying operator CRDs -echo "Deploying operator CRDs…" +echo "Deploying operator CRDs..." kubectl apply --kustomize config/crd # deploying cert-manager -echo "Deploying cert-manager…" +echo "Deploying cert-manager..." _tools/helm repo add jetstack https://charts.jetstack.io --force-update _tools/helm repo update @@ -80,12 +80,13 @@ _tools/helm upgrade \ kubectl apply --filename hack/ci/testdata/clusterissuer.yaml # start the operator locally -echo "Starting kcp-operator…" +echo "Starting kcp-operator..." _build/manager \ -kubeconfig "$KUBECONFIG" \ -zap-log-level debug \ -zap-encoder console \ -zap-time-encoding iso8601 \ + -health-probe-bind-address="" \ >"$DATA_DIR/kcp-operator.log" 2>&1 & OPERATOR_PID=$! echo "Running as process $OPERATOR_PID." @@ -98,7 +99,7 @@ else echo "collect logs from the kind cluster." fi -echo "Running e2e tests…" +echo "Running e2e tests..." export HELM_BINARY="$(realpath _tools/helm)" export ETCD_HELM_CHART="$(realpath hack/ci/testdata/etcd)" diff --git a/internal/controller/kubeconfig/controller.go b/internal/controller/kubeconfig/controller.go index ca20a94..0be6c0b 100644 --- a/internal/controller/kubeconfig/controller.go +++ b/internal/controller/kubeconfig/controller.go @@ -83,6 +83,7 @@ func (r *KubeconfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) rootShard := &operatorv1alpha1.RootShard{} shard := &operatorv1alpha1.Shard{} + var caBundle *corev1.Secret var ( clientCertIssuer string @@ -132,6 +133,13 @@ func (r *KubeconfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) clientCertIssuer = resources.GetRootShardCAName(rootShard, operatorv1alpha1.FrontProxyClientCA) serverCA = resources.GetRootShardCAName(rootShard, operatorv1alpha1.ServerCA) + if frontProxy.Spec.CABundleSecretRef != nil { + caBundle = &corev1.Secret{} + if err := r.Get(ctx, types.NamespacedName{Name: frontProxy.Spec.CABundleSecretRef.Name, Namespace: req.Namespace}, caBundle); err != nil { + return ctrl.Result{}, fmt.Errorf("failed to get CA bundle secret %s/%s: %w", req.Namespace, frontProxy.Spec.CABundleSecretRef.Name, err) + } + } + default: return ctrl.Result{}, fmt.Errorf("no valid target for kubeconfig found") } @@ -158,7 +166,7 @@ func (r *KubeconfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) return ctrl.Result{RequeueAfter: time.Second * 5}, nil } - reconciler, err := kubeconfig.KubeconfigSecretReconciler(&kc, rootShard, shard, serverCASecret, clientCertSecret) + reconciler, err := kubeconfig.KubeconfigSecretReconciler(&kc, rootShard, shard, serverCASecret, clientCertSecret, caBundle) if err != nil { return ctrl.Result{}, err } diff --git a/internal/controller/rootshard/controller.go b/internal/controller/rootshard/controller.go index ef3f7fa..fc021b2 100644 --- a/internal/controller/rootshard/controller.go +++ b/internal/controller/rootshard/controller.go @@ -172,6 +172,14 @@ func (r *RootShardReconciler) reconcile(ctx context.Context, rootShard *operator errs = append(errs, err) } + if rootShard.Spec.CABundleSecretRef != nil { + if err := k8creconciling.ReconcileSecrets(ctx, []k8creconciling.NamedSecretReconcilerFactory{ + rootshard.MergedCABundleSecretReconciler(ctx, rootShard, r.Client), + }, rootShard.Namespace, r.Client, ownerRefWrapper); err != nil { + errs = append(errs, err) + } + } + if err := k8creconciling.ReconcileSecrets(ctx, []k8creconciling.NamedSecretReconcilerFactory{ rootshard.LogicalClusterAdminKubeconfigReconciler(rootShard), rootshard.ExternalLogicalClusterAdminKubeconfigReconciler(rootShard), diff --git a/internal/controller/shard/controller.go b/internal/controller/shard/controller.go index fdffb14..1fd5276 100644 --- a/internal/controller/shard/controller.go +++ b/internal/controller/shard/controller.go @@ -151,6 +151,14 @@ func (r *ShardReconciler) reconcile(ctx context.Context, s *operatorv1alpha1.Sha errs = append(errs, err) } + if s.Spec.CABundleSecretRef != nil { + if err := k8creconciling.ReconcileSecrets(ctx, []k8creconciling.NamedSecretReconcilerFactory{ + shard.MergedCABundleSecretReconciler(ctx, s, r.Client), + }, s.Namespace, r.Client, ownerRefWrapper); err != nil { + errs = append(errs, err) + } + } + if err := k8creconciling.ReconcileDeployments(ctx, []k8creconciling.NamedDeploymentReconcilerFactory{ shard.DeploymentReconciler(s, rootShard), }, s.Namespace, r.Client, ownerRefWrapper); err != nil { diff --git a/internal/resources/kubeconfig/secret.go b/internal/resources/kubeconfig/secret.go index 6ad56a8..f99998a 100644 --- a/internal/resources/kubeconfig/secret.go +++ b/internal/resources/kubeconfig/secret.go @@ -27,6 +27,7 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" "github.com/kcp-dev/kcp-operator/internal/resources" + "github.com/kcp-dev/kcp-operator/internal/resources/utils" operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" ) @@ -40,8 +41,19 @@ func KubeconfigSecretReconciler( kubeconfig *operatorv1alpha1.Kubeconfig, rootShard *operatorv1alpha1.RootShard, shard *operatorv1alpha1.Shard, - caSecret, certSecret *corev1.Secret, + caSecret *corev1.Secret, + certSecret *corev1.Secret, + caBundle *corev1.Secret, // can be nil ) (reconciling.NamedSecretReconcilerFactory, error) { + if caBundle != nil && caBundle.Data["tls.crt"] == nil { + return nil, fmt.Errorf("the CA bundle secret %s/%s does not contain a `tls.crt` key", caBundle.Namespace, caBundle.Name) + } + + caData, err := utils.MergeCABundles(caSecret, caBundle) + if err != nil { + return nil, fmt.Errorf("failed to merge CA bundles: %w", err) + } + config := &clientcmdapi.Config{ Clusters: map[string]*clientcmdapi.Cluster{}, Contexts: map[string]*clientcmdapi.Context{}, @@ -56,7 +68,7 @@ func KubeconfigSecretReconciler( addCluster := func(clusterName, url string) { config.Clusters[clusterName] = &clientcmdapi.Cluster{ Server: url, - CertificateAuthorityData: caSecret.Data["tls.crt"], + CertificateAuthorityData: caData, } } addContext := func(contextName, clusterName string) { diff --git a/internal/resources/resources.go b/internal/resources/resources.go index 9a4255c..20073ca 100644 --- a/internal/resources/resources.go +++ b/internal/resources/resources.go @@ -117,6 +117,9 @@ func GetRootShardBaseHost(r *operatorv1alpha1.RootShard) string { } func GetRootShardBaseURL(r *operatorv1alpha1.RootShard) string { + if r.Spec.ShardBaseURL != "" { + return r.Spec.ShardBaseURL + } return fmt.Sprintf("https://%s:6443", GetRootShardBaseHost(r)) } @@ -130,6 +133,9 @@ func GetShardBaseHost(s *operatorv1alpha1.Shard) string { } func GetShardBaseURL(s *operatorv1alpha1.Shard) string { + if s.Spec.ShardBaseURL != "" { + return s.Spec.ShardBaseURL + } return fmt.Sprintf("https://%s:6443", GetShardBaseHost(s)) } diff --git a/internal/resources/rootshard/ca_bundle.go b/internal/resources/rootshard/ca_bundle.go new file mode 100644 index 0000000..aa48d8d --- /dev/null +++ b/internal/resources/rootshard/ca_bundle.go @@ -0,0 +1,96 @@ +/* +Copyright 2025 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package rootshard + +import ( + "context" + "fmt" + + k8creconciling "k8c.io/reconciler/pkg/reconciling" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/kcp-dev/kcp-operator/internal/resources" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" +) + +func MergedCABundleSecretReconciler(ctx context.Context, rootShard *operatorv1alpha1.RootShard, kubeClient client.Client) k8creconciling.NamedSecretReconcilerFactory { + return func() (string, k8creconciling.SecretReconciler) { + secretName := fmt.Sprintf("%s-merged-ca-bundle", rootShard.Name) + return secretName, func(secret *corev1.Secret) (*corev1.Secret, error) { + if secret.Data == nil { + secret.Data = make(map[string][]byte) + } + + // Get ServerCA certificate + serverCASecret := &corev1.Secret{} + serverCASecretName := resources.GetRootShardCAName(rootShard, operatorv1alpha1.ServerCA) + err := kubeClient.Get(ctx, types.NamespacedName{ + Name: serverCASecretName, + Namespace: rootShard.Namespace, + }, serverCASecret) + if err != nil { + return nil, fmt.Errorf("failed to get ServerCA secret %s: %w", serverCASecretName, err) + } + + serverCACert, exists := serverCASecret.Data["tls.crt"] + if !exists { + return nil, fmt.Errorf("ServerCA secret %s missing tls.crt", serverCASecretName) + } + + // Get user-provided CA bundle if specified + var userCABundle []byte + if rootShard.Spec.CABundleSecretRef != nil { + userCABundleSecret := &corev1.Secret{} + err := kubeClient.Get(ctx, types.NamespacedName{ + Name: rootShard.Spec.CABundleSecretRef.Name, + Namespace: rootShard.Namespace, + }, userCABundleSecret) + if err != nil { + return nil, fmt.Errorf("failed to get user CA bundle secret %s: %w", rootShard.Spec.CABundleSecretRef.Name, err) + } + + var exists bool + userCABundle, exists = userCABundleSecret.Data["tls.crt"] + if !exists { + return nil, fmt.Errorf("user CA bundle secret %s missing tls.crt", rootShard.Spec.CABundleSecretRef.Name) + } + } + + // Merge certificates: ServerCA + user CA bundle + var mergedCA []byte + if len(userCABundle) > 0 { + mergedCA = append(serverCACert, '\n') + mergedCA = append(mergedCA, userCABundle...) + } else { + mergedCA = serverCACert + } + + secret.Data["tls.crt"] = mergedCA + + // Set labels to identify this as a merged CA bundle + if secret.Labels == nil { + secret.Labels = make(map[string]string) + } + secret.Labels[resources.RootShardLabel] = rootShard.Name + + return secret, nil + } + } +} diff --git a/internal/resources/rootshard/deployment.go b/internal/resources/rootshard/deployment.go index 2d5f995..bd91169 100644 --- a/internal/resources/rootshard/deployment.go +++ b/internal/resources/rootshard/deployment.go @@ -120,6 +120,18 @@ func DeploymentReconciler(rootShard *operatorv1alpha1.RootShard) reconciling.Nam }) } + // If CABundle is specified, mount the merged CA bundle secret. + // This secret contains both ServerCA and user-provided CA bundle merged together. + // It will not be used for the API server itself, but only for the "external-logical-cluster-admin-kubeconfig" kubeconfig. + // See the comment in the RootShard spec for more details. + if rootShard.Spec.CABundleSecretRef != nil { + secretMounts = append(secretMounts, utils.SecretMount{ + VolumeName: "ca-bundle", + SecretName: fmt.Sprintf("%s-merged-ca-bundle", rootShard.Name), + MountPath: getCAMountPath(operatorv1alpha1.CABundleCA), + }) + } + volumes := []corev1.Volume{} volumeMounts := []corev1.VolumeMount{} diff --git a/internal/resources/rootshard/kubeconfigs.go b/internal/resources/rootshard/kubeconfigs.go index b91c05d..43d4a5c 100644 --- a/internal/resources/rootshard/kubeconfigs.go +++ b/internal/resources/rootshard/kubeconfigs.go @@ -101,8 +101,8 @@ func ExternalLogicalClusterAdminKubeconfigReconciler(rootShard *operatorv1alpha1 Clusters: map[string]*clientcmdapi.Cluster{ serverName: { // This has to point to a front-proxy, not the root shard itself. - Server: fmt.Sprintf("https://%s:%d", rootShard.Spec.External.Hostname, rootShard.Spec.External.Port), - CertificateAuthority: getCAMountPath(operatorv1alpha1.ServerCA) + "/tls.crt", + Server: fmt.Sprintf("https://%s:%d", rootShard.Spec.External.Hostname, rootShard.Spec.External.Port), + // CertificateAuthority will be populated below, depending on whether CABundle is specified or not. }, }, Contexts: map[string]*clientcmdapi.Context{ @@ -120,6 +120,14 @@ func ExternalLogicalClusterAdminKubeconfigReconciler(rootShard *operatorv1alpha1 CurrentContext: contextName, } + if rootShard.Spec.CABundleSecretRef == nil { + config.Clusters[serverName].CertificateAuthority = getCAMountPath(operatorv1alpha1.ServerCA) + "/tls.crt" + } else { + // If CABundle is specified, it will be mounted to pod by deployment so we can use it file path + // Secret data is merged by operator by creating dedicate CA bundle secret. + config.Clusters[serverName].CertificateAuthority = getCAMountPath(operatorv1alpha1.CABundleCA) + "/tls.crt" + } + data, err := clientcmd.Write(*config) if err != nil { return nil, err diff --git a/internal/resources/shard/ca_bundle.go b/internal/resources/shard/ca_bundle.go new file mode 100644 index 0000000..40ae8f9 --- /dev/null +++ b/internal/resources/shard/ca_bundle.go @@ -0,0 +1,96 @@ +/* +Copyright 2025 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package shard + +import ( + "context" + "fmt" + + k8creconciling "k8c.io/reconciler/pkg/reconciling" + + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + "github.com/kcp-dev/kcp-operator/internal/resources" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" +) + +func MergedCABundleSecretReconciler(ctx context.Context, shard *operatorv1alpha1.Shard, kubeClient client.Client) k8creconciling.NamedSecretReconcilerFactory { + return func() (string, k8creconciling.SecretReconciler) { + secretName := fmt.Sprintf("%s-merged-ca-bundle", shard.Name) + return secretName, func(secret *corev1.Secret) (*corev1.Secret, error) { + if secret.Data == nil { + secret.Data = make(map[string][]byte) + } + + // Get ServerCA certificate + serverCASecret := &corev1.Secret{} + serverCASecretName := resources.GetShardCertificateName(shard, operatorv1alpha1.ServerCertificate) + err := kubeClient.Get(ctx, types.NamespacedName{ + Name: serverCASecretName, + Namespace: shard.Namespace, + }, serverCASecret) + if err != nil { + return nil, fmt.Errorf("failed to get ServerCA secret %s: %w", serverCASecretName, err) + } + + serverCACert, exists := serverCASecret.Data["tls.crt"] + if !exists { + return nil, fmt.Errorf("ServerCA secret %s missing tls.crt", serverCASecretName) + } + + // Get user-provided CA bundle if specified + var userCABundle []byte + if shard.Spec.CABundleSecretRef != nil { + userCABundleSecret := &corev1.Secret{} + err := kubeClient.Get(ctx, types.NamespacedName{ + Name: shard.Spec.CABundleSecretRef.Name, + Namespace: shard.Namespace, + }, userCABundleSecret) + if err != nil { + return nil, fmt.Errorf("failed to get user CA bundle secret %s: %w", shard.Spec.CABundleSecretRef.Name, err) + } + + var exists bool + userCABundle, exists = userCABundleSecret.Data["tls.crt"] + if !exists { + return nil, fmt.Errorf("user CA bundle secret %s missing tls.crt", shard.Spec.CABundleSecretRef.Name) + } + } + + // Merge certificates: ServerCA + user CA bundle + var mergedCA []byte + if len(userCABundle) > 0 { + mergedCA = append(serverCACert, '\n') + mergedCA = append(mergedCA, userCABundle...) + } else { + mergedCA = serverCACert + } + + secret.Data["tls.crt"] = mergedCA + + // Set labels to identify this as a merged CA bundle + if secret.Labels == nil { + secret.Labels = make(map[string]string) + } + secret.Labels[resources.ShardLabel] = shard.Name + + return secret, nil + } + } +} diff --git a/internal/resources/shard/deployment.go b/internal/resources/shard/deployment.go index 6ee38b0..20b36c0 100644 --- a/internal/resources/shard/deployment.go +++ b/internal/resources/shard/deployment.go @@ -121,6 +121,18 @@ func DeploymentReconciler(shard *operatorv1alpha1.Shard, rootShard *operatorv1al }) } + // If CABundle is specified, mount the merged CA bundle secret. + // This secret contains both ServerCA and user-provided CA bundle merged together. + // It will not be used for the API server itself, but only for the "external-logical-cluster-admin-kubeconfig" kubeconfig. + // See the comment in the RootShard spec for more details. + if shard.Spec.CABundleSecretRef != nil { + secretMounts = append(secretMounts, utils.SecretMount{ + VolumeName: "ca-bundle", + SecretName: fmt.Sprintf("%s-merged-ca-bundle", shard.Name), + MountPath: getCAMountPath(operatorv1alpha1.CABundleCA), + }) + } + volumes := []corev1.Volume{} volumeMounts := []corev1.VolumeMount{} diff --git a/internal/resources/utils/certificates.go b/internal/resources/utils/certificates.go index 7870ef2..700f5d6 100644 --- a/internal/resources/utils/certificates.go +++ b/internal/resources/utils/certificates.go @@ -17,10 +17,16 @@ limitations under the License. package utils import ( + "crypto/x509" + "encoding/pem" + "fmt" "maps" + "os" certmanagerv1 "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1" + cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" @@ -65,7 +71,16 @@ func applyCertificateSpecTemplate(cert *certmanagerv1.Certificate, tpl *operator return cert } - cert.Spec.DNSNames = mergeSlices(cert.Spec.DNSNames, tpl.DNSNames) + // If DNSNames is provided in the template and issuer is overrided, + // it will replace any existing DNSNames. + // We don't merge as we don't know if issuer supports our default names. + // Its users responsibility to add them back if needed. + if len(tpl.DNSNames) > 0 && tpl.IssuerRef != nil { + cert.Spec.DNSNames = tpl.DNSNames + } else if len(tpl.DNSNames) > 0 { + cert.Spec.DNSNames = mergeSlices(cert.Spec.DNSNames, tpl.DNSNames) + } + cert.Spec.IPAddresses = mergeSlices(cert.Spec.IPAddresses, tpl.IPAddresses) if tpl.Duration != nil { @@ -84,6 +99,13 @@ func applyCertificateSpecTemplate(cert *certmanagerv1.Certificate, tpl *operator cert.Spec.SecretTemplate.Annotations = addNewKeys(cert.Spec.SecretTemplate.Annotations, secretTpl.Annotations) cert.Spec.SecretTemplate.Labels = addNewKeys(cert.Spec.SecretTemplate.Labels, secretTpl.Labels) } + if tpl.IssuerRef != nil { + cert.Spec.IssuerRef = cmmeta.ObjectReference{ + Name: tpl.IssuerRef.Name, + Kind: tpl.IssuerRef.Kind, + Group: tpl.IssuerRef.Group, + } + } cert.Spec.PrivateKey = applyCertificatePrivateKeyTemplate(cert.Spec.PrivateKey, tpl.PrivateKey) cert.Spec.Subject = applyCertificateSubjectTemplate(cert.Spec.Subject, tpl.Subject) @@ -144,3 +166,81 @@ func applyCertificateSubjectTemplate(subj *certmanagerv1.X509Subject, tpl *opera return subj } + +// ValidatePEMCertificate validates that the given data contains valid PEM-encoded certificates. +func ValidatePEMCertificate(data []byte) error { + if len(data) == 0 { + return nil + } + + block, rest := pem.Decode(data) + for block != nil { + if block.Type != "CERTIFICATE" { + return fmt.Errorf("invalid PEM block type: %s, expected CERTIFICATE", block.Type) + } + + if _, err := x509.ParseCertificate(block.Bytes); err != nil { + return fmt.Errorf("failed to parse certificate: %w", err) + } + + block, rest = pem.Decode(rest) + } + + if len(rest) > 0 { + return fmt.Errorf("invalid PEM data: remaining non-PEM data found") + } + + return nil +} + +// MergeCABundles merges the CA certificate data from two secrets. +func MergeCABundles(caSecret, caBundle *corev1.Secret) ([]byte, error) { + var merged []byte + + if caSecret != nil && caSecret.Data != nil { + if caCrt, exists := caSecret.Data["tls.crt"]; exists { + if err := ValidatePEMCertificate(caCrt); err != nil { + return nil, fmt.Errorf("invalid certificate in caSecret: %w", err) + } + merged = append(merged, caCrt...) + } + } + + if caBundle != nil && caBundle.Data != nil { + if caCrt, exists := caBundle.Data["tls.crt"]; exists { + if err := ValidatePEMCertificate(caCrt); err != nil { + return nil, fmt.Errorf("invalid certificate in caBundle: %w", err) + } + merged = append(merged, caCrt...) + } + } + + return merged, nil +} + +// MergeCABundlesFiles merges the CA certificate data from two files. +func MergeCABundlesFiles(caFile1, caFile2 string) ([]byte, error) { + var merged []byte + + // Read and validate the first CA file + caFile1Content, err := os.ReadFile(caFile1) + if err != nil { + return nil, fmt.Errorf("failed to read CA file 1: %w", err) + } + if err := ValidatePEMCertificate(caFile1Content); err != nil { + return nil, fmt.Errorf("invalid certificate in caFile1: %w", err) + } + merged = append(merged, caFile1Content...) + + // Read and validate the second CA file + caFile2Content, err := os.ReadFile(caFile2) + if err != nil { + return nil, fmt.Errorf("failed to read CA file 2: %w", err) + } + if err := ValidatePEMCertificate(caFile2Content); err != nil { + return nil, fmt.Errorf("invalid certificate in caFile2: %w", err) + } + merged = append(merged, caFile2Content...) + + return merged, nil +} diff --git a/internal/resources/utils/certificates_test.go b/internal/resources/utils/certificates_test.go new file mode 100644 index 0000000..8dfc060 --- /dev/null +++ b/internal/resources/utils/certificates_test.go @@ -0,0 +1,124 @@ +/* +Copyright 2025 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package utils + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestValidatePEMCertificate(t *testing.T) { + // Valid certificate for testing valid case + validCert := `-----BEGIN CERTIFICATE----- +MIICMzCCAZygAwIBAgIJALiPnVsvq8dsMA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNV +BAYTAlVTMQwwCgYDVQQIEwNmb28xDDAKBgNVBAcTA2ZvbzEMMAoGA1UEChMDZm9v +MQwwCgYDVQQLEwNmb28xDDAKBgNVBAMTA2ZvbzAeFw0xMzAzMTkxNTQwMTlaFw0x +ODAzMTgxNTQwMTlaMFMxCzAJBgNVBAYTAlVTMQwwCgYDVQQIEwNmb28xDDAKBgNV +BAcTA2ZvbzEMMAoGA1UEChMDZm9vMQwwCgYDVQQLEwNmb28xDDAKBgNVBAMTA2Zv +bzCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAzdGfxi9CNbMf1UUcvDQh7MYB +OveIHyc0E0KIbhjK5FkCBU4CiZrbfHagaW7ZEcN0tt3EvpbOMxxc/ZQU2WN/s/wP +xph0pSfsfFsTKM4RhTWD2v4fgk+xZiKd1p0+L4hTtpwnEw0uXRVd0ki6muwV5y/P ++5FHUeldq+pgTcgzuK8CAwEAAaMPMA0wCwYDVR0PBAQDAgLkMA0GCSqGSIb3DQEB +BQUAA4GBAJiDAAtY0mQQeuxWdzLRzXmjvdSuL9GoyT3BF/jSnpxz5/58dba8pWen +v3pj4P3w5DoOso0rzkZy2jEsEitlVM2mLSbQpMM+MUVQCQoiG6W9xuCFuxSrwPIS +pAqEAuV4DNoxQKKWmhVv+J0ptMWD25Pnpxeq5sXzghfJnslJlQND +-----END CERTIFICATE-----` + + // Valid RSA private key for testing invalid block type + validPrivateKey := `-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAzdGfxi9CNbMf1UUcvDQh7MYBOveIHyc0E0KIbhjK5FkCBU4C +iZrbfHagaW7ZEcN0tt3EvpbOMxxc/ZQU2WN/s/wPxph0pSfsfFsTKM4RhTWD2v4f +gk+xZiKd1p0+L4hTtpwnEw0uXRVd0ki6muwV5y/P+5FHUeldq+pgTcgzuK8CAwEA +AQKCAQEAkJSaCFJXJlBqUiYF4QUVrVGfn7XCCbBQbEhJ3R1fMfWKzVh0Q3F1fJpL +SbB2J0tYOQ5VbFQc5D1oFqWuQVMZ3rFKgQo3F5J3F3K1F4J3F2K2F3J0F2K3F5J2 +F3K0F2J4F5K3F2J1F4K2F3J3F5K0F2J2F4K1F3J4F5K2F3J0F4K3F2J1F5K4F3J2 +F0K2F4J5F3K1F2J3F4K0F5J4F3K2F1J0F5K3F4J1F2K4F3J5F0K1F4J2F5K3F1J4 +F0K2F5J3F4K1F2J0F5K4F3J1F2K5F4J0F1K3F5J2F4K0F1J5F3K4F2J1F0K5F4J3 +F1K2F5J0F4K3F1J2F5K4F0J1F3K5F2J4F1K0F5J3F4K2F1J5F0K4F3J2F1KQKBgQD +4K5F2J1F0K5F3J4F2K1F5J0F4K3F1J2F5K4F0J1F3K5F2J4F1K0F5J3F4K2F1J5F0K4 +F3J2F1K0F5J4F3K2F1J0F5K4F3J1F2K5F4J0F1K3F5J2F4K0F1J5F3K4F2J1F0K5 +F4J3F1K2F5J0F4K3F1J2F5K4F0J1F3K5F2J4F1K0F5J3F4K2F1J5F0K4F3J2F1KQ +-----END RSA PRIVATE KEY-----` + + // Invalid certificate data (proper PEM format with valid base64 but invalid certificate) + invalidCertData := `-----BEGIN CERTIFICATE----- +YWJjZGVmZ2hpams= +-----END CERTIFICATE-----` + + tests := []struct { + name string + data []byte + wantErr bool + errMsg string + }{ + { + name: "empty data", + data: []byte{}, + wantErr: false, + }, + { + name: "nil data", + data: nil, + wantErr: false, + }, + { + name: "valid certificate", + data: []byte(validCert), + wantErr: false, + }, + { + name: "invalid PEM format", + data: []byte("not-a-pem-certificate"), + wantErr: true, + errMsg: "invalid PEM data: remaining non-PEM data found", + }, + { + name: "invalid certificate data", + data: []byte(invalidCertData), + wantErr: true, + errMsg: "failed to parse certificate", + }, + { + name: "PEM block with wrong type only", + data: []byte(validPrivateKey), + wantErr: true, + errMsg: "invalid PEM block type: RSA PRIVATE KEY, expected CERTIFICATE", + }, + { + name: "trailing non-PEM data after empty certificate block", + data: []byte("some-non-pem-data"), + wantErr: true, + errMsg: "invalid PEM data: remaining non-PEM data found", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := ValidatePEMCertificate(tt.data) + + if tt.wantErr { + assert.Error(t, err) + if tt.errMsg != "" { + assert.Contains(t, err.Error(), tt.errMsg) + } + } else { + assert.NoError(t, err) + } + }) + } +} diff --git a/sdk/apis/operator/v1alpha1/common.go b/sdk/apis/operator/v1alpha1/common.go index 22e70a1..41cbbfe 100644 --- a/sdk/apis/operator/v1alpha1/common.go +++ b/sdk/apis/operator/v1alpha1/common.go @@ -100,6 +100,9 @@ const ( ClientCA CA = "client" FrontProxyClientCA CA = "front-proxy-client" RequestHeaderClientCA CA = "requestheader-client" + + // CABundleCA is the CA used to validate the API server's TLS certificate. + CABundleCA CA = "ca-bundle" ) type CertificateTemplateMap map[string]CertificateTemplate @@ -134,8 +137,16 @@ type CertificateSpecTemplate struct { // +optional Subject *X509Subject `json:"subject,omitempty"` + // IssuerRef is a reference to the issuer for this certificate. + // + // +optional + IssuerRef *ObjectReference `json:"issuerRef"` + // Requested DNS subject alternative names. The values given here will be merged into the // DNS names determined automatically by the kcp-operator. + // If DNSNames is used together with IssuerRef, DNSNames will be uses as-is and not merged. + // If IssuerRef is not set, DNSNames will be merged with the defaults. This is to avoid + // trying to guess what DNSNames configued issuer might support. // // +optional DNSNames []string `json:"dnsNames,omitempty"` diff --git a/sdk/apis/operator/v1alpha1/frontproxy_types.go b/sdk/apis/operator/v1alpha1/frontproxy_types.go index 39e5253..2db6c83 100644 --- a/sdk/apis/operator/v1alpha1/frontproxy_types.go +++ b/sdk/apis/operator/v1alpha1/frontproxy_types.go @@ -49,6 +49,15 @@ type FrontProxySpec struct { // CertificateTemplates allows to customize the properties on the generated // certificates for this front-proxy. CertificateTemplates CertificateTemplateMap `json:"certificateTemplates,omitempty"` + + // CABundle references a v1.Secret object that contains the CA bundle + // that should be used to validate the API server's TLS certificate. + // The secret must contain a key named `tls.crt` that holds the PEM encoded CA certificate. + // It will be merged into the "external-logical-cluster-admin-kubeconfig" kubeconfig under the `certificate-authority-data` field. + // If not specified, the kubeconfig will use the CA bundle of the root shard or front-proxy referenced in the Target field. + // It will NOT be used to configure the API server's own TLS certificate or any other component. + // +optional + CABundleSecretRef *corev1.LocalObjectReference `json:"caBundleSecretRef,omitempty"` } type AuthSpec struct { diff --git a/sdk/apis/operator/v1alpha1/shard_types.go b/sdk/apis/operator/v1alpha1/shard_types.go index 8aab3ed..cde2944 100644 --- a/sdk/apis/operator/v1alpha1/shard_types.go +++ b/sdk/apis/operator/v1alpha1/shard_types.go @@ -29,8 +29,15 @@ type ShardSpec struct { } type CommonShardSpec struct { + // ClusterDomain is the DNS domain for services in the cluster. Defaults to "cluster.local" if not set. + // +optional ClusterDomain string `json:"clusterDomain,omitempty"` + // ShardBaseURL is the base URL under which this shard should be reachable. This is used to configure + // the external URL. If not provided, the operator will use kubernetes service address to generate it. + // +optional + ShardBaseURL string `json:"shardBaseURL"` + // Etcd configures the etcd cluster that this shard should be using. Etcd EtcdConfig `json:"etcd"` @@ -57,6 +64,15 @@ type CommonShardSpec struct { // Optional: DeploymentTemplate configures the Kubernetes Deployment created for this shard. DeploymentTemplate *DeploymentTemplate `json:"deploymentTemplate,omitempty"` + + // CABundle references a v1.Secret object that contains the CA bundle + // that should be used to validate the API server's TLS certificate. + // The secret must contain a key named `tls.crt` that holds the PEM encoded CA certificate. + // It will be merged into the "external-logical-cluster-admin-kubeconfig" kubeconfig under the `certificate-authority-data` field. + // If not specified, the kubeconfig will use the CA bundle of the root shard or front-proxy referenced in the Target field. + // It will NOT be used to configure the API server's own TLS certificate or any other component. + // +optional + CABundleSecretRef *corev1.LocalObjectReference `json:"caBundleSecretRef,omitempty"` } type AuditSpec struct { diff --git a/sdk/apis/operator/v1alpha1/zz_generated.deepcopy.go b/sdk/apis/operator/v1alpha1/zz_generated.deepcopy.go index de5e57e..9b49e73 100644 --- a/sdk/apis/operator/v1alpha1/zz_generated.deepcopy.go +++ b/sdk/apis/operator/v1alpha1/zz_generated.deepcopy.go @@ -336,6 +336,11 @@ func (in *CertificateSpecTemplate) DeepCopyInto(out *CertificateSpecTemplate) { *out = new(X509Subject) (*in).DeepCopyInto(*out) } + if in.IssuerRef != nil { + in, out := &in.IssuerRef, &out.IssuerRef + *out = new(ObjectReference) + **out = **in + } if in.DNSNames != nil { in, out := &in.DNSNames, &out.DNSNames *out = make([]string, len(*in)) @@ -500,6 +505,11 @@ func (in *CommonShardSpec) DeepCopyInto(out *CommonShardSpec) { *out = new(DeploymentTemplate) (*in).DeepCopyInto(*out) } + if in.CABundleSecretRef != nil { + in, out := &in.CABundleSecretRef, &out.CABundleSecretRef + *out = new(v1.LocalObjectReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonShardSpec. @@ -762,6 +772,11 @@ func (in *FrontProxySpec) DeepCopyInto(out *FrontProxySpec) { (*out)[key] = *val.DeepCopy() } } + if in.CABundleSecretRef != nil { + in, out := &in.CABundleSecretRef, &out.CABundleSecretRef + *out = new(v1.LocalObjectReference) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontProxySpec. diff --git a/sdk/applyconfiguration/internal/internal.go b/sdk/applyconfiguration/internal/internal.go index bb9c67e..26513c0 100644 --- a/sdk/applyconfiguration/internal/internal.go +++ b/sdk/applyconfiguration/internal/internal.go @@ -19,8 +19,8 @@ limitations under the License. package internal import ( - "fmt" - "sync" + fmt "fmt" + sync "sync" typed "sigs.k8s.io/structured-merge-diff/v4/typed" ) diff --git a/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go b/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go index 423363c..0afde59 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/auditwebhookspec.go @@ -21,25 +21,25 @@ package v1alpha1 import ( v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" ) // AuditWebhookSpecApplyConfiguration represents a declarative configuration of the AuditWebhookSpec type for use // with apply. type AuditWebhookSpecApplyConfiguration struct { - BatchBufferSize *int `json:"batchBufferSize,omitempty"` - BatchMaxSize *int `json:"batchMaxSize,omitempty"` - BatchMaxWait *v1.Duration `json:"batchMaxWait,omitempty"` - BatchThrottleBurst *int `json:"batchThrottleBurst,omitempty"` - BatchThrottleEnable *bool `json:"batchThrottleEnable,omitempty"` - BatchThrottleQPS *string `json:"batchThrottleQPS,omitempty"` - ConfigSecretName *string `json:"configSecretName,omitempty"` - InitialBackoff *v1.Duration `json:"initialBackoff,omitempty"` - Mode *v1alpha1.AuditWebhookMode `json:"mode,omitempty"` - TruncateEnabled *bool `json:"truncateEnabled,omitempty"` - TruncateMaxBatchSize *int `json:"truncateMaxBatchSize,omitempty"` - TruncateMaxEventSize *int `json:"truncateMaxEventSize,omitempty"` - Version *string `json:"version,omitempty"` + BatchBufferSize *int `json:"batchBufferSize,omitempty"` + BatchMaxSize *int `json:"batchMaxSize,omitempty"` + BatchMaxWait *v1.Duration `json:"batchMaxWait,omitempty"` + BatchThrottleBurst *int `json:"batchThrottleBurst,omitempty"` + BatchThrottleEnable *bool `json:"batchThrottleEnable,omitempty"` + BatchThrottleQPS *string `json:"batchThrottleQPS,omitempty"` + ConfigSecretName *string `json:"configSecretName,omitempty"` + InitialBackoff *v1.Duration `json:"initialBackoff,omitempty"` + Mode *operatorv1alpha1.AuditWebhookMode `json:"mode,omitempty"` + TruncateEnabled *bool `json:"truncateEnabled,omitempty"` + TruncateMaxBatchSize *int `json:"truncateMaxBatchSize,omitempty"` + TruncateMaxEventSize *int `json:"truncateMaxEventSize,omitempty"` + Version *string `json:"version,omitempty"` } // AuditWebhookSpecApplyConfiguration constructs a declarative configuration of the AuditWebhookSpec type for use with @@ -115,7 +115,7 @@ func (b *AuditWebhookSpecApplyConfiguration) WithInitialBackoff(value v1.Duratio // WithMode sets the Mode field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Mode field is set to the value of the last call. -func (b *AuditWebhookSpecApplyConfiguration) WithMode(value v1alpha1.AuditWebhookMode) *AuditWebhookSpecApplyConfiguration { +func (b *AuditWebhookSpecApplyConfiguration) WithMode(value operatorv1alpha1.AuditWebhookMode) *AuditWebhookSpecApplyConfiguration { b.Mode = &value return b } diff --git a/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go b/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go index 829e1db..9c3cedd 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go +++ b/sdk/applyconfiguration/operator/v1alpha1/cacheserver.go @@ -50,7 +50,7 @@ func CacheServer(name, namespace string) *CacheServerApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithKind(value string) *CacheServerApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -58,7 +58,7 @@ func (b *CacheServerApplyConfiguration) WithKind(value string) *CacheServerApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithAPIVersion(value string) *CacheServerApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -67,7 +67,7 @@ func (b *CacheServerApplyConfiguration) WithAPIVersion(value string) *CacheServe // If called multiple times, the Name field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithName(value string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -76,7 +76,7 @@ func (b *CacheServerApplyConfiguration) WithName(value string) *CacheServerApply // If called multiple times, the GenerateName field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithGenerateName(value string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -85,7 +85,7 @@ func (b *CacheServerApplyConfiguration) WithGenerateName(value string) *CacheSer // If called multiple times, the Namespace field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithNamespace(value string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -94,7 +94,7 @@ func (b *CacheServerApplyConfiguration) WithNamespace(value string) *CacheServer // If called multiple times, the UID field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithUID(value types.UID) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -103,7 +103,7 @@ func (b *CacheServerApplyConfiguration) WithUID(value types.UID) *CacheServerApp // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithResourceVersion(value string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -112,7 +112,7 @@ func (b *CacheServerApplyConfiguration) WithResourceVersion(value string) *Cache // If called multiple times, the Generation field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithGeneration(value int64) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -121,7 +121,7 @@ func (b *CacheServerApplyConfiguration) WithGeneration(value int64) *CacheServer // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -130,7 +130,7 @@ func (b *CacheServerApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -139,7 +139,7 @@ func (b *CacheServerApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *CacheServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -149,11 +149,11 @@ func (b *CacheServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int // overwriting an existing map entries in Labels field with the same key. func (b *CacheServerApplyConfiguration) WithLabels(entries map[string]string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -164,11 +164,11 @@ func (b *CacheServerApplyConfiguration) WithLabels(entries map[string]string) *C // overwriting an existing map entries in Annotations field with the same key. func (b *CacheServerApplyConfiguration) WithAnnotations(entries map[string]string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -182,7 +182,7 @@ func (b *CacheServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -193,7 +193,7 @@ func (b *CacheServerApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerR func (b *CacheServerApplyConfiguration) WithFinalizers(values ...string) *CacheServerApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -223,5 +223,5 @@ func (b *CacheServerApplyConfiguration) WithStatus(value operatorv1alpha1.CacheS // GetName retrieves the value of the Name field in the declarative configuration. func (b *CacheServerApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificateissuerref.go b/sdk/applyconfiguration/operator/v1alpha1/certificateissuerref.go new file mode 100644 index 0000000..a7940e6 --- /dev/null +++ b/sdk/applyconfiguration/operator/v1alpha1/certificateissuerref.go @@ -0,0 +1,57 @@ +/* +Copyright 2024 The KCP Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// CertificateIssuerRefApplyConfiguration represents a declarative configuration of the CertificateIssuerRef type for use +// with apply. +type CertificateIssuerRefApplyConfiguration struct { + Name *string `json:"name,omitempty"` + Kind *string `json:"kind,omitempty"` + Group *string `json:"group,omitempty"` +} + +// CertificateIssuerRefApplyConfiguration constructs a declarative configuration of the CertificateIssuerRef type for use with +// apply. +func CertificateIssuerRef() *CertificateIssuerRefApplyConfiguration { + return &CertificateIssuerRefApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *CertificateIssuerRefApplyConfiguration) WithName(value string) *CertificateIssuerRefApplyConfiguration { + b.Name = &value + return b +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *CertificateIssuerRefApplyConfiguration) WithKind(value string) *CertificateIssuerRefApplyConfiguration { + b.Kind = &value + return b +} + +// WithGroup sets the Group field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Group field is set to the value of the last call. +func (b *CertificateIssuerRefApplyConfiguration) WithGroup(value string) *CertificateIssuerRefApplyConfiguration { + b.Group = &value + return b +} diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go index 5af8a6e..edf6634 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificateprivatekeytemplate.go @@ -19,16 +19,16 @@ limitations under the License. package v1alpha1 import ( - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" ) // CertificatePrivateKeyTemplateApplyConfiguration represents a declarative configuration of the CertificatePrivateKeyTemplate type for use // with apply. type CertificatePrivateKeyTemplateApplyConfiguration struct { - RotationPolicy *v1alpha1.PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` - Encoding *v1alpha1.PrivateKeyEncoding `json:"encoding,omitempty"` - Algorithm *v1alpha1.PrivateKeyAlgorithm `json:"algorithm,omitempty"` - Size *int `json:"size,omitempty"` + RotationPolicy *operatorv1alpha1.PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` + Encoding *operatorv1alpha1.PrivateKeyEncoding `json:"encoding,omitempty"` + Algorithm *operatorv1alpha1.PrivateKeyAlgorithm `json:"algorithm,omitempty"` + Size *int `json:"size,omitempty"` } // CertificatePrivateKeyTemplateApplyConfiguration constructs a declarative configuration of the CertificatePrivateKeyTemplate type for use with @@ -40,7 +40,7 @@ func CertificatePrivateKeyTemplate() *CertificatePrivateKeyTemplateApplyConfigur // WithRotationPolicy sets the RotationPolicy field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the RotationPolicy field is set to the value of the last call. -func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithRotationPolicy(value v1alpha1.PrivateKeyRotationPolicy) *CertificatePrivateKeyTemplateApplyConfiguration { +func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithRotationPolicy(value operatorv1alpha1.PrivateKeyRotationPolicy) *CertificatePrivateKeyTemplateApplyConfiguration { b.RotationPolicy = &value return b } @@ -48,7 +48,7 @@ func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithRotationPolicy(val // WithEncoding sets the Encoding field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Encoding field is set to the value of the last call. -func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithEncoding(value v1alpha1.PrivateKeyEncoding) *CertificatePrivateKeyTemplateApplyConfiguration { +func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithEncoding(value operatorv1alpha1.PrivateKeyEncoding) *CertificatePrivateKeyTemplateApplyConfiguration { b.Encoding = &value return b } @@ -56,7 +56,7 @@ func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithEncoding(value v1a // WithAlgorithm sets the Algorithm field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Algorithm field is set to the value of the last call. -func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithAlgorithm(value v1alpha1.PrivateKeyAlgorithm) *CertificatePrivateKeyTemplateApplyConfiguration { +func (b *CertificatePrivateKeyTemplateApplyConfiguration) WithAlgorithm(value operatorv1alpha1.PrivateKeyAlgorithm) *CertificatePrivateKeyTemplateApplyConfiguration { b.Algorithm = &value return b } diff --git a/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go b/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go index e1bbae4..6da990b 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go +++ b/sdk/applyconfiguration/operator/v1alpha1/certificatespectemplate.go @@ -26,6 +26,7 @@ import ( // with apply. type CertificateSpecTemplateApplyConfiguration struct { Subject *X509SubjectApplyConfiguration `json:"subject,omitempty"` + IssuerRef *ObjectReferenceApplyConfiguration `json:"issuerRef,omitempty"` DNSNames []string `json:"dnsNames,omitempty"` IPAddresses []string `json:"ipAddresses,omitempty"` SecretTemplate *CertificateSecretTemplateApplyConfiguration `json:"secretTemplate,omitempty"` @@ -48,6 +49,14 @@ func (b *CertificateSpecTemplateApplyConfiguration) WithSubject(value *X509Subje return b } +// WithIssuerRef sets the IssuerRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the IssuerRef field is set to the value of the last call. +func (b *CertificateSpecTemplateApplyConfiguration) WithIssuerRef(value *ObjectReferenceApplyConfiguration) *CertificateSpecTemplateApplyConfiguration { + b.IssuerRef = value + return b +} + // WithDNSNames adds the given value to the DNSNames field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the DNSNames field. diff --git a/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go b/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go index 925430f..a5171cf 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/commonshardspec.go @@ -28,6 +28,7 @@ import ( // with apply. type CommonShardSpecApplyConfiguration struct { ClusterDomain *string `json:"clusterDomain,omitempty"` + ShardBaseURL *string `json:"shardBaseURL,omitempty"` Etcd *EtcdConfigApplyConfiguration `json:"etcd,omitempty"` Image *ImageSpecApplyConfiguration `json:"image,omitempty"` Replicas *int32 `json:"replicas,omitempty"` @@ -38,6 +39,7 @@ type CommonShardSpecApplyConfiguration struct { CertificateTemplates *operatorv1alpha1.CertificateTemplateMap `json:"certificateTemplates,omitempty"` ServiceTemplate *ServiceTemplateApplyConfiguration `json:"serviceTemplate,omitempty"` DeploymentTemplate *DeploymentTemplateApplyConfiguration `json:"deploymentTemplate,omitempty"` + CABundleSecretRef *v1.LocalObjectReference `json:"caBundleSecretRef,omitempty"` } // CommonShardSpecApplyConfiguration constructs a declarative configuration of the CommonShardSpec type for use with @@ -54,6 +56,14 @@ func (b *CommonShardSpecApplyConfiguration) WithClusterDomain(value string) *Com return b } +// WithShardBaseURL sets the ShardBaseURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ShardBaseURL field is set to the value of the last call. +func (b *CommonShardSpecApplyConfiguration) WithShardBaseURL(value string) *CommonShardSpecApplyConfiguration { + b.ShardBaseURL = &value + return b +} + // WithEtcd sets the Etcd field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Etcd field is set to the value of the last call. @@ -133,3 +143,11 @@ func (b *CommonShardSpecApplyConfiguration) WithDeploymentTemplate(value *Deploy b.DeploymentTemplate = value return b } + +// WithCABundleSecretRef sets the CABundleSecretRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CABundleSecretRef field is set to the value of the last call. +func (b *CommonShardSpecApplyConfiguration) WithCABundleSecretRef(value v1.LocalObjectReference) *CommonShardSpecApplyConfiguration { + b.CABundleSecretRef = &value + return b +} diff --git a/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go b/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go index 0437646..1fd9599 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go +++ b/sdk/applyconfiguration/operator/v1alpha1/frontproxy.go @@ -48,7 +48,7 @@ func FrontProxy(name, namespace string) *FrontProxyApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithKind(value string) *FrontProxyApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -56,7 +56,7 @@ func (b *FrontProxyApplyConfiguration) WithKind(value string) *FrontProxyApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithAPIVersion(value string) *FrontProxyApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -65,7 +65,7 @@ func (b *FrontProxyApplyConfiguration) WithAPIVersion(value string) *FrontProxyA // If called multiple times, the Name field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithName(value string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -74,7 +74,7 @@ func (b *FrontProxyApplyConfiguration) WithName(value string) *FrontProxyApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithGenerateName(value string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -83,7 +83,7 @@ func (b *FrontProxyApplyConfiguration) WithGenerateName(value string) *FrontProx // If called multiple times, the Namespace field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithNamespace(value string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -92,7 +92,7 @@ func (b *FrontProxyApplyConfiguration) WithNamespace(value string) *FrontProxyAp // If called multiple times, the UID field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithUID(value types.UID) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -101,7 +101,7 @@ func (b *FrontProxyApplyConfiguration) WithUID(value types.UID) *FrontProxyApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithResourceVersion(value string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -110,7 +110,7 @@ func (b *FrontProxyApplyConfiguration) WithResourceVersion(value string) *FrontP // If called multiple times, the Generation field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithGeneration(value int64) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -119,7 +119,7 @@ func (b *FrontProxyApplyConfiguration) WithGeneration(value int64) *FrontProxyAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithCreationTimestamp(value metav1.Time) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -128,7 +128,7 @@ func (b *FrontProxyApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -137,7 +137,7 @@ func (b *FrontProxyApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *FrontProxyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -147,11 +147,11 @@ func (b *FrontProxyApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *FrontProxyApplyConfiguration) WithLabels(entries map[string]string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -162,11 +162,11 @@ func (b *FrontProxyApplyConfiguration) WithLabels(entries map[string]string) *Fr // overwriting an existing map entries in Annotations field with the same key. func (b *FrontProxyApplyConfiguration) WithAnnotations(entries map[string]string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -180,7 +180,7 @@ func (b *FrontProxyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -191,7 +191,7 @@ func (b *FrontProxyApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *FrontProxyApplyConfiguration) WithFinalizers(values ...string) *FrontProxyApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -221,5 +221,5 @@ func (b *FrontProxyApplyConfiguration) WithStatus(value *FrontProxyStatusApplyCo // GetName retrieves the value of the Name field in the declarative configuration. func (b *FrontProxyApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go b/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go index 4d6127e..c2b1fa8 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/frontproxyspec.go @@ -37,6 +37,7 @@ type FrontProxySpecApplyConfiguration struct { ServiceTemplate *ServiceTemplateApplyConfiguration `json:"serviceTemplate,omitempty"` DeploymentTemplate *DeploymentTemplateApplyConfiguration `json:"deploymentTemplate,omitempty"` CertificateTemplates *operatorv1alpha1.CertificateTemplateMap `json:"certificateTemplates,omitempty"` + CABundleSecretRef *v1.LocalObjectReference `json:"caBundleSecretRef,omitempty"` } // FrontProxySpecApplyConfiguration constructs a declarative configuration of the FrontProxySpec type for use with @@ -129,3 +130,11 @@ func (b *FrontProxySpecApplyConfiguration) WithCertificateTemplates(value operat b.CertificateTemplates = &value return b } + +// WithCABundleSecretRef sets the CABundleSecretRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CABundleSecretRef field is set to the value of the last call. +func (b *FrontProxySpecApplyConfiguration) WithCABundleSecretRef(value v1.LocalObjectReference) *FrontProxySpecApplyConfiguration { + b.CABundleSecretRef = &value + return b +} diff --git a/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go b/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go index 64ea0e8..de34713 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/frontproxystatus.go @@ -21,14 +21,14 @@ package v1alpha1 import ( v1 "k8s.io/client-go/applyconfigurations/meta/v1" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" ) // FrontProxyStatusApplyConfiguration represents a declarative configuration of the FrontProxyStatus type for use // with apply. type FrontProxyStatusApplyConfiguration struct { - Phase *v1alpha1.FrontProxyPhase `json:"phase,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + Phase *operatorv1alpha1.FrontProxyPhase `json:"phase,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } // FrontProxyStatusApplyConfiguration constructs a declarative configuration of the FrontProxyStatus type for use with @@ -40,7 +40,7 @@ func FrontProxyStatus() *FrontProxyStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *FrontProxyStatusApplyConfiguration) WithPhase(value v1alpha1.FrontProxyPhase) *FrontProxyStatusApplyConfiguration { +func (b *FrontProxyStatusApplyConfiguration) WithPhase(value operatorv1alpha1.FrontProxyPhase) *FrontProxyStatusApplyConfiguration { b.Phase = &value return b } diff --git a/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go b/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go index 96b43c0..fbd7009 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go +++ b/sdk/applyconfiguration/operator/v1alpha1/kubeconfig.go @@ -50,7 +50,7 @@ func Kubeconfig(name, namespace string) *KubeconfigApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithKind(value string) *KubeconfigApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -58,7 +58,7 @@ func (b *KubeconfigApplyConfiguration) WithKind(value string) *KubeconfigApplyCo // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithAPIVersion(value string) *KubeconfigApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -67,7 +67,7 @@ func (b *KubeconfigApplyConfiguration) WithAPIVersion(value string) *KubeconfigA // If called multiple times, the Name field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithName(value string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -76,7 +76,7 @@ func (b *KubeconfigApplyConfiguration) WithName(value string) *KubeconfigApplyCo // If called multiple times, the GenerateName field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithGenerateName(value string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -85,7 +85,7 @@ func (b *KubeconfigApplyConfiguration) WithGenerateName(value string) *Kubeconfi // If called multiple times, the Namespace field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithNamespace(value string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -94,7 +94,7 @@ func (b *KubeconfigApplyConfiguration) WithNamespace(value string) *KubeconfigAp // If called multiple times, the UID field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithUID(value types.UID) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -103,7 +103,7 @@ func (b *KubeconfigApplyConfiguration) WithUID(value types.UID) *KubeconfigApply // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithResourceVersion(value string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -112,7 +112,7 @@ func (b *KubeconfigApplyConfiguration) WithResourceVersion(value string) *Kubeco // If called multiple times, the Generation field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithGeneration(value int64) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -121,7 +121,7 @@ func (b *KubeconfigApplyConfiguration) WithGeneration(value int64) *KubeconfigAp // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -130,7 +130,7 @@ func (b *KubeconfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -139,7 +139,7 @@ func (b *KubeconfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *KubeconfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -149,11 +149,11 @@ func (b *KubeconfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int6 // overwriting an existing map entries in Labels field with the same key. func (b *KubeconfigApplyConfiguration) WithLabels(entries map[string]string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -164,11 +164,11 @@ func (b *KubeconfigApplyConfiguration) WithLabels(entries map[string]string) *Ku // overwriting an existing map entries in Annotations field with the same key. func (b *KubeconfigApplyConfiguration) WithAnnotations(entries map[string]string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -182,7 +182,7 @@ func (b *KubeconfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -193,7 +193,7 @@ func (b *KubeconfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRe func (b *KubeconfigApplyConfiguration) WithFinalizers(values ...string) *KubeconfigApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -223,5 +223,5 @@ func (b *KubeconfigApplyConfiguration) WithStatus(value operatorv1alpha1.Kubecon // GetName retrieves the value of the Name field in the declarative configuration. func (b *KubeconfigApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshard.go b/sdk/applyconfiguration/operator/v1alpha1/rootshard.go index 1a108ef..2f2c6c9 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshard.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshard.go @@ -48,7 +48,7 @@ func RootShard(name, namespace string) *RootShardApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithKind(value string) *RootShardApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -56,7 +56,7 @@ func (b *RootShardApplyConfiguration) WithKind(value string) *RootShardApplyConf // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithAPIVersion(value string) *RootShardApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -65,7 +65,7 @@ func (b *RootShardApplyConfiguration) WithAPIVersion(value string) *RootShardApp // If called multiple times, the Name field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithName(value string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -74,7 +74,7 @@ func (b *RootShardApplyConfiguration) WithName(value string) *RootShardApplyConf // If called multiple times, the GenerateName field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithGenerateName(value string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -83,7 +83,7 @@ func (b *RootShardApplyConfiguration) WithGenerateName(value string) *RootShardA // If called multiple times, the Namespace field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithNamespace(value string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -92,7 +92,7 @@ func (b *RootShardApplyConfiguration) WithNamespace(value string) *RootShardAppl // If called multiple times, the UID field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithUID(value types.UID) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -101,7 +101,7 @@ func (b *RootShardApplyConfiguration) WithUID(value types.UID) *RootShardApplyCo // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithResourceVersion(value string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -110,7 +110,7 @@ func (b *RootShardApplyConfiguration) WithResourceVersion(value string) *RootSha // If called multiple times, the Generation field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithGeneration(value int64) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -119,7 +119,7 @@ func (b *RootShardApplyConfiguration) WithGeneration(value int64) *RootShardAppl // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithCreationTimestamp(value metav1.Time) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -128,7 +128,7 @@ func (b *RootShardApplyConfiguration) WithCreationTimestamp(value metav1.Time) * // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -137,7 +137,7 @@ func (b *RootShardApplyConfiguration) WithDeletionTimestamp(value metav1.Time) * // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *RootShardApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -147,11 +147,11 @@ func (b *RootShardApplyConfiguration) WithDeletionGracePeriodSeconds(value int64 // overwriting an existing map entries in Labels field with the same key. func (b *RootShardApplyConfiguration) WithLabels(entries map[string]string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -162,11 +162,11 @@ func (b *RootShardApplyConfiguration) WithLabels(entries map[string]string) *Roo // overwriting an existing map entries in Annotations field with the same key. func (b *RootShardApplyConfiguration) WithAnnotations(entries map[string]string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -180,7 +180,7 @@ func (b *RootShardApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -191,7 +191,7 @@ func (b *RootShardApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerRef func (b *RootShardApplyConfiguration) WithFinalizers(values ...string) *RootShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -221,5 +221,5 @@ func (b *RootShardApplyConfiguration) WithStatus(value *RootShardStatusApplyConf // GetName retrieves the value of the Name field in the declarative configuration. func (b *RootShardApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go b/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go index 26a4584..d7260b1 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshardspec.go @@ -44,7 +44,15 @@ func RootShardSpec() *RootShardSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClusterDomain field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithClusterDomain(value string) *RootShardSpecApplyConfiguration { - b.ClusterDomain = &value + b.CommonShardSpecApplyConfiguration.ClusterDomain = &value + return b +} + +// WithShardBaseURL sets the ShardBaseURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ShardBaseURL field is set to the value of the last call. +func (b *RootShardSpecApplyConfiguration) WithShardBaseURL(value string) *RootShardSpecApplyConfiguration { + b.CommonShardSpecApplyConfiguration.ShardBaseURL = &value return b } @@ -52,7 +60,7 @@ func (b *RootShardSpecApplyConfiguration) WithClusterDomain(value string) *RootS // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Etcd field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithEtcd(value *EtcdConfigApplyConfiguration) *RootShardSpecApplyConfiguration { - b.Etcd = value + b.CommonShardSpecApplyConfiguration.Etcd = value return b } @@ -60,7 +68,7 @@ func (b *RootShardSpecApplyConfiguration) WithEtcd(value *EtcdConfigApplyConfigu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Image field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithImage(value *ImageSpecApplyConfiguration) *RootShardSpecApplyConfiguration { - b.Image = value + b.CommonShardSpecApplyConfiguration.Image = value return b } @@ -68,7 +76,7 @@ func (b *RootShardSpecApplyConfiguration) WithImage(value *ImageSpecApplyConfigu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Replicas field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithReplicas(value int32) *RootShardSpecApplyConfiguration { - b.Replicas = &value + b.CommonShardSpecApplyConfiguration.Replicas = &value return b } @@ -76,7 +84,7 @@ func (b *RootShardSpecApplyConfiguration) WithReplicas(value int32) *RootShardSp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resources field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithResources(value v1.ResourceRequirements) *RootShardSpecApplyConfiguration { - b.Resources = &value + b.CommonShardSpecApplyConfiguration.Resources = &value return b } @@ -84,7 +92,7 @@ func (b *RootShardSpecApplyConfiguration) WithResources(value v1.ResourceRequire // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Audit field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithAudit(value *AuditSpecApplyConfiguration) *RootShardSpecApplyConfiguration { - b.Audit = value + b.CommonShardSpecApplyConfiguration.Audit = value return b } @@ -92,7 +100,7 @@ func (b *RootShardSpecApplyConfiguration) WithAudit(value *AuditSpecApplyConfigu // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Authorization field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithAuthorization(value *AuthorizationSpecApplyConfiguration) *RootShardSpecApplyConfiguration { - b.Authorization = value + b.CommonShardSpecApplyConfiguration.Authorization = value return b } @@ -100,7 +108,7 @@ func (b *RootShardSpecApplyConfiguration) WithAuthorization(value *Authorization // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Auth field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithAuth(value *AuthSpecApplyConfiguration) *RootShardSpecApplyConfiguration { - b.Auth = value + b.CommonShardSpecApplyConfiguration.Auth = value return b } @@ -108,7 +116,7 @@ func (b *RootShardSpecApplyConfiguration) WithAuth(value *AuthSpecApplyConfigura // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CertificateTemplates field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithCertificateTemplates(value operatorv1alpha1.CertificateTemplateMap) *RootShardSpecApplyConfiguration { - b.CertificateTemplates = &value + b.CommonShardSpecApplyConfiguration.CertificateTemplates = &value return b } @@ -116,7 +124,7 @@ func (b *RootShardSpecApplyConfiguration) WithCertificateTemplates(value operato // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServiceTemplate field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithServiceTemplate(value *ServiceTemplateApplyConfiguration) *RootShardSpecApplyConfiguration { - b.ServiceTemplate = value + b.CommonShardSpecApplyConfiguration.ServiceTemplate = value return b } @@ -124,7 +132,15 @@ func (b *RootShardSpecApplyConfiguration) WithServiceTemplate(value *ServiceTemp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeploymentTemplate field is set to the value of the last call. func (b *RootShardSpecApplyConfiguration) WithDeploymentTemplate(value *DeploymentTemplateApplyConfiguration) *RootShardSpecApplyConfiguration { - b.DeploymentTemplate = value + b.CommonShardSpecApplyConfiguration.DeploymentTemplate = value + return b +} + +// WithCABundleSecretRef sets the CABundleSecretRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CABundleSecretRef field is set to the value of the last call. +func (b *RootShardSpecApplyConfiguration) WithCABundleSecretRef(value v1.LocalObjectReference) *RootShardSpecApplyConfiguration { + b.CommonShardSpecApplyConfiguration.CABundleSecretRef = &value return b } diff --git a/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go b/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go index a10126b..50da544 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/rootshardstatus.go @@ -21,13 +21,13 @@ package v1alpha1 import ( v1 "k8s.io/client-go/applyconfigurations/meta/v1" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" ) // RootShardStatusApplyConfiguration represents a declarative configuration of the RootShardStatus type for use // with apply. type RootShardStatusApplyConfiguration struct { - Phase *v1alpha1.RootShardPhase `json:"phase,omitempty"` + Phase *operatorv1alpha1.RootShardPhase `json:"phase,omitempty"` Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` Shards []ShardReferenceApplyConfiguration `json:"shards,omitempty"` } @@ -41,7 +41,7 @@ func RootShardStatus() *RootShardStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *RootShardStatusApplyConfiguration) WithPhase(value v1alpha1.RootShardPhase) *RootShardStatusApplyConfiguration { +func (b *RootShardStatusApplyConfiguration) WithPhase(value operatorv1alpha1.RootShardPhase) *RootShardStatusApplyConfiguration { b.Phase = &value return b } diff --git a/sdk/applyconfiguration/operator/v1alpha1/shard.go b/sdk/applyconfiguration/operator/v1alpha1/shard.go index 83f8e63..cb3476e 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shard.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shard.go @@ -48,7 +48,7 @@ func Shard(name, namespace string) *ShardApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ShardApplyConfiguration) WithKind(value string) *ShardApplyConfiguration { - b.Kind = &value + b.TypeMetaApplyConfiguration.Kind = &value return b } @@ -56,7 +56,7 @@ func (b *ShardApplyConfiguration) WithKind(value string) *ShardApplyConfiguratio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the APIVersion field is set to the value of the last call. func (b *ShardApplyConfiguration) WithAPIVersion(value string) *ShardApplyConfiguration { - b.APIVersion = &value + b.TypeMetaApplyConfiguration.APIVersion = &value return b } @@ -65,7 +65,7 @@ func (b *ShardApplyConfiguration) WithAPIVersion(value string) *ShardApplyConfig // If called multiple times, the Name field is set to the value of the last call. func (b *ShardApplyConfiguration) WithName(value string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Name = &value + b.ObjectMetaApplyConfiguration.Name = &value return b } @@ -74,7 +74,7 @@ func (b *ShardApplyConfiguration) WithName(value string) *ShardApplyConfiguratio // If called multiple times, the GenerateName field is set to the value of the last call. func (b *ShardApplyConfiguration) WithGenerateName(value string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.GenerateName = &value + b.ObjectMetaApplyConfiguration.GenerateName = &value return b } @@ -83,7 +83,7 @@ func (b *ShardApplyConfiguration) WithGenerateName(value string) *ShardApplyConf // If called multiple times, the Namespace field is set to the value of the last call. func (b *ShardApplyConfiguration) WithNamespace(value string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Namespace = &value + b.ObjectMetaApplyConfiguration.Namespace = &value return b } @@ -92,7 +92,7 @@ func (b *ShardApplyConfiguration) WithNamespace(value string) *ShardApplyConfigu // If called multiple times, the UID field is set to the value of the last call. func (b *ShardApplyConfiguration) WithUID(value types.UID) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.UID = &value + b.ObjectMetaApplyConfiguration.UID = &value return b } @@ -101,7 +101,7 @@ func (b *ShardApplyConfiguration) WithUID(value types.UID) *ShardApplyConfigurat // If called multiple times, the ResourceVersion field is set to the value of the last call. func (b *ShardApplyConfiguration) WithResourceVersion(value string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.ResourceVersion = &value + b.ObjectMetaApplyConfiguration.ResourceVersion = &value return b } @@ -110,7 +110,7 @@ func (b *ShardApplyConfiguration) WithResourceVersion(value string) *ShardApplyC // If called multiple times, the Generation field is set to the value of the last call. func (b *ShardApplyConfiguration) WithGeneration(value int64) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.Generation = &value + b.ObjectMetaApplyConfiguration.Generation = &value return b } @@ -119,7 +119,7 @@ func (b *ShardApplyConfiguration) WithGeneration(value int64) *ShardApplyConfigu // If called multiple times, the CreationTimestamp field is set to the value of the last call. func (b *ShardApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.CreationTimestamp = &value + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value return b } @@ -128,7 +128,7 @@ func (b *ShardApplyConfiguration) WithCreationTimestamp(value metav1.Time) *Shar // If called multiple times, the DeletionTimestamp field is set to the value of the last call. func (b *ShardApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionTimestamp = &value + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value return b } @@ -137,7 +137,7 @@ func (b *ShardApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *Shar // If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. func (b *ShardApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - b.DeletionGracePeriodSeconds = &value + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value return b } @@ -147,11 +147,11 @@ func (b *ShardApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *S // overwriting an existing map entries in Labels field with the same key. func (b *ShardApplyConfiguration) WithLabels(entries map[string]string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) } for k, v := range entries { - b.Labels[k] = v + b.ObjectMetaApplyConfiguration.Labels[k] = v } return b } @@ -162,11 +162,11 @@ func (b *ShardApplyConfiguration) WithLabels(entries map[string]string) *ShardAp // overwriting an existing map entries in Annotations field with the same key. func (b *ShardApplyConfiguration) WithAnnotations(entries map[string]string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() - if b.Annotations == nil && len(entries) > 0 { - b.Annotations = make(map[string]string, len(entries)) + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) } for k, v := range entries { - b.Annotations[k] = v + b.ObjectMetaApplyConfiguration.Annotations[k] = v } return b } @@ -180,7 +180,7 @@ func (b *ShardApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen if values[i] == nil { panic("nil value passed to WithOwnerReferences") } - b.OwnerReferences = append(b.OwnerReferences, *values[i]) + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) } return b } @@ -191,7 +191,7 @@ func (b *ShardApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferen func (b *ShardApplyConfiguration) WithFinalizers(values ...string) *ShardApplyConfiguration { b.ensureObjectMetaApplyConfigurationExists() for i := range values { - b.Finalizers = append(b.Finalizers, values[i]) + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) } return b } @@ -221,5 +221,5 @@ func (b *ShardApplyConfiguration) WithStatus(value *ShardStatusApplyConfiguratio // GetName retrieves the value of the Name field in the declarative configuration. func (b *ShardApplyConfiguration) GetName() *string { b.ensureObjectMetaApplyConfigurationExists() - return b.Name + return b.ObjectMetaApplyConfiguration.Name } diff --git a/sdk/applyconfiguration/operator/v1alpha1/shardspec.go b/sdk/applyconfiguration/operator/v1alpha1/shardspec.go index ac67623..7ed32c8 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shardspec.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shardspec.go @@ -41,7 +41,15 @@ func ShardSpec() *ShardSpecApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ClusterDomain field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithClusterDomain(value string) *ShardSpecApplyConfiguration { - b.ClusterDomain = &value + b.CommonShardSpecApplyConfiguration.ClusterDomain = &value + return b +} + +// WithShardBaseURL sets the ShardBaseURL field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ShardBaseURL field is set to the value of the last call. +func (b *ShardSpecApplyConfiguration) WithShardBaseURL(value string) *ShardSpecApplyConfiguration { + b.CommonShardSpecApplyConfiguration.ShardBaseURL = &value return b } @@ -49,7 +57,7 @@ func (b *ShardSpecApplyConfiguration) WithClusterDomain(value string) *ShardSpec // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Etcd field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithEtcd(value *EtcdConfigApplyConfiguration) *ShardSpecApplyConfiguration { - b.Etcd = value + b.CommonShardSpecApplyConfiguration.Etcd = value return b } @@ -57,7 +65,7 @@ func (b *ShardSpecApplyConfiguration) WithEtcd(value *EtcdConfigApplyConfigurati // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Image field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithImage(value *ImageSpecApplyConfiguration) *ShardSpecApplyConfiguration { - b.Image = value + b.CommonShardSpecApplyConfiguration.Image = value return b } @@ -65,7 +73,7 @@ func (b *ShardSpecApplyConfiguration) WithImage(value *ImageSpecApplyConfigurati // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Replicas field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithReplicas(value int32) *ShardSpecApplyConfiguration { - b.Replicas = &value + b.CommonShardSpecApplyConfiguration.Replicas = &value return b } @@ -73,7 +81,7 @@ func (b *ShardSpecApplyConfiguration) WithReplicas(value int32) *ShardSpecApplyC // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Resources field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithResources(value v1.ResourceRequirements) *ShardSpecApplyConfiguration { - b.Resources = &value + b.CommonShardSpecApplyConfiguration.Resources = &value return b } @@ -81,7 +89,7 @@ func (b *ShardSpecApplyConfiguration) WithResources(value v1.ResourceRequirement // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Audit field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithAudit(value *AuditSpecApplyConfiguration) *ShardSpecApplyConfiguration { - b.Audit = value + b.CommonShardSpecApplyConfiguration.Audit = value return b } @@ -89,7 +97,7 @@ func (b *ShardSpecApplyConfiguration) WithAudit(value *AuditSpecApplyConfigurati // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Authorization field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithAuthorization(value *AuthorizationSpecApplyConfiguration) *ShardSpecApplyConfiguration { - b.Authorization = value + b.CommonShardSpecApplyConfiguration.Authorization = value return b } @@ -97,7 +105,7 @@ func (b *ShardSpecApplyConfiguration) WithAuthorization(value *AuthorizationSpec // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Auth field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithAuth(value *AuthSpecApplyConfiguration) *ShardSpecApplyConfiguration { - b.Auth = value + b.CommonShardSpecApplyConfiguration.Auth = value return b } @@ -105,7 +113,7 @@ func (b *ShardSpecApplyConfiguration) WithAuth(value *AuthSpecApplyConfiguration // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the CertificateTemplates field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithCertificateTemplates(value operatorv1alpha1.CertificateTemplateMap) *ShardSpecApplyConfiguration { - b.CertificateTemplates = &value + b.CommonShardSpecApplyConfiguration.CertificateTemplates = &value return b } @@ -113,7 +121,7 @@ func (b *ShardSpecApplyConfiguration) WithCertificateTemplates(value operatorv1a // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ServiceTemplate field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithServiceTemplate(value *ServiceTemplateApplyConfiguration) *ShardSpecApplyConfiguration { - b.ServiceTemplate = value + b.CommonShardSpecApplyConfiguration.ServiceTemplate = value return b } @@ -121,7 +129,15 @@ func (b *ShardSpecApplyConfiguration) WithServiceTemplate(value *ServiceTemplate // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DeploymentTemplate field is set to the value of the last call. func (b *ShardSpecApplyConfiguration) WithDeploymentTemplate(value *DeploymentTemplateApplyConfiguration) *ShardSpecApplyConfiguration { - b.DeploymentTemplate = value + b.CommonShardSpecApplyConfiguration.DeploymentTemplate = value + return b +} + +// WithCABundleSecretRef sets the CABundleSecretRef field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CABundleSecretRef field is set to the value of the last call. +func (b *ShardSpecApplyConfiguration) WithCABundleSecretRef(value v1.LocalObjectReference) *ShardSpecApplyConfiguration { + b.CommonShardSpecApplyConfiguration.CABundleSecretRef = &value return b } diff --git a/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go b/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go index 5ca300c..d4b1b35 100644 --- a/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go +++ b/sdk/applyconfiguration/operator/v1alpha1/shardstatus.go @@ -21,13 +21,13 @@ package v1alpha1 import ( v1 "k8s.io/client-go/applyconfigurations/meta/v1" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" ) // ShardStatusApplyConfiguration represents a declarative configuration of the ShardStatus type for use // with apply. type ShardStatusApplyConfiguration struct { - Phase *v1alpha1.ShardPhase `json:"phase,omitempty"` + Phase *operatorv1alpha1.ShardPhase `json:"phase,omitempty"` Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } @@ -40,7 +40,7 @@ func ShardStatus() *ShardStatusApplyConfiguration { // WithPhase sets the Phase field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Phase field is set to the value of the last call. -func (b *ShardStatusApplyConfiguration) WithPhase(value v1alpha1.ShardPhase) *ShardStatusApplyConfiguration { +func (b *ShardStatusApplyConfiguration) WithPhase(value operatorv1alpha1.ShardPhase) *ShardStatusApplyConfiguration { b.Phase = &value return b } diff --git a/sdk/clientset/versioned/clientset.go b/sdk/clientset/versioned/clientset.go index ecf3e5d..24bcfb2 100644 --- a/sdk/clientset/versioned/clientset.go +++ b/sdk/clientset/versioned/clientset.go @@ -19,8 +19,8 @@ limitations under the License. package versioned import ( - "fmt" - "net/http" + fmt "fmt" + http "net/http" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go b/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go index ccf2fab..cb0a79b 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/cacheserver.go @@ -19,14 +19,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" 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" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" scheme "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" ) @@ -38,33 +38,34 @@ type CacheServersGetter interface { // CacheServerInterface has methods to work with CacheServer resources. type CacheServerInterface interface { - Create(ctx context.Context, cacheServer *v1alpha1.CacheServer, opts v1.CreateOptions) (*v1alpha1.CacheServer, error) - Update(ctx context.Context, cacheServer *v1alpha1.CacheServer, opts v1.UpdateOptions) (*v1alpha1.CacheServer, error) + Create(ctx context.Context, cacheServer *operatorv1alpha1.CacheServer, opts v1.CreateOptions) (*operatorv1alpha1.CacheServer, error) + Update(ctx context.Context, cacheServer *operatorv1alpha1.CacheServer, opts v1.UpdateOptions) (*operatorv1alpha1.CacheServer, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, cacheServer *v1alpha1.CacheServer, opts v1.UpdateOptions) (*v1alpha1.CacheServer, error) + UpdateStatus(ctx context.Context, cacheServer *operatorv1alpha1.CacheServer, opts v1.UpdateOptions) (*operatorv1alpha1.CacheServer, 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) (*v1alpha1.CacheServer, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.CacheServerList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.CacheServer, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.CacheServerList, 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 *v1alpha1.CacheServer, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.CacheServer, err error) CacheServerExpansion } // cacheServers implements CacheServerInterface type cacheServers struct { - *gentype.ClientWithList[*v1alpha1.CacheServer, *v1alpha1.CacheServerList] + *gentype.ClientWithList[*operatorv1alpha1.CacheServer, *operatorv1alpha1.CacheServerList] } // newCacheServers returns a CacheServers func newCacheServers(c *OperatorV1alpha1Client, namespace string) *cacheServers { return &cacheServers{ - gentype.NewClientWithList[*v1alpha1.CacheServer, *v1alpha1.CacheServerList]( + gentype.NewClientWithList[*operatorv1alpha1.CacheServer, *operatorv1alpha1.CacheServerList]( "cacheservers", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.CacheServer { return &v1alpha1.CacheServer{} }, - func() *v1alpha1.CacheServerList { return &v1alpha1.CacheServerList{} }), + func() *operatorv1alpha1.CacheServer { return &operatorv1alpha1.CacheServer{} }, + func() *operatorv1alpha1.CacheServerList { return &operatorv1alpha1.CacheServerList{} }, + ), } } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go index 61978d4..a291667 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_cacheserver.go @@ -19,130 +19,35 @@ limitations under the License. package fake import ( - "context" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/typed/operator/v1alpha1" ) -// FakeCacheServers implements CacheServerInterface -type FakeCacheServers struct { +// fakeCacheServers implements CacheServerInterface +type fakeCacheServers struct { + *gentype.FakeClientWithList[*v1alpha1.CacheServer, *v1alpha1.CacheServerList] Fake *FakeOperatorV1alpha1 - ns string -} - -var cacheserversResource = v1alpha1.SchemeGroupVersion.WithResource("cacheservers") - -var cacheserversKind = v1alpha1.SchemeGroupVersion.WithKind("CacheServer") - -// Get takes name of the cacheServer, and returns the corresponding cacheServer object, and an error if there is any. -func (c *FakeCacheServers) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.CacheServer, err error) { - emptyResult := &v1alpha1.CacheServer{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(cacheserversResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.CacheServer), err -} - -// List takes label and field selectors, and returns the list of CacheServers that match those selectors. -func (c *FakeCacheServers) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.CacheServerList, err error) { - emptyResult := &v1alpha1.CacheServerList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(cacheserversResource, cacheserversKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.CacheServerList{ListMeta: obj.(*v1alpha1.CacheServerList).ListMeta} - for _, item := range obj.(*v1alpha1.CacheServerList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested cacheServers. -func (c *FakeCacheServers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(cacheserversResource, c.ns, opts)) - -} - -// Create takes the representation of a cacheServer and creates it. Returns the server's representation of the cacheServer, and an error, if there is any. -func (c *FakeCacheServers) Create(ctx context.Context, cacheServer *v1alpha1.CacheServer, opts v1.CreateOptions) (result *v1alpha1.CacheServer, err error) { - emptyResult := &v1alpha1.CacheServer{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(cacheserversResource, c.ns, cacheServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.CacheServer), err -} - -// Update takes the representation of a cacheServer and updates it. Returns the server's representation of the cacheServer, and an error, if there is any. -func (c *FakeCacheServers) Update(ctx context.Context, cacheServer *v1alpha1.CacheServer, opts v1.UpdateOptions) (result *v1alpha1.CacheServer, err error) { - emptyResult := &v1alpha1.CacheServer{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(cacheserversResource, c.ns, cacheServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.CacheServer), 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 *FakeCacheServers) UpdateStatus(ctx context.Context, cacheServer *v1alpha1.CacheServer, opts v1.UpdateOptions) (result *v1alpha1.CacheServer, err error) { - emptyResult := &v1alpha1.CacheServer{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(cacheserversResource, "status", c.ns, cacheServer, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.CacheServer), err -} - -// Delete takes name of the cacheServer and deletes it. Returns an error if one occurs. -func (c *FakeCacheServers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(cacheserversResource, c.ns, name, opts), &v1alpha1.CacheServer{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeCacheServers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(cacheserversResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.CacheServerList{}) - return err -} - -// Patch applies the patch and returns the patched cacheServer. -func (c *FakeCacheServers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.CacheServer, err error) { - emptyResult := &v1alpha1.CacheServer{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(cacheserversResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeCacheServers(fake *FakeOperatorV1alpha1, namespace string) operatorv1alpha1.CacheServerInterface { + return &fakeCacheServers{ + gentype.NewFakeClientWithList[*v1alpha1.CacheServer, *v1alpha1.CacheServerList]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("cacheservers"), + v1alpha1.SchemeGroupVersion.WithKind("CacheServer"), + func() *v1alpha1.CacheServer { return &v1alpha1.CacheServer{} }, + func() *v1alpha1.CacheServerList { return &v1alpha1.CacheServerList{} }, + func(dst, src *v1alpha1.CacheServerList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.CacheServerList) []*v1alpha1.CacheServer { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.CacheServerList, items []*v1alpha1.CacheServer) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.CacheServer), err } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go index aeb284d..c7ebd59 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_frontproxy.go @@ -19,130 +19,33 @@ limitations under the License. package fake import ( - "context" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/typed/operator/v1alpha1" ) -// FakeFrontProxies implements FrontProxyInterface -type FakeFrontProxies struct { +// fakeFrontProxies implements FrontProxyInterface +type fakeFrontProxies struct { + *gentype.FakeClientWithList[*v1alpha1.FrontProxy, *v1alpha1.FrontProxyList] Fake *FakeOperatorV1alpha1 - ns string -} - -var frontproxiesResource = v1alpha1.SchemeGroupVersion.WithResource("frontproxies") - -var frontproxiesKind = v1alpha1.SchemeGroupVersion.WithKind("FrontProxy") - -// Get takes name of the frontProxy, and returns the corresponding frontProxy object, and an error if there is any. -func (c *FakeFrontProxies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.FrontProxy, err error) { - emptyResult := &v1alpha1.FrontProxy{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(frontproxiesResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.FrontProxy), err -} - -// List takes label and field selectors, and returns the list of FrontProxies that match those selectors. -func (c *FakeFrontProxies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.FrontProxyList, err error) { - emptyResult := &v1alpha1.FrontProxyList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(frontproxiesResource, frontproxiesKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.FrontProxyList{ListMeta: obj.(*v1alpha1.FrontProxyList).ListMeta} - for _, item := range obj.(*v1alpha1.FrontProxyList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested frontProxies. -func (c *FakeFrontProxies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(frontproxiesResource, c.ns, opts)) - -} - -// Create takes the representation of a frontProxy and creates it. Returns the server's representation of the frontProxy, and an error, if there is any. -func (c *FakeFrontProxies) Create(ctx context.Context, frontProxy *v1alpha1.FrontProxy, opts v1.CreateOptions) (result *v1alpha1.FrontProxy, err error) { - emptyResult := &v1alpha1.FrontProxy{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(frontproxiesResource, c.ns, frontProxy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.FrontProxy), err -} - -// Update takes the representation of a frontProxy and updates it. Returns the server's representation of the frontProxy, and an error, if there is any. -func (c *FakeFrontProxies) Update(ctx context.Context, frontProxy *v1alpha1.FrontProxy, opts v1.UpdateOptions) (result *v1alpha1.FrontProxy, err error) { - emptyResult := &v1alpha1.FrontProxy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(frontproxiesResource, c.ns, frontProxy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.FrontProxy), 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 *FakeFrontProxies) UpdateStatus(ctx context.Context, frontProxy *v1alpha1.FrontProxy, opts v1.UpdateOptions) (result *v1alpha1.FrontProxy, err error) { - emptyResult := &v1alpha1.FrontProxy{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(frontproxiesResource, "status", c.ns, frontProxy, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.FrontProxy), err -} - -// Delete takes name of the frontProxy and deletes it. Returns an error if one occurs. -func (c *FakeFrontProxies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(frontproxiesResource, c.ns, name, opts), &v1alpha1.FrontProxy{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeFrontProxies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(frontproxiesResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.FrontProxyList{}) - return err -} - -// Patch applies the patch and returns the patched frontProxy. -func (c *FakeFrontProxies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.FrontProxy, err error) { - emptyResult := &v1alpha1.FrontProxy{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(frontproxiesResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeFrontProxies(fake *FakeOperatorV1alpha1, namespace string) operatorv1alpha1.FrontProxyInterface { + return &fakeFrontProxies{ + gentype.NewFakeClientWithList[*v1alpha1.FrontProxy, *v1alpha1.FrontProxyList]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("frontproxies"), + v1alpha1.SchemeGroupVersion.WithKind("FrontProxy"), + func() *v1alpha1.FrontProxy { return &v1alpha1.FrontProxy{} }, + func() *v1alpha1.FrontProxyList { return &v1alpha1.FrontProxyList{} }, + func(dst, src *v1alpha1.FrontProxyList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.FrontProxyList) []*v1alpha1.FrontProxy { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.FrontProxyList, items []*v1alpha1.FrontProxy) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.FrontProxy), err } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go index 7b68a24..f3143ed 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_kubeconfig.go @@ -19,130 +19,33 @@ limitations under the License. package fake import ( - "context" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/typed/operator/v1alpha1" ) -// FakeKubeconfigs implements KubeconfigInterface -type FakeKubeconfigs struct { +// fakeKubeconfigs implements KubeconfigInterface +type fakeKubeconfigs struct { + *gentype.FakeClientWithList[*v1alpha1.Kubeconfig, *v1alpha1.KubeconfigList] Fake *FakeOperatorV1alpha1 - ns string -} - -var kubeconfigsResource = v1alpha1.SchemeGroupVersion.WithResource("kubeconfigs") - -var kubeconfigsKind = v1alpha1.SchemeGroupVersion.WithKind("Kubeconfig") - -// Get takes name of the kubeconfig, and returns the corresponding kubeconfig object, and an error if there is any. -func (c *FakeKubeconfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Kubeconfig, err error) { - emptyResult := &v1alpha1.Kubeconfig{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(kubeconfigsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Kubeconfig), err -} - -// List takes label and field selectors, and returns the list of Kubeconfigs that match those selectors. -func (c *FakeKubeconfigs) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.KubeconfigList, err error) { - emptyResult := &v1alpha1.KubeconfigList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(kubeconfigsResource, kubeconfigsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.KubeconfigList{ListMeta: obj.(*v1alpha1.KubeconfigList).ListMeta} - for _, item := range obj.(*v1alpha1.KubeconfigList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested kubeconfigs. -func (c *FakeKubeconfigs) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(kubeconfigsResource, c.ns, opts)) - -} - -// Create takes the representation of a kubeconfig and creates it. Returns the server's representation of the kubeconfig, and an error, if there is any. -func (c *FakeKubeconfigs) Create(ctx context.Context, kubeconfig *v1alpha1.Kubeconfig, opts v1.CreateOptions) (result *v1alpha1.Kubeconfig, err error) { - emptyResult := &v1alpha1.Kubeconfig{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(kubeconfigsResource, c.ns, kubeconfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Kubeconfig), err -} - -// Update takes the representation of a kubeconfig and updates it. Returns the server's representation of the kubeconfig, and an error, if there is any. -func (c *FakeKubeconfigs) Update(ctx context.Context, kubeconfig *v1alpha1.Kubeconfig, opts v1.UpdateOptions) (result *v1alpha1.Kubeconfig, err error) { - emptyResult := &v1alpha1.Kubeconfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(kubeconfigsResource, c.ns, kubeconfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Kubeconfig), 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 *FakeKubeconfigs) UpdateStatus(ctx context.Context, kubeconfig *v1alpha1.Kubeconfig, opts v1.UpdateOptions) (result *v1alpha1.Kubeconfig, err error) { - emptyResult := &v1alpha1.Kubeconfig{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(kubeconfigsResource, "status", c.ns, kubeconfig, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Kubeconfig), err -} - -// Delete takes name of the kubeconfig and deletes it. Returns an error if one occurs. -func (c *FakeKubeconfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(kubeconfigsResource, c.ns, name, opts), &v1alpha1.Kubeconfig{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeKubeconfigs) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(kubeconfigsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.KubeconfigList{}) - return err -} - -// Patch applies the patch and returns the patched kubeconfig. -func (c *FakeKubeconfigs) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Kubeconfig, err error) { - emptyResult := &v1alpha1.Kubeconfig{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(kubeconfigsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeKubeconfigs(fake *FakeOperatorV1alpha1, namespace string) operatorv1alpha1.KubeconfigInterface { + return &fakeKubeconfigs{ + gentype.NewFakeClientWithList[*v1alpha1.Kubeconfig, *v1alpha1.KubeconfigList]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("kubeconfigs"), + v1alpha1.SchemeGroupVersion.WithKind("Kubeconfig"), + func() *v1alpha1.Kubeconfig { return &v1alpha1.Kubeconfig{} }, + func() *v1alpha1.KubeconfigList { return &v1alpha1.KubeconfigList{} }, + func(dst, src *v1alpha1.KubeconfigList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.KubeconfigList) []*v1alpha1.Kubeconfig { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.KubeconfigList, items []*v1alpha1.Kubeconfig) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.Kubeconfig), err } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go index e4c2c45..036e1ac 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go @@ -30,23 +30,23 @@ type FakeOperatorV1alpha1 struct { } func (c *FakeOperatorV1alpha1) CacheServers(namespace string) v1alpha1.CacheServerInterface { - return &FakeCacheServers{c, namespace} + return newFakeCacheServers(c, namespace) } func (c *FakeOperatorV1alpha1) FrontProxies(namespace string) v1alpha1.FrontProxyInterface { - return &FakeFrontProxies{c, namespace} + return newFakeFrontProxies(c, namespace) } func (c *FakeOperatorV1alpha1) Kubeconfigs(namespace string) v1alpha1.KubeconfigInterface { - return &FakeKubeconfigs{c, namespace} + return newFakeKubeconfigs(c, namespace) } func (c *FakeOperatorV1alpha1) RootShards(namespace string) v1alpha1.RootShardInterface { - return &FakeRootShards{c, namespace} + return newFakeRootShards(c, namespace) } func (c *FakeOperatorV1alpha1) Shards(namespace string) v1alpha1.ShardInterface { - return &FakeShards{c, namespace} + return newFakeShards(c, namespace) } // RESTClient returns a RESTClient that is used to communicate diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go index ef62f1c..a1bfbba 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_rootshard.go @@ -19,130 +19,33 @@ limitations under the License. package fake import ( - "context" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/typed/operator/v1alpha1" ) -// FakeRootShards implements RootShardInterface -type FakeRootShards struct { +// fakeRootShards implements RootShardInterface +type fakeRootShards struct { + *gentype.FakeClientWithList[*v1alpha1.RootShard, *v1alpha1.RootShardList] Fake *FakeOperatorV1alpha1 - ns string -} - -var rootshardsResource = v1alpha1.SchemeGroupVersion.WithResource("rootshards") - -var rootshardsKind = v1alpha1.SchemeGroupVersion.WithKind("RootShard") - -// Get takes name of the rootShard, and returns the corresponding rootShard object, and an error if there is any. -func (c *FakeRootShards) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.RootShard, err error) { - emptyResult := &v1alpha1.RootShard{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(rootshardsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.RootShard), err -} - -// List takes label and field selectors, and returns the list of RootShards that match those selectors. -func (c *FakeRootShards) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.RootShardList, err error) { - emptyResult := &v1alpha1.RootShardList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(rootshardsResource, rootshardsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.RootShardList{ListMeta: obj.(*v1alpha1.RootShardList).ListMeta} - for _, item := range obj.(*v1alpha1.RootShardList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested rootShards. -func (c *FakeRootShards) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(rootshardsResource, c.ns, opts)) - -} - -// Create takes the representation of a rootShard and creates it. Returns the server's representation of the rootShard, and an error, if there is any. -func (c *FakeRootShards) Create(ctx context.Context, rootShard *v1alpha1.RootShard, opts v1.CreateOptions) (result *v1alpha1.RootShard, err error) { - emptyResult := &v1alpha1.RootShard{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(rootshardsResource, c.ns, rootShard, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.RootShard), err -} - -// Update takes the representation of a rootShard and updates it. Returns the server's representation of the rootShard, and an error, if there is any. -func (c *FakeRootShards) Update(ctx context.Context, rootShard *v1alpha1.RootShard, opts v1.UpdateOptions) (result *v1alpha1.RootShard, err error) { - emptyResult := &v1alpha1.RootShard{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(rootshardsResource, c.ns, rootShard, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.RootShard), 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 *FakeRootShards) UpdateStatus(ctx context.Context, rootShard *v1alpha1.RootShard, opts v1.UpdateOptions) (result *v1alpha1.RootShard, err error) { - emptyResult := &v1alpha1.RootShard{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(rootshardsResource, "status", c.ns, rootShard, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.RootShard), err -} - -// Delete takes name of the rootShard and deletes it. Returns an error if one occurs. -func (c *FakeRootShards) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(rootshardsResource, c.ns, name, opts), &v1alpha1.RootShard{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeRootShards) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(rootshardsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.RootShardList{}) - return err -} - -// Patch applies the patch and returns the patched rootShard. -func (c *FakeRootShards) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.RootShard, err error) { - emptyResult := &v1alpha1.RootShard{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(rootshardsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeRootShards(fake *FakeOperatorV1alpha1, namespace string) operatorv1alpha1.RootShardInterface { + return &fakeRootShards{ + gentype.NewFakeClientWithList[*v1alpha1.RootShard, *v1alpha1.RootShardList]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("rootshards"), + v1alpha1.SchemeGroupVersion.WithKind("RootShard"), + func() *v1alpha1.RootShard { return &v1alpha1.RootShard{} }, + func() *v1alpha1.RootShardList { return &v1alpha1.RootShardList{} }, + func(dst, src *v1alpha1.RootShardList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.RootShardList) []*v1alpha1.RootShard { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.RootShardList, items []*v1alpha1.RootShard) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, } - return obj.(*v1alpha1.RootShard), err } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go index bb53c26..734f36a 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/fake/fake_shard.go @@ -19,130 +19,31 @@ limitations under the License. package fake import ( - "context" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - labels "k8s.io/apimachinery/pkg/labels" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - testing "k8s.io/client-go/testing" + gentype "k8s.io/client-go/gentype" v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/typed/operator/v1alpha1" ) -// FakeShards implements ShardInterface -type FakeShards struct { +// fakeShards implements ShardInterface +type fakeShards struct { + *gentype.FakeClientWithList[*v1alpha1.Shard, *v1alpha1.ShardList] Fake *FakeOperatorV1alpha1 - ns string -} - -var shardsResource = v1alpha1.SchemeGroupVersion.WithResource("shards") - -var shardsKind = v1alpha1.SchemeGroupVersion.WithKind("Shard") - -// Get takes name of the shard, and returns the corresponding shard object, and an error if there is any. -func (c *FakeShards) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.Shard, err error) { - emptyResult := &v1alpha1.Shard{} - obj, err := c.Fake. - Invokes(testing.NewGetActionWithOptions(shardsResource, c.ns, name, options), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Shard), err -} - -// List takes label and field selectors, and returns the list of Shards that match those selectors. -func (c *FakeShards) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ShardList, err error) { - emptyResult := &v1alpha1.ShardList{} - obj, err := c.Fake. - Invokes(testing.NewListActionWithOptions(shardsResource, shardsKind, c.ns, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - - label, _, _ := testing.ExtractFromListOptions(opts) - if label == nil { - label = labels.Everything() - } - list := &v1alpha1.ShardList{ListMeta: obj.(*v1alpha1.ShardList).ListMeta} - for _, item := range obj.(*v1alpha1.ShardList).Items { - if label.Matches(labels.Set(item.Labels)) { - list.Items = append(list.Items, item) - } - } - return list, err -} - -// Watch returns a watch.Interface that watches the requested shards. -func (c *FakeShards) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - return c.Fake. - InvokesWatch(testing.NewWatchActionWithOptions(shardsResource, c.ns, opts)) - -} - -// Create takes the representation of a shard and creates it. Returns the server's representation of the shard, and an error, if there is any. -func (c *FakeShards) Create(ctx context.Context, shard *v1alpha1.Shard, opts v1.CreateOptions) (result *v1alpha1.Shard, err error) { - emptyResult := &v1alpha1.Shard{} - obj, err := c.Fake. - Invokes(testing.NewCreateActionWithOptions(shardsResource, c.ns, shard, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Shard), err -} - -// Update takes the representation of a shard and updates it. Returns the server's representation of the shard, and an error, if there is any. -func (c *FakeShards) Update(ctx context.Context, shard *v1alpha1.Shard, opts v1.UpdateOptions) (result *v1alpha1.Shard, err error) { - emptyResult := &v1alpha1.Shard{} - obj, err := c.Fake. - Invokes(testing.NewUpdateActionWithOptions(shardsResource, c.ns, shard, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Shard), 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 *FakeShards) UpdateStatus(ctx context.Context, shard *v1alpha1.Shard, opts v1.UpdateOptions) (result *v1alpha1.Shard, err error) { - emptyResult := &v1alpha1.Shard{} - obj, err := c.Fake. - Invokes(testing.NewUpdateSubresourceActionWithOptions(shardsResource, "status", c.ns, shard, opts), emptyResult) - - if obj == nil { - return emptyResult, err - } - return obj.(*v1alpha1.Shard), err -} - -// Delete takes name of the shard and deletes it. Returns an error if one occurs. -func (c *FakeShards) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - _, err := c.Fake. - Invokes(testing.NewDeleteActionWithOptions(shardsResource, c.ns, name, opts), &v1alpha1.Shard{}) - - return err } -// DeleteCollection deletes a collection of objects. -func (c *FakeShards) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - action := testing.NewDeleteCollectionActionWithOptions(shardsResource, c.ns, opts, listOpts) - - _, err := c.Fake.Invokes(action, &v1alpha1.ShardList{}) - return err -} - -// Patch applies the patch and returns the patched shard. -func (c *FakeShards) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.Shard, err error) { - emptyResult := &v1alpha1.Shard{} - obj, err := c.Fake. - Invokes(testing.NewPatchSubresourceActionWithOptions(shardsResource, c.ns, name, pt, data, opts, subresources...), emptyResult) - - if obj == nil { - return emptyResult, err +func newFakeShards(fake *FakeOperatorV1alpha1, namespace string) operatorv1alpha1.ShardInterface { + return &fakeShards{ + gentype.NewFakeClientWithList[*v1alpha1.Shard, *v1alpha1.ShardList]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("shards"), + v1alpha1.SchemeGroupVersion.WithKind("Shard"), + func() *v1alpha1.Shard { return &v1alpha1.Shard{} }, + func() *v1alpha1.ShardList { return &v1alpha1.ShardList{} }, + func(dst, src *v1alpha1.ShardList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.ShardList) []*v1alpha1.Shard { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.ShardList, items []*v1alpha1.Shard) { list.Items = gentype.FromPointerSlice(items) }, + ), + fake, } - return obj.(*v1alpha1.Shard), err } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go b/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go index 3dec7d3..f80aff1 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/frontproxy.go @@ -19,14 +19,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" 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" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" scheme "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" ) @@ -38,33 +38,34 @@ type FrontProxiesGetter interface { // FrontProxyInterface has methods to work with FrontProxy resources. type FrontProxyInterface interface { - Create(ctx context.Context, frontProxy *v1alpha1.FrontProxy, opts v1.CreateOptions) (*v1alpha1.FrontProxy, error) - Update(ctx context.Context, frontProxy *v1alpha1.FrontProxy, opts v1.UpdateOptions) (*v1alpha1.FrontProxy, error) + Create(ctx context.Context, frontProxy *operatorv1alpha1.FrontProxy, opts v1.CreateOptions) (*operatorv1alpha1.FrontProxy, error) + Update(ctx context.Context, frontProxy *operatorv1alpha1.FrontProxy, opts v1.UpdateOptions) (*operatorv1alpha1.FrontProxy, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, frontProxy *v1alpha1.FrontProxy, opts v1.UpdateOptions) (*v1alpha1.FrontProxy, error) + UpdateStatus(ctx context.Context, frontProxy *operatorv1alpha1.FrontProxy, opts v1.UpdateOptions) (*operatorv1alpha1.FrontProxy, 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) (*v1alpha1.FrontProxy, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.FrontProxyList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.FrontProxy, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.FrontProxyList, 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 *v1alpha1.FrontProxy, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.FrontProxy, err error) FrontProxyExpansion } // frontProxies implements FrontProxyInterface type frontProxies struct { - *gentype.ClientWithList[*v1alpha1.FrontProxy, *v1alpha1.FrontProxyList] + *gentype.ClientWithList[*operatorv1alpha1.FrontProxy, *operatorv1alpha1.FrontProxyList] } // newFrontProxies returns a FrontProxies func newFrontProxies(c *OperatorV1alpha1Client, namespace string) *frontProxies { return &frontProxies{ - gentype.NewClientWithList[*v1alpha1.FrontProxy, *v1alpha1.FrontProxyList]( + gentype.NewClientWithList[*operatorv1alpha1.FrontProxy, *operatorv1alpha1.FrontProxyList]( "frontproxies", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.FrontProxy { return &v1alpha1.FrontProxy{} }, - func() *v1alpha1.FrontProxyList { return &v1alpha1.FrontProxyList{} }), + func() *operatorv1alpha1.FrontProxy { return &operatorv1alpha1.FrontProxy{} }, + func() *operatorv1alpha1.FrontProxyList { return &operatorv1alpha1.FrontProxyList{} }, + ), } } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go b/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go index 6e27b20..0537775 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/kubeconfig.go @@ -19,14 +19,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" 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" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" scheme "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" ) @@ -38,33 +38,34 @@ type KubeconfigsGetter interface { // KubeconfigInterface has methods to work with Kubeconfig resources. type KubeconfigInterface interface { - Create(ctx context.Context, kubeconfig *v1alpha1.Kubeconfig, opts v1.CreateOptions) (*v1alpha1.Kubeconfig, error) - Update(ctx context.Context, kubeconfig *v1alpha1.Kubeconfig, opts v1.UpdateOptions) (*v1alpha1.Kubeconfig, error) + Create(ctx context.Context, kubeconfig *operatorv1alpha1.Kubeconfig, opts v1.CreateOptions) (*operatorv1alpha1.Kubeconfig, error) + Update(ctx context.Context, kubeconfig *operatorv1alpha1.Kubeconfig, opts v1.UpdateOptions) (*operatorv1alpha1.Kubeconfig, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, kubeconfig *v1alpha1.Kubeconfig, opts v1.UpdateOptions) (*v1alpha1.Kubeconfig, error) + UpdateStatus(ctx context.Context, kubeconfig *operatorv1alpha1.Kubeconfig, opts v1.UpdateOptions) (*operatorv1alpha1.Kubeconfig, 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) (*v1alpha1.Kubeconfig, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.KubeconfigList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.Kubeconfig, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.KubeconfigList, 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 *v1alpha1.Kubeconfig, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.Kubeconfig, err error) KubeconfigExpansion } // kubeconfigs implements KubeconfigInterface type kubeconfigs struct { - *gentype.ClientWithList[*v1alpha1.Kubeconfig, *v1alpha1.KubeconfigList] + *gentype.ClientWithList[*operatorv1alpha1.Kubeconfig, *operatorv1alpha1.KubeconfigList] } // newKubeconfigs returns a Kubeconfigs func newKubeconfigs(c *OperatorV1alpha1Client, namespace string) *kubeconfigs { return &kubeconfigs{ - gentype.NewClientWithList[*v1alpha1.Kubeconfig, *v1alpha1.KubeconfigList]( + gentype.NewClientWithList[*operatorv1alpha1.Kubeconfig, *operatorv1alpha1.KubeconfigList]( "kubeconfigs", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.Kubeconfig { return &v1alpha1.Kubeconfig{} }, - func() *v1alpha1.KubeconfigList { return &v1alpha1.KubeconfigList{} }), + func() *operatorv1alpha1.Kubeconfig { return &operatorv1alpha1.Kubeconfig{} }, + func() *operatorv1alpha1.KubeconfigList { return &operatorv1alpha1.KubeconfigList{} }, + ), } } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go b/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go index eaeddeb..a0fc13d 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/operator_client.go @@ -19,12 +19,12 @@ limitations under the License. package v1alpha1 import ( - "net/http" + http "net/http" rest "k8s.io/client-go/rest" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" - "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + scheme "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" ) type OperatorV1alpha1Interface interface { @@ -106,10 +106,10 @@ func New(c rest.Interface) *OperatorV1alpha1Client { } func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion + gv := operatorv1alpha1.SchemeGroupVersion config.GroupVersion = &gv config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() if config.UserAgent == "" { config.UserAgent = rest.DefaultKubernetesUserAgent() diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go index 9f55236..ea0c4cf 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/rootshard.go @@ -19,14 +19,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" 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" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" scheme "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" ) @@ -38,33 +38,34 @@ type RootShardsGetter interface { // RootShardInterface has methods to work with RootShard resources. type RootShardInterface interface { - Create(ctx context.Context, rootShard *v1alpha1.RootShard, opts v1.CreateOptions) (*v1alpha1.RootShard, error) - Update(ctx context.Context, rootShard *v1alpha1.RootShard, opts v1.UpdateOptions) (*v1alpha1.RootShard, error) + Create(ctx context.Context, rootShard *operatorv1alpha1.RootShard, opts v1.CreateOptions) (*operatorv1alpha1.RootShard, error) + Update(ctx context.Context, rootShard *operatorv1alpha1.RootShard, opts v1.UpdateOptions) (*operatorv1alpha1.RootShard, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, rootShard *v1alpha1.RootShard, opts v1.UpdateOptions) (*v1alpha1.RootShard, error) + UpdateStatus(ctx context.Context, rootShard *operatorv1alpha1.RootShard, opts v1.UpdateOptions) (*operatorv1alpha1.RootShard, 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) (*v1alpha1.RootShard, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.RootShardList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.RootShard, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.RootShardList, 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 *v1alpha1.RootShard, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.RootShard, err error) RootShardExpansion } // rootShards implements RootShardInterface type rootShards struct { - *gentype.ClientWithList[*v1alpha1.RootShard, *v1alpha1.RootShardList] + *gentype.ClientWithList[*operatorv1alpha1.RootShard, *operatorv1alpha1.RootShardList] } // newRootShards returns a RootShards func newRootShards(c *OperatorV1alpha1Client, namespace string) *rootShards { return &rootShards{ - gentype.NewClientWithList[*v1alpha1.RootShard, *v1alpha1.RootShardList]( + gentype.NewClientWithList[*operatorv1alpha1.RootShard, *operatorv1alpha1.RootShardList]( "rootshards", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.RootShard { return &v1alpha1.RootShard{} }, - func() *v1alpha1.RootShardList { return &v1alpha1.RootShardList{} }), + func() *operatorv1alpha1.RootShard { return &operatorv1alpha1.RootShard{} }, + func() *operatorv1alpha1.RootShardList { return &operatorv1alpha1.RootShardList{} }, + ), } } diff --git a/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go b/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go index 3c98a2b..9cc4f42 100644 --- a/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go +++ b/sdk/clientset/versioned/typed/operator/v1alpha1/shard.go @@ -19,14 +19,14 @@ limitations under the License. package v1alpha1 import ( - "context" + context "context" 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" - v1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" + operatorv1alpha1 "github.com/kcp-dev/kcp-operator/sdk/apis/operator/v1alpha1" scheme "github.com/kcp-dev/kcp-operator/sdk/clientset/versioned/scheme" ) @@ -38,33 +38,34 @@ type ShardsGetter interface { // ShardInterface has methods to work with Shard resources. type ShardInterface interface { - Create(ctx context.Context, shard *v1alpha1.Shard, opts v1.CreateOptions) (*v1alpha1.Shard, error) - Update(ctx context.Context, shard *v1alpha1.Shard, opts v1.UpdateOptions) (*v1alpha1.Shard, error) + Create(ctx context.Context, shard *operatorv1alpha1.Shard, opts v1.CreateOptions) (*operatorv1alpha1.Shard, error) + Update(ctx context.Context, shard *operatorv1alpha1.Shard, opts v1.UpdateOptions) (*operatorv1alpha1.Shard, error) // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, shard *v1alpha1.Shard, opts v1.UpdateOptions) (*v1alpha1.Shard, error) + UpdateStatus(ctx context.Context, shard *operatorv1alpha1.Shard, opts v1.UpdateOptions) (*operatorv1alpha1.Shard, 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) (*v1alpha1.Shard, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ShardList, error) + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.Shard, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.ShardList, 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 *v1alpha1.Shard, err error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.Shard, err error) ShardExpansion } // shards implements ShardInterface type shards struct { - *gentype.ClientWithList[*v1alpha1.Shard, *v1alpha1.ShardList] + *gentype.ClientWithList[*operatorv1alpha1.Shard, *operatorv1alpha1.ShardList] } // newShards returns a Shards func newShards(c *OperatorV1alpha1Client, namespace string) *shards { return &shards{ - gentype.NewClientWithList[*v1alpha1.Shard, *v1alpha1.ShardList]( + gentype.NewClientWithList[*operatorv1alpha1.Shard, *operatorv1alpha1.ShardList]( "shards", c.RESTClient(), scheme.ParameterCodec, namespace, - func() *v1alpha1.Shard { return &v1alpha1.Shard{} }, - func() *v1alpha1.ShardList { return &v1alpha1.ShardList{} }), + func() *operatorv1alpha1.Shard { return &operatorv1alpha1.Shard{} }, + func() *operatorv1alpha1.ShardList { return &operatorv1alpha1.ShardList{} }, + ), } } diff --git a/sdk/go.mod b/sdk/go.mod index 4215fa9..211c83c 100644 --- a/sdk/go.mod +++ b/sdk/go.mod @@ -6,10 +6,10 @@ require ( github.com/kcp-dev/apimachinery/v2 v2.0.1-0.20250223115924-431177b024f3 github.com/kcp-dev/client-go v0.0.0-20250223133118-3dea338dc267 github.com/kcp-dev/logicalcluster/v3 v3.0.5 - k8s.io/api v0.31.6 - k8s.io/apimachinery v0.31.6 - k8s.io/client-go v0.31.6 - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 + k8s.io/api v0.32.0 + k8s.io/apimachinery v0.32.0 + k8s.io/client-go v0.32.0 + sigs.k8s.io/structured-merge-diff/v4 v4.5.0 ) require ( @@ -23,36 +23,35 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/gnostic-models v0.6.9 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect github.com/google/uuid v1.6.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/mailru/easyjson v0.7.7 // indirect + github.com/mailru/easyjson v0.9.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/onsi/ginkgo/v2 v2.20.0 // indirect - github.com/onsi/gomega v1.34.1 // indirect github.com/pkg/errors v0.9.1 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace // indirect + github.com/stretchr/testify v1.10.0 // indirect github.com/x448/float16 v0.8.4 // indirect - golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 // indirect golang.org/x/net v0.38.0 // indirect - golang.org/x/oauth2 v0.27.0 // indirect - golang.org/x/sys v0.31.0 // indirect - golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect - golang.org/x/time v0.6.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/oauth2 v0.28.0 // indirect + golang.org/x/sys v0.33.0 // indirect + golang.org/x/term v0.32.0 // indirect + golang.org/x/text v0.25.0 // indirect + golang.org/x/time v0.8.0 // indirect + golang.org/x/tools v0.28.0 // indirect + google.golang.org/protobuf v1.36.0 // 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/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect - k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect + k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect + sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/sdk/go.sum b/sdk/go.sum index 9ab376b..a68d4e4 100644 --- a/sdk/go.sum +++ b/sdk/go.sum @@ -22,16 +22,16 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= -github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw= +github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea h1:VcIYpAGBae3Z6BVncE0OnTE/ZjlDXqtYhOZky88neLM= github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= -github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo= +github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= 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/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -50,8 +50,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= +github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -59,23 +59,23 @@ 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.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= -github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= -github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= -github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/onsi/ginkgo/v2 v2.21.0 h1:7rg/4f3rB88pb5obDgNZrNHrQ4e6WpjonchcpuBRnZM= +github.com/onsi/ginkgo/v2 v2.21.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/gomega v1.35.1 h1:Cwbd75ZBPxFSuZ6T+rN/WCb/gOc6YgFBXLlZLhC7Ds4= +github.com/onsi/gomega v1.35.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= 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/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/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/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace h1:9PNP1jnUjRhfmGMlkXHjYPishpcw4jpSt/V/xYY3FMA= github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= @@ -83,8 +83,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= -golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -93,36 +91,36 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M= -golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= +golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc= +golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= -golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= -golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= -golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= -golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= -golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= +golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= +golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 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= @@ -130,26 +128,23 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP 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= -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.31.6 h1:ocWG/UhC9Mqp5oEfYWy9wCddbZiZyBAFTlBt0LVlhDg= -k8s.io/api v0.31.6/go.mod h1:i16xSiKMgVIVhsJMxfWq0mJbXA+Z7KhjPgYmwT41hl4= -k8s.io/apimachinery v0.31.6 h1:Pn96A0wHD0X8+l7QTdAzdLQPrpav1s8rU6A+v2/9UEY= -k8s.io/apimachinery v0.31.6/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.6 h1:51HT40qVIZ13BrHKeWxFuU52uoPnFhxTYJnv4+LTgp4= -k8s.io/client-go v0.31.6/go.mod h1:MEq7JQJelUQ0/4fMoPEUrc/OOFyGo/9LmGA38H6O6xY= +k8s.io/api v0.32.0 h1:OL9JpbvAU5ny9ga2fb24X8H6xQlVp+aJMFlgtQjR9CE= +k8s.io/api v0.32.0/go.mod h1:4LEwHZEf6Q/cG96F3dqR965sYOfmPM7rq81BLgsE0p0= +k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg= +k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/client-go v0.32.0 h1:DimtMcnN/JIKZcrSrstiwvvZvLjG0aSxy8PxN8IChp8= +k8s.io/client-go v0.32.0/go.mod h1:boDWvdM1Drk4NJj/VddSLnx59X3OPgwrOo0vGbtq9+8= 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-20240903163716-9e1beecbcb38 h1:1dWzkmJrrprYvjGwh9kEUxmcUV/CtNU8QM7h1FLWQOo= -k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38/go.mod h1:coRQXBK9NxO98XUv3ZD6AK3xzHCxV6+b7lrquKwaKzA= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 h1:MDF6h2H/h4tbzmtIKTuctcwZmY0tY9mD9fNT47QO6HI= -k8s.io/utils v0.0.0-20240921022957-49e7df575cb6/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -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= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 h1:hcha5B1kVACrLujCKLbr8XWMxCxzQx42DY8QKYJrDLg= +k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7/go.mod h1:GewRfANuJ70iYzvn+i4lezLDAFzvjxZYK1gn1lWcfas= +k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJJI8IUa1AmH/qa0= +k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= +sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= +sigs.k8s.io/structured-merge-diff/v4 v4.5.0 h1:nbCitCK2hfnhyiKo6uf2HxUPTCodY6Qaf85SbDIaMBk= +sigs.k8s.io/structured-merge-diff/v4 v4.5.0/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/test/e2e/frontproxies/frontproxies_test.go b/test/e2e/frontproxies/frontproxies_test.go index 311c057..0cb356f 100644 --- a/test/e2e/frontproxies/frontproxies_test.go +++ b/test/e2e/frontproxies/frontproxies_test.go @@ -73,14 +73,14 @@ func TestCreateFrontProxy(t *testing.T) { Groups: []string{"system:masters"}, } - t.Log("Creating kubeconfig for FrontProxy…") + t.Log("Creating kubeconfig for FrontProxy...") if err := client.Create(ctx, &fpConfig); err != nil { t.Fatal(err) } utils.WaitForObject(t, ctx, client, &corev1.Secret{}, types.NamespacedName{Namespace: fpConfig.Namespace, Name: fpConfig.Spec.SecretRef.Name}) // verify that we can use frontproxy kubeconfig to access rootshard workspaces - t.Log("Connecting to FrontProxy…") + t.Log("Connecting to FrontProxy...") kcpClient := utils.ConnectWithKubeconfig(t, ctx, client, namespace.Name, fpConfig.Name) // proof of life: list something every logicalcluster in kcp has t.Log("Should be able to list Secrets.") diff --git a/test/e2e/rootshards/proxy_test.go b/test/e2e/rootshards/proxy_test.go index 919f4c1..e12ed87 100644 --- a/test/e2e/rootshards/proxy_test.go +++ b/test/e2e/rootshards/proxy_test.go @@ -80,22 +80,22 @@ func TestRootShardProxy(t *testing.T) { Groups: []string{"system:kcp:admin"}, } - t.Log("Creating kubeconfig for RootShard…") + t.Log("Creating kubeconfig for RootShard...") if err := client.Create(ctx, &rsConfig); err != nil { t.Fatal(err) } utils.WaitForObject(t, ctx, client, &corev1.Secret{}, types.NamespacedName{Namespace: rsConfig.Namespace, Name: rsConfig.Spec.SecretRef.Name}) - t.Log("Connecting to RootShard…") + t.Log("Connecting to RootShard...") rootShardClient := utils.ConnectWithKubeconfig(t, ctx, client, namespace.Name, rsConfig.Name) // wait until the 2nd shard has registered itself successfully at the root shard shardKey := types.NamespacedName{Name: shardName} - t.Log("Waiting for Shard to register itself on the RootShard…") + t.Log("Waiting for Shard to register itself on the RootShard...") utils.WaitForObject(t, ctx, rootShardClient, &kcpcorev1alpha1.Shard{}, shardKey) // create workspace that we want to have scheduled onto the 2nd shard - t.Log("Creating workspace with its logicalcluster on the 2nd Shard…") + t.Log("Creating workspace with its logicalcluster on the 2nd Shard...") workspace := &kcptenancyv1alpha1.Workspace{ ObjectMeta: metav1.ObjectMeta{ Name: "test", diff --git a/test/e2e/rootshards/rootshards_test.go b/test/e2e/rootshards/rootshards_test.go index e5d1007..799d136 100644 --- a/test/e2e/rootshards/rootshards_test.go +++ b/test/e2e/rootshards/rootshards_test.go @@ -63,13 +63,13 @@ func TestCreateRootShard(t *testing.T) { Groups: []string{"system:masters"}, } - t.Log("Creating kubeconfig for RootShard…") + t.Log("Creating kubeconfig for RootShard...") if err := client.Create(ctx, &rsConfig); err != nil { t.Fatal(err) } utils.WaitForObject(t, ctx, client, &corev1.Secret{}, types.NamespacedName{Namespace: rsConfig.Namespace, Name: rsConfig.Spec.SecretRef.Name}) - t.Log("Connecting to RootShard…") + t.Log("Connecting to RootShard...") kcpClient := utils.ConnectWithKubeconfig(t, ctx, client, namespace.Name, rsConfig.Name) // proof of life: list something every logicalcluster in kcp has diff --git a/test/e2e/shards/shards_test.go b/test/e2e/shards/shards_test.go index 5d7632f..0d2b7a8 100644 --- a/test/e2e/shards/shards_test.go +++ b/test/e2e/shards/shards_test.go @@ -73,18 +73,18 @@ func TestCreateShard(t *testing.T) { Groups: []string{"system:masters"}, } - t.Log("Creating kubeconfig for RootShard…") + t.Log("Creating kubeconfig for RootShard...") if err := client.Create(ctx, &rsConfig); err != nil { t.Fatal(err) } utils.WaitForObject(t, ctx, client, &corev1.Secret{}, types.NamespacedName{Namespace: rsConfig.Namespace, Name: rsConfig.Spec.SecretRef.Name}) - t.Log("Connecting to RootShard…") + t.Log("Connecting to RootShard...") rootShardClient := utils.ConnectWithKubeconfig(t, ctx, client, namespace.Name, rsConfig.Name) // wait until the 2nd shard has registered itself successfully at the root shard shardKey := types.NamespacedName{Name: shardName} - t.Log("Waiting for Shard to register itself on the RootShard…") + t.Log("Waiting for Shard to register itself on the RootShard...") utils.WaitForObject(t, ctx, rootShardClient, &kcpcorev1alpha1.Shard{}, shardKey) // create a kubeconfig to access the shard @@ -108,13 +108,13 @@ func TestCreateShard(t *testing.T) { Groups: []string{"system:masters"}, } - t.Log("Creating kubeconfig for Shard…") + t.Log("Creating kubeconfig for Shard...") if err := client.Create(ctx, &shardConfig); err != nil { t.Fatal(err) } utils.WaitForObject(t, ctx, client, &corev1.Secret{}, types.NamespacedName{Namespace: shardConfig.Namespace, Name: shardConfig.Spec.SecretRef.Name}) - t.Log("Connecting to Shard…") + t.Log("Connecting to Shard...") kcpClient := utils.ConnectWithKubeconfig(t, ctx, client, namespace.Name, shardConfig.Name) // proof of life: list something every logicalcluster in kcp has diff --git a/test/utils/deploy.go b/test/utils/deploy.go index 0b5a62f..e8f4dab 100644 --- a/test/utils/deploy.go +++ b/test/utils/deploy.go @@ -34,7 +34,7 @@ func DeployEtcd(t *testing.T, name, namespace string) string { helmChart := os.Getenv("ETCD_HELM_CHART") - t.Logf("Installing etcd %q into %s…", name, namespace) + t.Logf("Installing etcd %q into %s...", name, namespace) args := []string{"install", "--namespace", namespace, "--atomic", name, helmChart} helmCommand := os.Getenv("HELM_BINARY") @@ -46,7 +46,7 @@ func DeployEtcd(t *testing.T, name, namespace string) string { t.Fatalf("Failed to deploy etcd: %v", err) } - t.Log("Waiting for etcd to get ready…") + t.Log("Waiting for etcd to get ready...") args = []string{ "wait", "pods", @@ -108,7 +108,7 @@ func DeployShard(ctx context.Context, t *testing.T, client ctrlruntimeclient.Cli patch(&shard) } - t.Logf("Creating Shard %s…", shard.Name) + t.Logf("Creating Shard %s...", shard.Name) if err := client.Create(ctx, &shard); err != nil { t.Fatal(err) } @@ -180,7 +180,7 @@ func DeployRootShard(ctx context.Context, t *testing.T, client ctrlruntimeclient patch(&rootShard) } - t.Logf("Creating RootShard %s…", rootShard.Name) + t.Logf("Creating RootShard %s...", rootShard.Name) if err := client.Create(ctx, &rootShard); err != nil { t.Fatal(err) } @@ -233,7 +233,7 @@ func DeployFrontProxy(ctx context.Context, t *testing.T, client ctrlruntimeclien patch(&frontProxy) } - t.Logf("Creating FrontProxy %s…", frontProxy.Name) + t.Logf("Creating FrontProxy %s...", frontProxy.Name) if err := client.Create(ctx, &frontProxy); err != nil { t.Fatal(err) } diff --git a/test/utils/utils.go b/test/utils/utils.go index ea59fa5..51e8f09 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -21,6 +21,7 @@ import ( "fmt" "net" "net/url" + "os" "os/exec" "strconv" "strings" @@ -105,13 +106,17 @@ func CreateSelfDestructingNamespace(t *testing.T, ctx context.Context, client ct ns := corev1.Namespace{} ns.Name = fmt.Sprintf("e2e-%s", name) - t.Logf("Creating namespace %s…", name) + t.Logf("Creating namespace %s...", name) if err := client.Create(ctx, &ns); err != nil { t.Fatal(err) } t.Cleanup(func() { - t.Logf("Deleting namespace %s…", name) + if NoTeardown() { + t.Logf("Skipping teardown of namespace %s", name) + return + } + t.Logf("Deleting namespace %s", ns.Name) if err := client.Delete(ctx, &ns); err != nil { t.Fatal(err) } @@ -137,7 +142,7 @@ func SelfDestuctingPortForward( fmt.Sprintf("%d:%d", localPort, targetPort), } - t.Logf("Exposing %s:%d on port %d…", target, targetPort, localPort) + t.Logf("Exposing %s:%d on port %d...", target, targetPort, localPort) localCtx, cancel := context.WithCancel(ctx) @@ -279,3 +284,7 @@ func ConnectWithRootShardProxy( return kcpClient } + +func NoTeardown() bool { + return os.Getenv("NO_TEARDOWN") != "" +} diff --git a/test/utils/wait.go b/test/utils/wait.go index 32e3afc..2f38718 100644 --- a/test/utils/wait.go +++ b/test/utils/wait.go @@ -30,7 +30,7 @@ import ( func WaitForPods(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, listOpts ...ctrlruntimeclient.ListOption) { t.Helper() - t.Log("Waiting for pods to be available…") + t.Log("Waiting for pods to be available...") err := wait.PollUntilContextTimeout(ctx, 500*time.Millisecond, 5*time.Minute, false, func(ctx context.Context) (done bool, err error) { pods := corev1.PodList{} @@ -69,7 +69,7 @@ func podIsReady(pod corev1.Pod) bool { func WaitForObject(t *testing.T, ctx context.Context, client ctrlruntimeclient.Client, obj ctrlruntimeclient.Object, key types.NamespacedName) { t.Helper() - t.Logf("Waiting for %T to be available…", obj) + t.Logf("Waiting for %T to be available...", obj) err := wait.PollUntilContextTimeout(ctx, 500*time.Millisecond, 3*time.Minute, false, func(ctx context.Context) (done bool, err error) { err = client.Get(ctx, key, obj)