From e32f088d576a3464a6092efbbf6fe050985f7afa Mon Sep 17 00:00:00 2001 From: Kajol Asabe Date: Tue, 13 Aug 2024 14:00:09 +0530 Subject: [PATCH 1/5] Update to `github.com/gardener/gardener@v1.101.0` --- .../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 | 38 ++++++++- go.mod | 10 +-- go.sum | 40 ++++++--- hack/api-reference/api.md | 12 +++ imagevector/imagevector.go | 2 +- pkg/apis/ironcore/helper/scheme.go | 4 +- pkg/controller/controlplane/valuesprovider.go | 2 +- .../controlplane/valuesprovider_test.go | 2 +- pkg/controller/worker/machine_images.go | 5 +- pkg/webhook/controlplane/ensurer_test.go | 10 ++- 21 files changed, 250 insertions(+), 33 deletions(-) diff --git a/cmd/gardener-extension-provider-ironcore/app/app.go b/cmd/gardener-extension-provider-ironcore/app/app.go index 2c2ea8ee..ca2a72b5 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, nil) + reconcileOpts.Completed().Apply(&infrastructurecontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) + reconcileOpts.Completed().Apply(&workercontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) + reconcileOpts.Completed().Apply(&backupbucketcontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) + reconcileOpts.Completed().Apply(&backupentrycontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) 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..a4ea46ff 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 @@ -225,6 +232,11 @@ spec: NodeAgentSecretName is uniquely identifying selected aspects of the OperatingSystemConfig. If it changes, then the worker pool must be rolled. type: string + nodeAgentSecretName: + description: |- + NodeAgentSecretName is uniquely identifying selected aspects of the OperatingSystemConfig. If it changes, then the + worker pool must be rolled. + type: string nodeTemplate: description: NodeTemplate contains resource information of the machine which is used by Cluster Autoscaler to generate nodeTemplate @@ -286,7 +298,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: @@ -313,6 +325,30 @@ spec: - key type: object x-kubernetes-map-type: atomic + userDataSecretRef: + description: |- + UserDataSecretRef references a Secret and a data key containing the data that is sent to the provider's APIs when + a new machine/VM that is part of this worker pool shall be spawned. + Either this or UserData must be provided. + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic volume: description: Volume contains information about the root disks that should be used for this worker pool. diff --git a/go.mod b/go.mod index 606f58e6..b6ff8e22 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 @@ -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..24d1987a 100644 --- a/go.sum +++ b/go.sum @@ -46,6 +46,8 @@ github.com/ahmetb/gen-crd-api-reference-docs v0.3.0 h1:+XfOU14S4bGuwyvCijJwhhBIj github.com/ahmetb/gen-crd-api-reference-docs v0.3.0/go.mod h1:TdjdkYhlOifCQWPs1UdTma97kQQMozf5h26hTuG70u8= github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= +github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= +github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= @@ -102,6 +104,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fluent/fluent-operator/v2 v2.9.0 h1:VFGgRPOI+yxnOrTIAL6sgFCtc+quDda12iyVL1lRQag= github.com/fluent/fluent-operator/v2 v2.9.0/go.mod h1:Hthhi/3oO26udvro6t5foUx20PZAMn7WGUhSnEWUV9U= +github.com/fluent/fluent-operator/v2 v2.9.0 h1:VFGgRPOI+yxnOrTIAL6sgFCtc+quDda12iyVL1lRQag= +github.com/fluent/fluent-operator/v2 v2.9.0/go.mod h1:Hthhi/3oO26udvro6t5foUx20PZAMn7WGUhSnEWUV9U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -110,10 +114,12 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gardener/cert-management v0.15.0 h1:ohm1eWae2rQSkwFGWXTt+lBv4rLBhtJsJgqvaXJBs6o= github.com/gardener/cert-management v0.15.0/go.mod h1:3BK2VEtGwv2ijf3bSziTLMCUvYnPzIQrQ/uPeZzL4m0= +github.com/gardener/cert-management v0.15.0 h1:ohm1eWae2rQSkwFGWXTt+lBv4rLBhtJsJgqvaXJBs6o= +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= @@ -134,6 +140,8 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= @@ -147,6 +155,8 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= @@ -319,11 +329,15 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 h1:AHzMWDxNiAVscJL6+4wkvFRTpMnJqiaZFEKA/osaBXE= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0/go.mod h1:wAR5JopumPtAZnu0Cjv2PSqV4p4QB09LMhc6fZZTXuA= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 h1:AHzMWDxNiAVscJL6+4wkvFRTpMnJqiaZFEKA/osaBXE= +github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0/go.mod h1:wAR5JopumPtAZnu0Cjv2PSqV4p4QB09LMhc6fZZTXuA= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= +github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= @@ -407,6 +421,8 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= +golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -456,6 +472,8 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -508,8 +526,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= @@ -606,13 +624,15 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= helm.sh/helm/v3 v3.14.4 h1:6FSpEfqyDalHq3kUr4gOMThhgY55kXUEjdQoyODYnrM= helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= +helm.sh/helm/v3 v3.14.4 h1:6FSpEfqyDalHq3kUr4gOMThhgY55kXUEjdQoyODYnrM= +helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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,8 +667,8 @@ 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= @@ -657,8 +677,8 @@ 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/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..932dc34b 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, "") runtime.Must(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/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/controlplane/valuesprovider_test.go b/pkg/controller/controlplane/valuesprovider_test.go index a694633e..58adf24f 100644 --- a/pkg/controller/controlplane/valuesprovider_test.go +++ b/pkg/controller/controlplane/valuesprovider_test.go @@ -492,7 +492,7 @@ var _ = Describe("Valueprovider Reconcile", func() { "featureGates": map[string]bool{ "CustomResourceValidation": true, }, - "podNetwork": "10.0.0.0/16", + "podNetwork": []string{"10.0.0.0/16"}, "configureCloudRoutes": true, }, "csi-driver-controller": map[string]interface{}{ 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..4a641319 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"), }})) }) @@ -267,7 +267,13 @@ var _ = Describe("Ensurer", func() { "--port=" + strconv.Itoa(portProviderMetrics), "--target-kubeconfig=" + gardenerutils.PathGenericKubeconfig, "--v=3", - "--ironcore-kubeconfig=/etc/ironcore/kubeconfig", + }, + Ports: []corev1.ContainerPort{ + { + Name: "providermetrics", + ContainerPort: 10259, + Protocol: corev1.ProtocolTCP, + }, }, LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ From 9c84f58e24d70b00df6f1f678bbeb521395e77ed Mon Sep 17 00:00:00 2001 From: ushabelgur Date: Fri, 30 Aug 2024 13:01:34 +0530 Subject: [PATCH 2/5] resolving conflicts --- ...crd-extensions.gardener.cloud_workers.yaml | 29 ------------------- go.sum | 20 ------------- pkg/admission/validator/shoot.go | 2 +- .../controlplane/valuesprovider_test.go | 2 +- pkg/webhook/controlplane/ensurer_test.go | 8 +---- 5 files changed, 3 insertions(+), 58 deletions(-) diff --git a/example/20-crd-extensions.gardener.cloud_workers.yaml b/example/20-crd-extensions.gardener.cloud_workers.yaml index a4ea46ff..156ca831 100644 --- a/example/20-crd-extensions.gardener.cloud_workers.yaml +++ b/example/20-crd-extensions.gardener.cloud_workers.yaml @@ -232,11 +232,6 @@ spec: NodeAgentSecretName is uniquely identifying selected aspects of the OperatingSystemConfig. If it changes, then the worker pool must be rolled. type: string - nodeAgentSecretName: - description: |- - NodeAgentSecretName is uniquely identifying selected aspects of the OperatingSystemConfig. If it changes, then the - worker pool must be rolled. - type: string nodeTemplate: description: NodeTemplate contains resource information of the machine which is used by Cluster Autoscaler to generate nodeTemplate @@ -325,30 +320,6 @@ spec: - key type: object x-kubernetes-map-type: atomic - userDataSecretRef: - description: |- - UserDataSecretRef references a Secret and a data key containing the data that is sent to the provider's APIs when - a new machine/VM that is part of this worker pool shall be spawned. - Either this or UserData must be provided. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - description: |- - Name of the referent. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid? - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic volume: description: Volume contains information about the root disks that should be used for this worker pool. diff --git a/go.sum b/go.sum index 24d1987a..1e029130 100644 --- a/go.sum +++ b/go.sum @@ -46,8 +46,6 @@ github.com/ahmetb/gen-crd-api-reference-docs v0.3.0 h1:+XfOU14S4bGuwyvCijJwhhBIj github.com/ahmetb/gen-crd-api-reference-docs v0.3.0/go.mod h1:TdjdkYhlOifCQWPs1UdTma97kQQMozf5h26hTuG70u8= github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= -github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= -github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= @@ -104,8 +102,6 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fluent/fluent-operator/v2 v2.9.0 h1:VFGgRPOI+yxnOrTIAL6sgFCtc+quDda12iyVL1lRQag= github.com/fluent/fluent-operator/v2 v2.9.0/go.mod h1:Hthhi/3oO26udvro6t5foUx20PZAMn7WGUhSnEWUV9U= -github.com/fluent/fluent-operator/v2 v2.9.0 h1:VFGgRPOI+yxnOrTIAL6sgFCtc+quDda12iyVL1lRQag= -github.com/fluent/fluent-operator/v2 v2.9.0/go.mod h1:Hthhi/3oO26udvro6t5foUx20PZAMn7WGUhSnEWUV9U= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -114,8 +110,6 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gardener/cert-management v0.15.0 h1:ohm1eWae2rQSkwFGWXTt+lBv4rLBhtJsJgqvaXJBs6o= github.com/gardener/cert-management v0.15.0/go.mod h1:3BK2VEtGwv2ijf3bSziTLMCUvYnPzIQrQ/uPeZzL4m0= -github.com/gardener/cert-management v0.15.0 h1:ohm1eWae2rQSkwFGWXTt+lBv4rLBhtJsJgqvaXJBs6o= -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.101.0 h1:ZWpRfhl6IIq3VfpanUnYaP2LSeeDcBY+sxesVFQT55U= @@ -140,8 +134,6 @@ github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34 github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= -github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= -github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= @@ -155,8 +147,6 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= -github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= -github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= @@ -329,15 +319,11 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 h1:AHzMWDxNiAVscJL6+4wkvFRTpMnJqiaZFEKA/osaBXE= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0/go.mod h1:wAR5JopumPtAZnu0Cjv2PSqV4p4QB09LMhc6fZZTXuA= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 h1:AHzMWDxNiAVscJL6+4wkvFRTpMnJqiaZFEKA/osaBXE= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0/go.mod h1:wAR5JopumPtAZnu0Cjv2PSqV4p4QB09LMhc6fZZTXuA= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= -github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= -github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= @@ -421,8 +407,6 @@ golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -472,8 +456,6 @@ golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= -golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -624,8 +606,6 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= helm.sh/helm/v3 v3.14.4 h1:6FSpEfqyDalHq3kUr4gOMThhgY55kXUEjdQoyODYnrM= helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= -helm.sh/helm/v3 v3.14.4 h1:6FSpEfqyDalHq3kUr4gOMThhgY55kXUEjdQoyODYnrM= -helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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/controller/controlplane/valuesprovider_test.go b/pkg/controller/controlplane/valuesprovider_test.go index 58adf24f..a694633e 100644 --- a/pkg/controller/controlplane/valuesprovider_test.go +++ b/pkg/controller/controlplane/valuesprovider_test.go @@ -492,7 +492,7 @@ var _ = Describe("Valueprovider Reconcile", func() { "featureGates": map[string]bool{ "CustomResourceValidation": true, }, - "podNetwork": []string{"10.0.0.0/16"}, + "podNetwork": "10.0.0.0/16", "configureCloudRoutes": true, }, "csi-driver-controller": map[string]interface{}{ diff --git a/pkg/webhook/controlplane/ensurer_test.go b/pkg/webhook/controlplane/ensurer_test.go index 4a641319..143e4311 100644 --- a/pkg/webhook/controlplane/ensurer_test.go +++ b/pkg/webhook/controlplane/ensurer_test.go @@ -267,13 +267,7 @@ var _ = Describe("Ensurer", func() { "--port=" + strconv.Itoa(portProviderMetrics), "--target-kubeconfig=" + gardenerutils.PathGenericKubeconfig, "--v=3", - }, - Ports: []corev1.ContainerPort{ - { - Name: "providermetrics", - ContainerPort: 10259, - Protocol: corev1.ProtocolTCP, - }, + "--ironcore-kubeconfig=/etc/ironcore/kubeconfig", }, LivenessProbe: &corev1.Probe{ ProbeHandler: corev1.ProbeHandler{ From a5d525eef48896824ff2fa0d7852b435c3ae736d Mon Sep 17 00:00:00 2001 From: ushabelgur Date: Tue, 17 Sep 2024 14:05:25 +0530 Subject: [PATCH 3/5] fix add options extension class --- cmd/gardener-extension-provider-ironcore/app/app.go | 10 +++++----- pkg/controller/backupbucket/add.go | 4 ++++ pkg/controller/backupentry/add.go | 4 ++++ pkg/controller/bastion/add.go | 4 ++++ pkg/controller/infrastructure/add.go | 4 ++++ pkg/controller/worker/add.go | 4 ++++ 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/cmd/gardener-extension-provider-ironcore/app/app.go b/cmd/gardener-extension-provider-ironcore/app/app.go index ca2a72b5..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, nil) - reconcileOpts.Completed().Apply(&infrastructurecontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) - reconcileOpts.Completed().Apply(&workercontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) - reconcileOpts.Completed().Apply(&backupbucketcontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) - reconcileOpts.Completed().Apply(&backupentrycontroller.DefaultAddOptions.IgnoreOperationAnnotation, nil) + 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/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/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, }) } From d94dcef67ef20c8d91e29e12414fb3e8052389b4 Mon Sep 17 00:00:00 2001 From: ushabelgur Date: Fri, 20 Sep 2024 10:15:47 +0530 Subject: [PATCH 4/5] Update changes for imageVector --- imagevector/imagevector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagevector/imagevector.go b/imagevector/imagevector.go index 932dc34b..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) } From 234857e9b56e5e31e1066b9f44c4143dd6e4bdb2 Mon Sep 17 00:00:00 2001 From: ushabelgur Date: Wed, 25 Sep 2024 15:48:45 +0530 Subject: [PATCH 5/5] rebasing with main --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b6ff8e22..d45c2be4 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 1e029130..e60983b8 100644 --- a/go.sum +++ b/go.sum @@ -654,8 +654,8 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A 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-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=