From 52b88c07fb887f890dde1938fddcffd5940edf26 Mon Sep 17 00:00:00 2001 From: Kajol Asabe <114986456+kasabe28@users.noreply.github.com> Date: Wed, 25 Sep 2024 16:52:04 +0530 Subject: [PATCH] Update to `github.com/gardener/gardener@v1.101.0` (#605) * Update to `github.com/gardener/gardener@v1.101.0` * resolving conflicts * fix add options extension class * Update changes for imageVector * rebasing with main --------- Co-authored-by: ushabelgur --- .../app/app.go | 10 +-- ...tensions.gardener.cloud_backupbuckets.yaml | 7 ++ ...tensions.gardener.cloud_backupentries.yaml | 7 ++ ...rd-extensions.gardener.cloud_bastions.yaml | 7 ++ ...ions.gardener.cloud_containerruntimes.yaml | 7 ++ ...tensions.gardener.cloud_controlplanes.yaml | 7 ++ ...-extensions.gardener.cloud_dnsrecords.yaml | 7 ++ ...-extensions.gardener.cloud_extensions.yaml | 7 ++ ...nsions.gardener.cloud_infrastructures.yaml | 7 ++ ...rd-extensions.gardener.cloud_networks.yaml | 7 ++ ...gardener.cloud_operatingsystemconfigs.yaml | 85 ++++++++++++++++++- ...crd-extensions.gardener.cloud_workers.yaml | 9 +- go.mod | 12 +-- go.sum | 24 +++--- hack/api-reference/api.md | 12 +++ imagevector/imagevector.go | 2 +- pkg/admission/validator/shoot.go | 2 +- pkg/apis/ironcore/helper/scheme.go | 4 +- pkg/controller/backupbucket/add.go | 4 + pkg/controller/backupentry/add.go | 4 + pkg/controller/bastion/add.go | 4 + pkg/controller/controlplane/valuesprovider.go | 2 +- pkg/controller/infrastructure/add.go | 4 + pkg/controller/worker/add.go | 4 + pkg/controller/worker/machine_images.go | 5 +- pkg/webhook/controlplane/ensurer_test.go | 2 +- 26 files changed, 217 insertions(+), 35 deletions(-) diff --git a/cmd/gardener-extension-provider-ironcore/app/app.go b/cmd/gardener-extension-provider-ironcore/app/app.go index 2c2ea8ee..85b429e4 100644 --- a/cmd/gardener-extension-provider-ironcore/app/app.go +++ b/cmd/gardener-extension-provider-ironcore/app/app.go @@ -214,11 +214,11 @@ func NewControllerManagerCommand(ctx context.Context) *cobra.Command { bastionCtrlOpts.Completed().Apply(&bastioncontroller.DefaultAddOptions.Controller) backupBucketCtrlOpts.Completed().Apply(&backupbucketcontroller.DefaultAddOptions.Controller) backupEntryCtrlOpts.Completed().Apply(&backupentrycontroller.DefaultAddOptions.Controller) - reconcileOpts.Completed().Apply(&bastioncontroller.DefaultAddOptions.IgnoreOperationAnnotation) - reconcileOpts.Completed().Apply(&infrastructurecontroller.DefaultAddOptions.IgnoreOperationAnnotation) - reconcileOpts.Completed().Apply(&workercontroller.DefaultAddOptions.IgnoreOperationAnnotation) - reconcileOpts.Completed().Apply(&backupbucketcontroller.DefaultAddOptions.IgnoreOperationAnnotation) - reconcileOpts.Completed().Apply(&backupentrycontroller.DefaultAddOptions.IgnoreOperationAnnotation) + reconcileOpts.Completed().Apply(&bastioncontroller.DefaultAddOptions.IgnoreOperationAnnotation, &bastioncontroller.DefaultAddOptions.ExtensionClass) + reconcileOpts.Completed().Apply(&infrastructurecontroller.DefaultAddOptions.IgnoreOperationAnnotation, &infrastructurecontroller.DefaultAddOptions.ExtensionClass) + reconcileOpts.Completed().Apply(&workercontroller.DefaultAddOptions.IgnoreOperationAnnotation, &workercontroller.DefaultAddOptions.ExtensionClass) + reconcileOpts.Completed().Apply(&backupbucketcontroller.DefaultAddOptions.IgnoreOperationAnnotation, &backupbucketcontroller.DefaultAddOptions.ExtensionClass) + reconcileOpts.Completed().Apply(&backupentrycontroller.DefaultAddOptions.IgnoreOperationAnnotation, &backupentrycontroller.DefaultAddOptions.ExtensionClass) workercontroller.DefaultAddOptions.GardenCluster = gardenCluster if _, err := webhookOptions.Completed().AddToManager(ctx, mgr, nil); err != nil { diff --git a/example/20-crd-extensions.gardener.cloud_backupbuckets.yaml b/example/20-crd-extensions.gardener.cloud_backupbuckets.yaml index f4fb5195..c3399dba 100644 --- a/example/20-crd-extensions.gardener.cloud_backupbuckets.yaml +++ b/example/20-crd-extensions.gardener.cloud_backupbuckets.yaml @@ -61,6 +61,13 @@ spec: Specification of the BackupBucket. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf providerConfig: description: ProviderConfig is the provider specific configuration. type: object diff --git a/example/20-crd-extensions.gardener.cloud_backupentries.yaml b/example/20-crd-extensions.gardener.cloud_backupentries.yaml index 1354b6a5..6b695ed4 100644 --- a/example/20-crd-extensions.gardener.cloud_backupentries.yaml +++ b/example/20-crd-extensions.gardener.cloud_backupentries.yaml @@ -75,6 +75,13 @@ spec: description: BucketName is the name of backup bucket for this Backup Entry. type: string + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf providerConfig: description: ProviderConfig is the provider specific configuration. type: object diff --git a/example/20-crd-extensions.gardener.cloud_bastions.yaml b/example/20-crd-extensions.gardener.cloud_bastions.yaml index db997d3f..27e96706 100644 --- a/example/20-crd-extensions.gardener.cloud_bastions.yaml +++ b/example/20-crd-extensions.gardener.cloud_bastions.yaml @@ -56,6 +56,13 @@ spec: Spec is the specification of this Bastion. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf ingress: description: Ingress controls from where the created bastion host should be reachable. diff --git a/example/20-crd-extensions.gardener.cloud_containerruntimes.yaml b/example/20-crd-extensions.gardener.cloud_containerruntimes.yaml index 3fa52fd3..c3518b18 100644 --- a/example/20-crd-extensions.gardener.cloud_containerruntimes.yaml +++ b/example/20-crd-extensions.gardener.cloud_containerruntimes.yaml @@ -61,6 +61,13 @@ spec: description: BinaryPath is the Worker's machine path where container runtime extensions should copy the binaries to. type: string + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf providerConfig: description: ProviderConfig is the provider specific configuration. type: object diff --git a/example/20-crd-extensions.gardener.cloud_controlplanes.yaml b/example/20-crd-extensions.gardener.cloud_controlplanes.yaml index 8d06f082..477c5584 100644 --- a/example/20-crd-extensions.gardener.cloud_controlplanes.yaml +++ b/example/20-crd-extensions.gardener.cloud_controlplanes.yaml @@ -60,6 +60,13 @@ spec: Specification of the ControlPlane. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf infrastructureProviderStatus: description: |- InfrastructureProviderStatus contains the provider status that has diff --git a/example/20-crd-extensions.gardener.cloud_dnsrecords.yaml b/example/20-crd-extensions.gardener.cloud_dnsrecords.yaml index 62800170..7ecd62e2 100644 --- a/example/20-crd-extensions.gardener.cloud_dnsrecords.yaml +++ b/example/20-crd-extensions.gardener.cloud_dnsrecords.yaml @@ -62,6 +62,13 @@ spec: Specification of the DNSRecord. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf name: description: Name is the fully qualified domain name, e.g. "api.". This field is immutable. diff --git a/example/20-crd-extensions.gardener.cloud_extensions.yaml b/example/20-crd-extensions.gardener.cloud_extensions.yaml index 1ceb7c33..5ce99da6 100644 --- a/example/20-crd-extensions.gardener.cloud_extensions.yaml +++ b/example/20-crd-extensions.gardener.cloud_extensions.yaml @@ -56,6 +56,13 @@ spec: Specification of the Extension. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf providerConfig: description: ProviderConfig is the provider specific configuration. type: object diff --git a/example/20-crd-extensions.gardener.cloud_infrastructures.yaml b/example/20-crd-extensions.gardener.cloud_infrastructures.yaml index aaa94c15..63636892 100644 --- a/example/20-crd-extensions.gardener.cloud_infrastructures.yaml +++ b/example/20-crd-extensions.gardener.cloud_infrastructures.yaml @@ -60,6 +60,13 @@ spec: Specification of the Infrastructure. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf providerConfig: description: ProviderConfig is the provider specific configuration. type: object diff --git a/example/20-crd-extensions.gardener.cloud_networks.yaml b/example/20-crd-extensions.gardener.cloud_networks.yaml index 3d64d101..097fbdfe 100644 --- a/example/20-crd-extensions.gardener.cloud_networks.yaml +++ b/example/20-crd-extensions.gardener.cloud_networks.yaml @@ -62,6 +62,13 @@ spec: Specification of the Network. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf ipFamilies: description: |- IPFamilies specifies the IP protocol versions to use for shoot networking. This field is immutable. diff --git a/example/20-crd-extensions.gardener.cloud_operatingsystemconfigs.yaml b/example/20-crd-extensions.gardener.cloud_operatingsystemconfigs.yaml index 44723dff..f9595e8a 100644 --- a/example/20-crd-extensions.gardener.cloud_operatingsystemconfigs.yaml +++ b/example/20-crd-extensions.gardener.cloud_operatingsystemconfigs.yaml @@ -61,14 +61,95 @@ spec: Specification of the OperatingSystemConfig. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf criConfig: description: CRI config is a structure contains configurations of the CRI library properties: + containerd: + description: |- + ContainerdConfig is the containerd configuration. + Only to be set for OperatingSystemConfigs with purpose 'reconcile'. + properties: + registries: + description: Registries configures the registry hosts for + containerd. + items: + description: RegistryConfig contains registry configuration + options. + properties: + hosts: + description: |- + Hosts are the registry hosts. + It corresponds to the host fields in the `hosts.toml` file, see https://github.com/containerd/containerd/blob/c51463010e0682f76dfdc10edc095e6596e2764b/docs/hosts.md#host-fields-in-the-toml-table-format for more information. + items: + description: RegistryHost contains configuration values + for a registry host. + properties: + caCerts: + description: CACerts are paths to public key certificates + used for TLS. + items: + type: string + type: array + capabilities: + description: |- + Capabilities determine what operations a host is + capable of performing. Defaults to + - pull + - resolve + items: + description: RegistryCapability specifies an + action a client can perform against a registry. + type: string + type: array + url: + description: URL is the endpoint address of the + registry mirror. + type: string + required: + - url + type: object + type: array + readinessProbe: + description: ReadinessProbe determines if host registry + endpoints should be probed before they are added to + the containerd config. + type: boolean + server: + description: |- + Server is the URL to registry server of this upstream. + It corresponds to the server field in the `hosts.toml` file, see https://github.com/containerd/containerd/blob/c51463010e0682f76dfdc10edc095e6596e2764b/docs/hosts.md#server-field for more information. + type: string + upstream: + description: Upstream is the upstream name of the registry. + type: string + required: + - upstream + type: object + type: array + sandboxImage: + description: SandboxImage configures the sandbox image for + containerd. + type: string + required: + - sandboxImage + type: object name: description: Name is a mandatory string containing the name of the CRI library. Supported values are `containerd`. + enum: + - containerd type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf required: - name type: object @@ -141,7 +222,7 @@ spec: permissions: description: |- Permissions describes with which permissions the file should get written to the file system. - Should be defaulted to octal 0644. + If no permissions are set, the operating system's defaults are used. format: int32 type: integer required: @@ -355,7 +436,7 @@ spec: permissions: description: |- Permissions describes with which permissions the file should get written to the file system. - Should be defaulted to octal 0644. + If no permissions are set, the operating system's defaults are used. format: int32 type: integer required: diff --git a/example/20-crd-extensions.gardener.cloud_workers.yaml b/example/20-crd-extensions.gardener.cloud_workers.yaml index fd6f7158..156ca831 100644 --- a/example/20-crd-extensions.gardener.cloud_workers.yaml +++ b/example/20-crd-extensions.gardener.cloud_workers.yaml @@ -58,6 +58,13 @@ spec: Specification of the Worker. If the object's deletion timestamp is set, this field is immutable. properties: + class: + description: Class holds the extension class used to control the responsibility + for multiple provider extensions. + type: string + x-kubernetes-validations: + - message: Value is immutable + rule: self == oldSelf infrastructureProviderStatus: description: |- InfrastructureProviderStatus is a raw extension field that contains the provider status that has @@ -286,7 +293,7 @@ spec: when a new machine/VM that is part of this worker pool shall be spawned. Either this or UserDataSecretRef must be provided. Deprecated: This field will be removed in future release. - TODO(rfranzke): Remove this field after v1.100 has been released. + TODO(rfranzke): Remove this field after v1.104 has been released. format: byte type: string userDataSecretRef: diff --git a/go.mod b/go.mod index 606f58e6..d45c2be4 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/coreos/butane v0.21.0 github.com/coreos/go-systemd/v22 v22.5.0 github.com/gardener/etcd-druid v0.22.4 - github.com/gardener/gardener v1.99.1 + github.com/gardener/gardener v1.101.0 github.com/gardener/machine-controller-manager v0.53.1 github.com/go-logr/logr v1.4.2 github.com/imdario/mergo v0.3.16 @@ -32,7 +32,7 @@ require ( k8s.io/code-generator v0.29.9 k8s.io/component-base v0.29.9 k8s.io/kubelet v0.29.9 - k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 sigs.k8s.io/controller-runtime v0.17.6 sigs.k8s.io/controller-tools v0.14.0 sigs.k8s.io/yaml v1.4.0 @@ -126,7 +126,7 @@ require ( golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect golang.org/x/text v0.18.0 // indirect - golang.org/x/time v0.5.0 // indirect + golang.org/x/time v0.6.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237 // indirect google.golang.org/protobuf v1.34.1 // indirect @@ -134,14 +134,14 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect helm.sh/helm/v3 v3.14.4 // indirect - istio.io/api v1.22.2 // indirect + istio.io/api v1.22.3 // indirect istio.io/client-go v1.22.0 // indirect k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect k8s.io/klog v1.0.0 // indirect k8s.io/klog/v2 v2.120.1 // indirect - k8s.io/kube-aggregator v0.29.6 // indirect + k8s.io/kube-aggregator v0.29.7 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/metrics v0.29.6 // indirect + k8s.io/metrics v0.29.7 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 9180c3e8..e60983b8 100644 --- a/go.sum +++ b/go.sum @@ -112,8 +112,8 @@ github.com/gardener/cert-management v0.15.0 h1:ohm1eWae2rQSkwFGWXTt+lBv4rLBhtJsJ github.com/gardener/cert-management v0.15.0/go.mod h1:3BK2VEtGwv2ijf3bSziTLMCUvYnPzIQrQ/uPeZzL4m0= github.com/gardener/etcd-druid v0.22.4 h1:pd9G17EkMiR3xDR5jIhSfxElicn3SIavQTw1kq1bxNI= github.com/gardener/etcd-druid v0.22.4/go.mod h1:FROhfVKyWBo4krlPe3R6FIhJRmOmijEWBdEeUP0CJjE= -github.com/gardener/gardener v1.99.1 h1:c/wVXYgt4j7eHCMwxpQPPpaLXt1BY/IPYStfCtNsR8Q= -github.com/gardener/gardener v1.99.1/go.mod h1:XboPwJptOg9ZfXTjuohGk7X8kxnF0o88gJnz6Ed7Vqc= +github.com/gardener/gardener v1.101.0 h1:ZWpRfhl6IIq3VfpanUnYaP2LSeeDcBY+sxesVFQT55U= +github.com/gardener/gardener v1.101.0/go.mod h1:xoSdYcjUEUg5H5sQepb3jApml6QWHQCmWsFwBMm06fA= github.com/gardener/hvpa-controller/api v0.15.0 h1:igsalL5Z6kFMn1+Kv1Eq0cRjYW+4oBA1aEY/yDO2QtI= github.com/gardener/hvpa-controller/api v0.15.0/go.mod h1:fqb4wNrQLESDKpm7ppXyCM2Gvx96wRlLL35aH0ge07U= github.com/gardener/machine-controller-manager v0.53.1 h1:4P9qtzoD+989Lhc8XaI6Zo3X2TaQVXgHHrbEpuhJcrI= @@ -508,8 +508,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.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-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -611,8 +611,8 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -istio.io/api v1.22.2 h1:b02rTNfbnsEK2HMH/kfuXHTzovSmqcL5cAj2TSklPcQ= -istio.io/api v1.22.2/go.mod h1:S3l8LWqNYS9yT+d4bH+jqzH2lMencPkW7SKM1Cu9EyM= +istio.io/api v1.22.3 h1:V59wgcCm2fK2r137QBsddCDHNg0efg/DauIWEB9DFz8= +istio.io/api v1.22.3/go.mod h1:S3l8LWqNYS9yT+d4bH+jqzH2lMencPkW7SKM1Cu9EyM= istio.io/client-go v1.22.0 h1:TQ+Y7hqZVQHvaJXF99Q1jBqnVG7gYAHR9IvCK2nlwfE= istio.io/client-go v1.22.0/go.mod h1:1lAPr0DOVBbnRQqLAQKxWbEaxFk6b1CJTm+ypnP7sMo= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= @@ -647,18 +647,18 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-aggregator v0.29.6 h1:jZJjYF58F6kVuGC/kqLfuu7qGHqc2hoVKsDnRj26QRs= -k8s.io/kube-aggregator v0.29.6/go.mod h1:a6z0yORlXVXtGfsVB5PCjh2Soq1S7Wc6fApU6/T2eCE= +k8s.io/kube-aggregator v0.29.7 h1:KD6/K64zAPo3nH7a3tumN0jc0vgaYEdB0mJ9ZwxmY/A= +k8s.io/kube-aggregator v0.29.7/go.mod h1:izFeKn6G9BJStPlpHOXEqFqzkC5Mft8YRlJMtrZcGqw= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/kubelet v0.29.9 h1:Qbnz4otarQi5E8Z80Y3Y8AY5wfyc6WQjUQ6hU302gPQ= k8s.io/kubelet v0.29.9/go.mod h1:jOTCkSUkzTu6t5SvxcSDAg3n4bZy3+mCOe87WJ3NS58= -k8s.io/metrics v0.29.6 h1:kjMGPYxtCi4OO0fUar76y0CiUoeGYDNmUV0LXJIis4Q= -k8s.io/metrics v0.29.6/go.mod h1:vqGzOaYGuNSSAI7GM1+v6L5z8aAUSzui1W0eQB3wVJY= +k8s.io/metrics v0.29.7 h1:/oMPdVL7dt+lF8W6lXTg9gIKz1dDKgVBfDnJwgyJrhk= +k8s.io/metrics v0.29.7/go.mod h1:5AiYPn1Crd25wtTh7OxHg9Rm2t9THSXJVp3Lb2k7MB8= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= -k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= sigs.k8s.io/controller-runtime v0.17.6 h1:12IXsozEsIXWAMRpgRlYS1jjAHQXHtWEOMdULh3DbEw= sigs.k8s.io/controller-runtime v0.17.6/go.mod h1:N0jpP5Lo7lMTF9aL56Z/B2oWBJjey6StQM0jRbKQXtY= diff --git a/hack/api-reference/api.md b/hack/api-reference/api.md index 54d7771a..a33301ae 100644 --- a/hack/api-reference/api.md +++ b/hack/api-reference/api.md @@ -179,6 +179,18 @@ Kubernetes core/v1.LocalObjectReference

NetworkRef references the network to use for the Shoot creation.

+ + +natPortsPerNetworkInterface
+ +int32 + + + +

NATPortsPerNetworkInterface defines the minimum number of ports per network interface the NAT gateway should use. +Has to be a power of 2. If empty, 2048 is the default.

+ +

CloudControllerManagerConfig diff --git a/imagevector/imagevector.go b/imagevector/imagevector.go index 3df85c96..a4e69b2b 100644 --- a/imagevector/imagevector.go +++ b/imagevector/imagevector.go @@ -22,7 +22,7 @@ func init() { imageVector, err = imagevector.Read([]byte(imagesYAML)) runtime.Must(err) - imageVector, err = imagevector.WithEnvOverride(imageVector) + imageVector, err = imagevector.WithEnvOverride(imageVector, imagevector.OverrideEnv) runtime.Must(err) } diff --git a/pkg/admission/validator/shoot.go b/pkg/admission/validator/shoot.go index 2b5b7dfb..1c1c411e 100644 --- a/pkg/admission/validator/shoot.go +++ b/pkg/admission/validator/shoot.go @@ -143,7 +143,7 @@ func newValidationContext(ctx context.Context, decoder runtime.Decoder, c client } cloudProfile := &gardencorev1beta1.CloudProfile{} - if err := c.Get(ctx, client.ObjectKey{Name: shoot.Spec.CloudProfileName}, cloudProfile); err != nil { + if err := c.Get(ctx, client.ObjectKey{Name: shoot.Spec.CloudProfile.Name}, cloudProfile); err != nil { return nil, err } diff --git a/pkg/apis/ironcore/helper/scheme.go b/pkg/apis/ironcore/helper/scheme.go index 74adcd65..b0815169 100644 --- a/pkg/apis/ironcore/helper/scheme.go +++ b/pkg/apis/ironcore/helper/scheme.go @@ -8,10 +8,10 @@ import ( "github.com/gardener/gardener/extensions/pkg/controller" extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" - kutil "github.com/gardener/gardener/pkg/utils/kubernetes" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/serializer" utilruntime "k8s.io/apimachinery/pkg/util/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" api "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore" "github.com/ironcore-dev/gardener-extension-provider-ironcore/pkg/apis/ironcore/install" @@ -67,7 +67,7 @@ func CloudProfileConfigFromCluster(cluster *controller.Cluster) (*api.CloudProfi if cluster != nil && cluster.CloudProfile != nil && cluster.CloudProfile.Spec.ProviderConfig != nil && cluster.CloudProfile.Spec.ProviderConfig.Raw != nil { cloudProfileConfig = &api.CloudProfileConfig{} if _, _, err := decoder.Decode(cluster.CloudProfile.Spec.ProviderConfig.Raw, nil, cloudProfileConfig); err != nil { - return nil, fmt.Errorf("could not decode providerConfig of cloudProfile for '%s': %w", kutil.ObjectName(cluster.CloudProfile), err) + return nil, fmt.Errorf("could not decode providerConfig of cloudProfile for '%s': %w", client.ObjectKeyFromObject(cluster.CloudProfile), err) } } return cloudProfileConfig, nil diff --git a/pkg/controller/backupbucket/add.go b/pkg/controller/backupbucket/add.go index 12e90cdf..363d2dda 100644 --- a/pkg/controller/backupbucket/add.go +++ b/pkg/controller/backupbucket/add.go @@ -7,6 +7,7 @@ import ( "context" "github.com/gardener/gardener/extensions/pkg/controller/backupbucket" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -27,6 +28,8 @@ type AddOptions struct { IgnoreOperationAnnotation bool // BackupBucketConfig contains config for the BackupBucket config. BackupBucketConfig controllerconfig.BackupBucketConfig + // ExtensionClass defines the extension class this extension is responsible for. + ExtensionClass extensionsv1alpha1.ExtensionClass } // AddToManagerWithOptions adds a controller with the given Options to the given manager. @@ -37,6 +40,7 @@ func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddO ControllerOptions: opts.Controller, Predicates: backupbucket.DefaultPredicates(opts.IgnoreOperationAnnotation), Type: ironcore.Type, + ExtensionClass: opts.ExtensionClass, }) } diff --git a/pkg/controller/backupentry/add.go b/pkg/controller/backupentry/add.go index 951b0a20..a43cf841 100644 --- a/pkg/controller/backupentry/add.go +++ b/pkg/controller/backupentry/add.go @@ -8,6 +8,7 @@ import ( "github.com/gardener/gardener/extensions/pkg/controller/backupentry" "github.com/gardener/gardener/extensions/pkg/controller/backupentry/genericactuator" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -25,6 +26,8 @@ type AddOptions struct { Controller controller.Options // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. IgnoreOperationAnnotation bool + // ExtensionClass defines the extension class this extension is responsible for. + ExtensionClass extensionsv1alpha1.ExtensionClass } // AddToManagerWithOptions adds a controller with the given Options to the given manager. @@ -35,6 +38,7 @@ func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddO ControllerOptions: opts.Controller, Predicates: backupentry.DefaultPredicates(opts.IgnoreOperationAnnotation), Type: ironcore.Type, + ExtensionClass: opts.ExtensionClass, }) } diff --git a/pkg/controller/bastion/add.go b/pkg/controller/bastion/add.go index e879e795..ef25a93e 100644 --- a/pkg/controller/bastion/add.go +++ b/pkg/controller/bastion/add.go @@ -7,6 +7,7 @@ import ( "context" "github.com/gardener/gardener/extensions/pkg/controller/bastion" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -28,6 +29,8 @@ type AddOptions struct { IgnoreOperationAnnotation bool // BastionConfig contains config for the Bastion config. BastionConfig controllerconfig.BastionConfig + // ExtensionClass defines the extension class this extension is responsible for. + ExtensionClass extensionsv1alpha1.ExtensionClass } // AddToManagerWithOptions adds a controller with the given AddOptions to the given manager. @@ -39,6 +42,7 @@ func AddToManagerWithOptions(mgr manager.Manager, opts AddOptions) error { ControllerOptions: opts.Controller, Predicates: bastion.DefaultPredicates(opts.IgnoreOperationAnnotation), Type: ironcore.Type, + ExtensionClass: opts.ExtensionClass, }) } diff --git a/pkg/controller/controlplane/valuesprovider.go b/pkg/controller/controlplane/valuesprovider.go index 3eb5e83c..b0de65c1 100644 --- a/pkg/controller/controlplane/valuesprovider.go +++ b/pkg/controller/controlplane/valuesprovider.go @@ -239,7 +239,7 @@ func (vp *valuesProvider) GetControlPlaneChartValues( cpConfig := &apisironcore.ControlPlaneConfig{} if cp.Spec.ProviderConfig != nil { if _, _, err := vp.decoder.Decode(cp.Spec.ProviderConfig.Raw, nil, cpConfig); err != nil { - return nil, fmt.Errorf("could not decode providerConfig of controlplane '%s': %w", kutil.ObjectName(cp), err) + return nil, fmt.Errorf("could not decode providerConfig of controlplane '%s': %w", client.ObjectKeyFromObject(cp), err) } } diff --git a/pkg/controller/infrastructure/add.go b/pkg/controller/infrastructure/add.go index c47097d1..8f3c9409 100644 --- a/pkg/controller/infrastructure/add.go +++ b/pkg/controller/infrastructure/add.go @@ -7,6 +7,7 @@ import ( "context" "github.com/gardener/gardener/extensions/pkg/controller/infrastructure" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -25,6 +26,8 @@ type AddOptions struct { Controller controller.Options // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. IgnoreOperationAnnotation bool + // ExtensionClass defines the extension class this extension is responsible for. + ExtensionClass extensionsv1alpha1.ExtensionClass } // AddToManagerWithOptions adds a controller with the given AddOptions to the given manager. @@ -36,6 +39,7 @@ func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddO ControllerOptions: opts.Controller, Predicates: infrastructure.DefaultPredicates(ctx, mgr, opts.IgnoreOperationAnnotation), Type: ironcore.Type, + ExtensionClass: opts.ExtensionClass, }) } diff --git a/pkg/controller/worker/add.go b/pkg/controller/worker/add.go index 197d2a49..8fa92f42 100644 --- a/pkg/controller/worker/add.go +++ b/pkg/controller/worker/add.go @@ -7,6 +7,7 @@ import ( "context" "github.com/gardener/gardener/extensions/pkg/controller/worker" + extensionsv1alpha1 "github.com/gardener/gardener/pkg/apis/extensions/v1alpha1" machinev1alpha1 "github.com/gardener/machine-controller-manager/pkg/apis/machine/v1alpha1" apiextensionsscheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" "k8s.io/utils/ptr" @@ -33,6 +34,8 @@ type AddOptions struct { // IgnoreOperationAnnotation specifies whether to ignore the operation annotation or not. IgnoreOperationAnnotation bool RecoverPanic *bool + // ExtensionClass defines the extension class this extension is responsible for. + ExtensionClass extensionsv1alpha1.ExtensionClass } // AddToManagerWithOptions adds a controller with the given Options to the given manager. @@ -51,6 +54,7 @@ func AddToManagerWithOptions(ctx context.Context, mgr manager.Manager, opts AddO ControllerOptions: opts.Controller, Predicates: worker.DefaultPredicates(ctx, mgr, opts.IgnoreOperationAnnotation), Type: ironcore.Type, + ExtensionClass: opts.ExtensionClass, }) } diff --git a/pkg/controller/worker/machine_images.go b/pkg/controller/worker/machine_images.go index 54828a7b..db1dbc36 100644 --- a/pkg/controller/worker/machine_images.go +++ b/pkg/controller/worker/machine_images.go @@ -9,7 +9,6 @@ import ( "github.com/gardener/gardener/extensions/pkg/controller/worker" v1beta1constants "github.com/gardener/gardener/pkg/apis/core/v1beta1/constants" - kutil "github.com/gardener/gardener/pkg/utils/kubernetes" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/utils/ptr" @@ -60,7 +59,7 @@ func (w *workerDelegate) findMachineImage(name, version string, architecture *st if providerStatus := w.worker.Status.ProviderStatus; providerStatus != nil { workerStatus := &apiv1alpha1.WorkerStatus{} if _, _, err := w.decoder.Decode(providerStatus.Raw, nil, workerStatus); err != nil { - return "", fmt.Errorf("could not decode worker status of worker '%s': %w", kutil.ObjectName(w.worker), err) + return "", fmt.Errorf("could not decode worker status of worker '%s': %w", client.ObjectKeyFromObject(w.worker), err) } machineImage, err := helper.FindMachineImage(workerStatus.MachineImages, name, version, architecture) @@ -89,7 +88,7 @@ func (w *workerDelegate) decodeWorkerProviderStatus() (*apiv1alpha1.WorkerStatus } if _, _, err := w.decoder.Decode(w.worker.Status.ProviderStatus.Raw, nil, workerStatus); err != nil { - return nil, fmt.Errorf("could not decode WorkerStatus '%s': %w", kutil.ObjectName(w.worker), err) + return nil, fmt.Errorf("could not decode WorkerStatus '%s': %w", client.ObjectKeyFromObject(w.worker), err) } return workerStatus, nil diff --git a/pkg/webhook/controlplane/ensurer_test.go b/pkg/webhook/controlplane/ensurer_test.go index 1fa0786f..143e4311 100644 --- a/pkg/webhook/controlplane/ensurer_test.go +++ b/pkg/webhook/controlplane/ensurer_test.go @@ -243,7 +243,7 @@ var _ = Describe("Ensurer", func() { ensurer = NewEnsurer(logger, true) DeferCleanup(testutils.WithVar(&ImageVector, imagevectorutils.ImageVector{{ Name: "machine-controller-manager-provider-ironcore", - Repository: "foo", + Repository: ptr.To("foo"), Tag: ptr.To[string]("bar"), }})) })