From 157e1611152d63f580b23502a5dca6a8dc217aa5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 May 2025 10:59:49 +0000 Subject: [PATCH 1/7] chore(deps): update hack/common digest to 80bfca5 --- hack/common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/common b/hack/common index d31ac26..80bfca5 160000 --- a/hack/common +++ b/hack/common @@ -1 +1 @@ -Subproject commit d31ac26200e4ec41657aaf6f223dac12f2bdc893 +Subproject commit 80bfca5ddf3186e97df6b7d1acdea035f6ba4632 From ae6ccc06c7c4fa0711a2d215ab42429574ba5cd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Wannenmacher?= Date: Mon, 19 May 2025 13:17:35 +0200 Subject: [PATCH 2/7] chore: task generate --- api/crds/manifests/core.openmcp.cloud_apiservers.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_authentications.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_authorizations.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml | 2 +- .../manifests/core.openmcp.cloud_internalconfigurations.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_landscapers.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_managedcomponents.yaml | 2 +- api/crds/manifests/core.openmcp.cloud_managedcontrolplanes.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/crds/manifests/core.openmcp.cloud_apiservers.yaml b/api/crds/manifests/core.openmcp.cloud_apiservers.yaml index 3f8968a..79f01f1 100644 --- a/api/crds/manifests/core.openmcp.cloud_apiservers.yaml +++ b/api/crds/manifests/core.openmcp.cloud_apiservers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: apiservers.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_authentications.yaml b/api/crds/manifests/core.openmcp.cloud_authentications.yaml index 9d5c917..4033a79 100644 --- a/api/crds/manifests/core.openmcp.cloud_authentications.yaml +++ b/api/crds/manifests/core.openmcp.cloud_authentications.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: authentications.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_authorizations.yaml b/api/crds/manifests/core.openmcp.cloud_authorizations.yaml index c4e70ea..c1ffa33 100644 --- a/api/crds/manifests/core.openmcp.cloud_authorizations.yaml +++ b/api/crds/manifests/core.openmcp.cloud_authorizations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: authorizations.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml b/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml index 5df84da..ead0a8d 100644 --- a/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml +++ b/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: cloudorchestrators.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml b/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml index c4e1bf6..4aa8cda 100644 --- a/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml +++ b/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: clusteradmins.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_internalconfigurations.yaml b/api/crds/manifests/core.openmcp.cloud_internalconfigurations.yaml index 4ce2abb..97e4b82 100644 --- a/api/crds/manifests/core.openmcp.cloud_internalconfigurations.yaml +++ b/api/crds/manifests/core.openmcp.cloud_internalconfigurations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: internalconfigurations.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_landscapers.yaml b/api/crds/manifests/core.openmcp.cloud_landscapers.yaml index eed123c..d9de46f 100644 --- a/api/crds/manifests/core.openmcp.cloud_landscapers.yaml +++ b/api/crds/manifests/core.openmcp.cloud_landscapers.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: landscapers.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_managedcomponents.yaml b/api/crds/manifests/core.openmcp.cloud_managedcomponents.yaml index d8c4edb..477db88 100644 --- a/api/crds/manifests/core.openmcp.cloud_managedcomponents.yaml +++ b/api/crds/manifests/core.openmcp.cloud_managedcomponents.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: managedcomponents.core.openmcp.cloud spec: group: core.openmcp.cloud diff --git a/api/crds/manifests/core.openmcp.cloud_managedcontrolplanes.yaml b/api/crds/manifests/core.openmcp.cloud_managedcontrolplanes.yaml index 8c00103..6de4f9d 100644 --- a/api/crds/manifests/core.openmcp.cloud_managedcontrolplanes.yaml +++ b/api/crds/manifests/core.openmcp.cloud_managedcontrolplanes.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.16.4 + controller-gen.kubebuilder.io/version: v0.17.3 name: managedcontrolplanes.core.openmcp.cloud spec: group: core.openmcp.cloud From f8cfda90974c039b45d93cd352bad739beae8ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Wannenmacher?= Date: Mon, 19 May 2025 14:33:01 +0200 Subject: [PATCH 3/7] chore: linter fixes misspell, comments, embedded field... --- .golangci.yaml | 53 ++++++++++++++++--- README.md | 4 +- api/core/v1alpha1/apiserver_types.go | 6 +-- api/core/v1alpha1/authentication_defaults.go | 6 +-- api/core/v1alpha1/authorization_types.go | 2 +- api/core/v1alpha1/cloudorchestrator_types.go | 6 +-- api/core/v1alpha1/component_types.go | 2 +- .../v1alpha1/internalconfiguration_types.go | 4 +- api/core/v1alpha1/landscaper_types.go | 6 +-- .../v1alpha1/managedcontrolplane_types.go | 6 +-- .../core.openmcp.cloud_apiservers.yaml | 2 +- .../core.openmcp.cloud_authentications.yaml | 2 +- .../core.openmcp.cloud_authorizations.yaml | 2 +- ...core.openmcp.cloud_cloudorchestrators.yaml | 2 +- .../core.openmcp.cloud_clusteradmins.yaml | 2 +- .../core.openmcp.cloud_landscapers.yaml | 2 +- internal/components/apiserver_test.go | 2 +- internal/components/component_test.go | 2 +- .../core/apiserver/config/config.go | 4 +- .../core/apiserver/config/config_gardener.go | 2 +- .../controller/core/apiserver/controller.go | 8 +-- .../apiserver/handler/gardener/connector.go | 4 +- .../core/apiserver/handler/handler.go | 4 +- .../core/authentication/controller.go | 6 +-- .../core/authorization/controller.go | 2 +- .../core/cloudorchestrator/controller.go | 24 ++++----- .../controller/core/landscaper/controller.go | 8 +-- .../core/managedcontrolplane/controller.go | 6 +-- .../core/managedcontrolplane/conversion.go | 2 +- .../releasechannel/managedcomponents_test.go | 8 +-- internal/utils/components/components.go | 4 +- internal/utils/components/conditions.go | 2 +- internal/utils/components/patch_test.go | 4 +- internal/utils/region/region.go | 2 +- test/utils/test.go | 2 +- 35 files changed, 121 insertions(+), 82 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 083aa42..c30110f 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,8 +1,47 @@ +version: "2" run: - concurrency: 4 - timeout: 10m - -issues: - exclude-files: - - "zz_generated.*\\.go$" - - "tmp/.*" + allow-parallel-runners: true +linters: + default: none + enable: + - copyloopvar + - errcheck + - govet + - ineffassign + - misspell + - nakedret + - prealloc + - revive + - staticcheck + - unconvert + - unused + settings: + revive: + rules: + - name: comment-spacings + exclusions: + generated: lax + rules: + - linters: + - lll + path: api/* + - linters: + - dupl + - lllgit ad + path: internal/* + paths: + - zz_generated.*\.go$ + - tmp/.* + - third_party$ + - builtin$ + - examples$ +formatters: + enable: + - gofmt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/README.md b/README.md index 2c60ff2..490fb43 100644 --- a/README.md +++ b/README.md @@ -117,12 +117,12 @@ package main import ( "fmt" // we need to import something here so golint is happy - //+kubebuilder:scaffold:imports + // +kubebuilder:scaffold:imports ) func main() { fmt.Println("I should never be called") - //+kubebuilder:scaffold:builder + // +kubebuilder:scaffold:builder } EOF ``` diff --git a/api/core/v1alpha1/apiserver_types.go b/api/core/v1alpha1/apiserver_types.go index 8f3c36f..d3c3132 100644 --- a/api/core/v1alpha1/apiserver_types.go +++ b/api/core/v1alpha1/apiserver_types.go @@ -97,8 +97,8 @@ type APIServerAccess struct { ExpirationTimestamp *metav1.Time `json:"expirationTimestamp,omitempty"` } -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status // APIServer is the Schema for the APIServer API // +kubebuilder:resource:shortName=as @@ -113,7 +113,7 @@ type APIServer struct { Status APIServerStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // APIServerList contains a list of APIServer type APIServerList struct { diff --git a/api/core/v1alpha1/authentication_defaults.go b/api/core/v1alpha1/authentication_defaults.go index 3496716..4972f7a 100644 --- a/api/core/v1alpha1/authentication_defaults.go +++ b/api/core/v1alpha1/authentication_defaults.go @@ -10,8 +10,8 @@ import ( // Default sets the default values for the AuthenticationSpec. // This modifies the receiver object. func (as *AuthenticationSpec) Default() { - if as.AuthenticationConfiguration.EnableSystemIdentityProvider == nil { - as.AuthenticationConfiguration.EnableSystemIdentityProvider = ptr.To(true) + if as.EnableSystemIdentityProvider == nil { + as.EnableSystemIdentityProvider = ptr.To(true) } } @@ -79,7 +79,7 @@ func ValidateIdp(idp IdentityProvider, fldPath *field.Path) field.ErrorList { // isLowerCaseLetter checks if the given string is a lowercase letter. func isLowerCaseLetter(s string) bool { for _, r := range s { - if !(unicode.IsLetter(r) && unicode.IsLower(r)) { + if !unicode.IsLetter(r) && !unicode.IsLower(r) { return false } } diff --git a/api/core/v1alpha1/authorization_types.go b/api/core/v1alpha1/authorization_types.go index 6255e3e..fad6452 100644 --- a/api/core/v1alpha1/authorization_types.go +++ b/api/core/v1alpha1/authorization_types.go @@ -166,7 +166,7 @@ type ClusterAdminStatus struct { // +kubebuilder:subresource:status // ClusterAdmin is the Schema for the cluster admin API -// +kubebuilder:resource:shortName=clas +// +kubebuilder:resource:shortName=class // +kubebuilder:printcolumn:name="Active",type=string,JSONPath=`.status.active` // +kubebuilder:printcolumn:name="Activated",type="date",JSONPath=".status.activationTime" // +kubebuilder:printcolumn:name="Expiration",type="string",JSONPath=".status.expirationTime" diff --git a/api/core/v1alpha1/cloudorchestrator_types.go b/api/core/v1alpha1/cloudorchestrator_types.go index be86e6f..f37d551 100644 --- a/api/core/v1alpha1/cloudorchestrator_types.go +++ b/api/core/v1alpha1/cloudorchestrator_types.go @@ -50,8 +50,8 @@ type CloudOrchestratorStatus struct { ComponentsHealthy int `json:"componentsHealthy"` } -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status // +kubebuilder:resource:shortName=co // +kubebuilder:printcolumn:name="Successfully_Reconciled",type=string,JSONPath=`.status.conditions[?(@.type=="CloudOrchestratorReconciliation")].status` // +kubebuilder:printcolumn:name="Deleted",type="date",JSONPath=".metadata.deletionTimestamp" @@ -66,7 +66,7 @@ type CloudOrchestrator struct { Status CloudOrchestratorStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // CloudOrchestratorList contains a list of CloudOrchestrator type CloudOrchestratorList struct { diff --git a/api/core/v1alpha1/component_types.go b/api/core/v1alpha1/component_types.go index 3c4a4d4..5d6c6d0 100644 --- a/api/core/v1alpha1/component_types.go +++ b/api/core/v1alpha1/component_types.go @@ -70,7 +70,7 @@ type ObservedGenerations struct { // CommonComponentStatus contains fields which all component resources' statuses must contain. type CommonComponentStatus struct { - // Conditions containts the conditions of the component. + // Conditions contains the conditions of the component. // For each component, this is expected to contain at least one condition per top-level node that component has in the ManagedControlPlane's spec. // This condition is expected to be named "Healthy" and to describe the general availability of the functionality configured by that top-level node. Conditions ComponentConditionList `json:"conditions,omitempty"` diff --git a/api/core/v1alpha1/internalconfiguration_types.go b/api/core/v1alpha1/internalconfiguration_types.go index 3022f41..0c73415 100644 --- a/api/core/v1alpha1/internalconfiguration_types.go +++ b/api/core/v1alpha1/internalconfiguration_types.go @@ -16,7 +16,7 @@ type InternalConfigurationSpec struct { Components InternalConfigurationComponents `json:"components,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // InternalConfiguration is the Schema for the InternalConfigurations API // +kubebuilder:resource:shortName=icfg @@ -27,7 +27,7 @@ type InternalConfiguration struct { Spec InternalConfigurationSpec `json:"spec,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // InternalConfigurationList contains a list of InternalConfiguration type InternalConfigurationList struct { diff --git a/api/core/v1alpha1/landscaper_types.go b/api/core/v1alpha1/landscaper_types.go index 73b342e..9b3a842 100644 --- a/api/core/v1alpha1/landscaper_types.go +++ b/api/core/v1alpha1/landscaper_types.go @@ -38,8 +38,8 @@ type LandscaperSpec struct { LandscaperConfiguration `json:",inline"` } -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status // Landscaper is the Schema for the laasinstances API // +kubebuilder:resource:shortName=ls @@ -54,7 +54,7 @@ type Landscaper struct { Status LandscaperStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // LandscaperList contains a list of Landscaper type LandscaperList struct { diff --git a/api/core/v1alpha1/managedcontrolplane_types.go b/api/core/v1alpha1/managedcontrolplane_types.go index 2803019..0af6f46 100644 --- a/api/core/v1alpha1/managedcontrolplane_types.go +++ b/api/core/v1alpha1/managedcontrolplane_types.go @@ -93,8 +93,8 @@ const ( MCPStatusDeleting MCPStatus = "Deleting" ) -//+kubebuilder:object:root=true -//+kubebuilder:subresource:status +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status // ManagedControlPlane is the Schema for the ManagedControlPlane API // +kubebuilder:resource:shortName=mcp @@ -109,7 +109,7 @@ type ManagedControlPlane struct { Status ManagedControlPlaneStatus `json:"status,omitempty"` } -//+kubebuilder:object:root=true +// +kubebuilder:object:root=true // ManagedControlPlaneList contains a list of ManagedControlPlane type ManagedControlPlaneList struct { diff --git a/api/crds/manifests/core.openmcp.cloud_apiservers.yaml b/api/crds/manifests/core.openmcp.cloud_apiservers.yaml index 79f01f1..5663976 100644 --- a/api/crds/manifests/core.openmcp.cloud_apiservers.yaml +++ b/api/crds/manifests/core.openmcp.cloud_apiservers.yaml @@ -266,7 +266,7 @@ spec: type: object conditions: description: |- - Conditions containts the conditions of the component. + Conditions contains the conditions of the component. For each component, this is expected to contain at least one condition per top-level node that component has in the ManagedControlPlane's spec. This condition is expected to be named "Healthy" and to describe the general availability of the functionality configured by that top-level node. items: diff --git a/api/crds/manifests/core.openmcp.cloud_authentications.yaml b/api/crds/manifests/core.openmcp.cloud_authentications.yaml index 4033a79..145b8a7 100644 --- a/api/crds/manifests/core.openmcp.cloud_authentications.yaml +++ b/api/crds/manifests/core.openmcp.cloud_authentications.yaml @@ -174,7 +174,7 @@ spec: type: object conditions: description: |- - Conditions containts the conditions of the component. + Conditions contains the conditions of the component. For each component, this is expected to contain at least one condition per top-level node that component has in the ManagedControlPlane's spec. This condition is expected to be named "Healthy" and to describe the general availability of the functionality configured by that top-level node. items: diff --git a/api/crds/manifests/core.openmcp.cloud_authorizations.yaml b/api/crds/manifests/core.openmcp.cloud_authorizations.yaml index c1ffa33..93a54a8 100644 --- a/api/crds/manifests/core.openmcp.cloud_authorizations.yaml +++ b/api/crds/manifests/core.openmcp.cloud_authorizations.yaml @@ -108,7 +108,7 @@ spec: properties: conditions: description: |- - Conditions containts the conditions of the component. + Conditions contains the conditions of the component. For each component, this is expected to contain at least one condition per top-level node that component has in the ManagedControlPlane's spec. This condition is expected to be named "Healthy" and to describe the general availability of the functionality configured by that top-level node. items: diff --git a/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml b/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml index ead0a8d..a38ea2e 100644 --- a/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml +++ b/api/crds/manifests/core.openmcp.cloud_cloudorchestrators.yaml @@ -130,7 +130,7 @@ spec: type: integer conditions: description: |- - Conditions containts the conditions of the component. + Conditions contains the conditions of the component. For each component, this is expected to contain at least one condition per top-level node that component has in the ManagedControlPlane's spec. This condition is expected to be named "Healthy" and to describe the general availability of the functionality configured by that top-level node. items: diff --git a/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml b/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml index 4aa8cda..5c00a2b 100644 --- a/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml +++ b/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml @@ -12,7 +12,7 @@ spec: listKind: ClusterAdminList plural: clusteradmins shortNames: - - clas + - class singular: clusteradmin scope: Namespaced versions: diff --git a/api/crds/manifests/core.openmcp.cloud_landscapers.yaml b/api/crds/manifests/core.openmcp.cloud_landscapers.yaml index d9de46f..4787695 100644 --- a/api/crds/manifests/core.openmcp.cloud_landscapers.yaml +++ b/api/crds/manifests/core.openmcp.cloud_landscapers.yaml @@ -64,7 +64,7 @@ spec: properties: conditions: description: |- - Conditions containts the conditions of the component. + Conditions contains the conditions of the component. For each component, this is expected to contain at least one condition per top-level node that component has in the ManagedControlPlane's spec. This condition is expected to be named "Healthy" and to describe the general availability of the functionality configured by that top-level node. items: diff --git a/internal/components/apiserver_test.go b/internal/components/apiserver_test.go index 3d460c1..6c1de5d 100644 --- a/internal/components/apiserver_test.go +++ b/internal/components/apiserver_test.go @@ -91,7 +91,7 @@ var _ = Describe("APIServerConverter", func() { Expect(apiServerSpecT.Type).To(Equal(mcp.Spec.Components.APIServer.Type)) Expect(apiServerSpecT.GardenerConfig).To(Equal(mcp.Spec.Components.APIServer.GardenerConfig)) Expect(apiServerSpecT.Internal.GardenerConfig.ShootOverwrite).To(Equal(icfg.Spec.Components.APIServer.GardenerConfig.ShootOverwrite)) - Expect(apiServerSpecT.DesiredRegion).To(Equal(mcp.Spec.CommonConfig.DesiredRegion)) + Expect(apiServerSpecT.DesiredRegion).To(Equal(mcp.Spec.DesiredRegion)) }) It("should return an error if the spec is not configured", func() { diff --git a/internal/components/component_test.go b/internal/components/component_test.go index 5c46c45..42a6acf 100644 --- a/internal/components/component_test.go +++ b/internal/components/component_test.go @@ -30,7 +30,7 @@ var _ = Describe("Components", func() { commonCfg, iCommonConfig := components.GetCommonConfig(mcp, icfg) Expect(commonCfg).ToNot(BeNil()) Expect(iCommonConfig).ToNot(BeNil()) - Expect(commonCfg.DesiredRegion).To(Equal(mcp.Spec.CommonConfig.DesiredRegion)) + Expect(commonCfg.DesiredRegion).To(Equal(mcp.Spec.DesiredRegion)) Expect(iCommonConfig).To(Equal(icfg.Spec.InternalCommonConfig)) }) diff --git a/internal/controller/core/apiserver/config/config.go b/internal/controller/core/apiserver/config/config.go index 9d0f97c..069c449 100644 --- a/internal/controller/core/apiserver/config/config.go +++ b/internal/controller/core/apiserver/config/config.go @@ -64,7 +64,7 @@ func (cfg *APIServerProviderConfiguration) Complete(ctx context.Context) (*Compl } errs = append(errs, err) - res.CompletedCommonConfig, err = cfg.CommonConfig.complete() + res.CompletedCommonConfig, err = cfg.complete() errs = append(errs, err) return res, errors.Join(errs...) @@ -82,7 +82,7 @@ func Validate(cfg *APIServerProviderConfiguration) error { allErrs = append(allErrs, validateGardenerConfig(cfg.GardenerConfig, field.NewPath("gardener"))...) } - allErrs = append(allErrs, cfg.CommonConfig.validate()...) + allErrs = append(allErrs, cfg.validate()...) return allErrs.ToAggregate() } diff --git a/internal/controller/core/apiserver/config/config_gardener.go b/internal/controller/core/apiserver/config/config_gardener.go index e47066c..33ce1c7 100644 --- a/internal/controller/core/apiserver/config/config_gardener.go +++ b/internal/controller/core/apiserver/config/config_gardener.go @@ -76,7 +76,7 @@ type GardenerConfiguration struct { Name string `json:"name,omitempty"` // Project is the Gardener project which should be used to create shoot clusters in it. - // The provided kubeconfig must have priviliges for this project. + // The provided kubeconfig must have privileges for this project. Project string `json:"project,omitempty"` // CloudProfile is the name of the Gardener CloudProfile that should be used for this shoot. diff --git a/internal/controller/core/apiserver/controller.go b/internal/controller/core/apiserver/controller.go index a6c370b..c958bd5 100644 --- a/internal/controller/core/apiserver/controller.go +++ b/internal/controller/core/apiserver/controller.go @@ -71,9 +71,9 @@ type APIServerProvider struct { FakeHandler apiserverhandler.APIServerHandler } -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers/finalizers,verbs=update +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers/finalizers,verbs=update func (r *APIServerProvider) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log, ctx := utils.InitializeControllerLogger(ctx, ControllerName) @@ -97,7 +97,7 @@ func (r *APIServerProvider) reconcile(ctx context.Context, req ctrl.Request) com log.Debug("Resource not found") return componentutils.ReconcileResult[*openmcpv1alpha1.APIServer]{} } - return componentutils.ReconcileResult[*openmcpv1alpha1.APIServer]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.NamespacedName.String(), err), cconst.ReasonCrateClusterInteractionProblem)} + return componentutils.ReconcileResult[*openmcpv1alpha1.APIServer]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.String(), err), cconst.ReasonCrateClusterInteractionProblem)} } // handle operation annotation diff --git a/internal/controller/core/apiserver/handler/gardener/connector.go b/internal/controller/core/apiserver/handler/gardener/connector.go index 411f6b2..c0c7903 100644 --- a/internal/controller/core/apiserver/handler/gardener/connector.go +++ b/internal/controller/core/apiserver/handler/gardener/connector.go @@ -210,10 +210,10 @@ func (gc *GardenerConnector) HandleCreateOrUpdate(ctx context.Context, as *openm for _, endpoint := range sh.Status.AdvertisedAddresses { switch endpoint.Name { case constants.AdvertisedAddressExternal: - status.ExternalAPIServerStatus.Endpoint = endpoint.URL + status.Endpoint = endpoint.URL case constants.AdvertisedAddressInternal: case constants.AdvertisedAddressServiceAccountIssuer: - status.ExternalAPIServerStatus.ServiceAccountIssuer = endpoint.URL + status.ServiceAccountIssuer = endpoint.URL default: log.Error(nil, "unexpected endpoint name in shoot's advertised addresses", "endpoint", endpoint.Name) } diff --git a/internal/controller/core/apiserver/handler/handler.go b/internal/controller/core/apiserver/handler/handler.go index d8eccaa..97d430f 100644 --- a/internal/controller/core/apiserver/handler/handler.go +++ b/internal/controller/core/apiserver/handler/handler.go @@ -90,10 +90,10 @@ func computeTokenRenewalTime(acc *openmcpv1alpha1.APIServerAccess) time.Time { return time.Time{} } // validity is how long the token was valid in the first place - validity := acc.ExpirationTimestamp.Time.Sub(acc.CreationTimestamp.Time) + validity := acc.ExpirationTimestamp.Sub(acc.CreationTimestamp.Time) // renewalAfter is 80% of the validity renewalAfter := time.Duration(float64(validity) * 0.8) // renewalAt is the point in time at which the token should be renewed - renewalAt := acc.CreationTimestamp.Time.Add(renewalAfter) + renewalAt := acc.CreationTimestamp.Add(renewalAfter) return renewalAt } diff --git a/internal/controller/core/authentication/controller.go b/internal/controller/core/authentication/controller.go index 9744647..f83244e 100644 --- a/internal/controller/core/authentication/controller.go +++ b/internal/controller/core/authentication/controller.go @@ -67,8 +67,8 @@ func (ar *AuthenticationReconciler) SetAPIServerAccess(apiServerAccess apiserver ar.APIServerAccess = apiServerAccess } -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=authentications,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=authentications/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=authentications,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=authentications/status,verbs=get;update;patch // Reconcile reconciles authentications and updates Gardener OpenIDConnect resources func (ar *AuthenticationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { @@ -96,7 +96,7 @@ func (ar *AuthenticationReconciler) reconcile(ctx context.Context, req ctrl.Requ log.Debug("Resource not found") return components.ReconcileResult[*openmcpv1alpha1.Authentication]{} } - return components.ReconcileResult[*openmcpv1alpha1.Authentication]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.NamespacedName.String(), err), cconst.ReasonCrateClusterInteractionProblem)} + return components.ReconcileResult[*openmcpv1alpha1.Authentication]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.String(), err), cconst.ReasonCrateClusterInteractionProblem)} } // handle operation annotation diff --git a/internal/controller/core/authorization/controller.go b/internal/controller/core/authorization/controller.go index a14f195..211925b 100644 --- a/internal/controller/core/authorization/controller.go +++ b/internal/controller/core/authorization/controller.go @@ -85,7 +85,7 @@ func (ar *AuthorizationReconciler) reconcile(ctx context.Context, req ctrl.Reque log.Debug("Resource not found") return componentutils.ReconcileResult[*openmcpv1alpha1.Authorization]{} } - return componentutils.ReconcileResult[*openmcpv1alpha1.Authorization]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.NamespacedName.String(), err), cconst.ReasonCrateClusterInteractionProblem)} + return componentutils.ReconcileResult[*openmcpv1alpha1.Authorization]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.String(), err), cconst.ReasonCrateClusterInteractionProblem)} } // handle operation annotation diff --git a/internal/controller/core/cloudorchestrator/controller.go b/internal/controller/core/cloudorchestrator/controller.go index 541df52..198bfed 100644 --- a/internal/controller/core/cloudorchestrator/controller.go +++ b/internal/controller/core/cloudorchestrator/controller.go @@ -65,12 +65,12 @@ type CloudOrchestratorReconciler struct { CrateClient client.Client } -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=cloudorchestrators,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=cloudorchestrators/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=cloudorchestrators/finalizers,verbs=update -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers/finalizers,verbs=update -//+kubebuilder:rbac:groups=*,resources=*,verbs=* -//+kubebuilder:rbac:urls=*,verbs=* +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=cloudorchestrators,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=cloudorchestrators/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=cloudorchestrators/finalizers,verbs=update +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=apiservers/finalizers,verbs=update +// +kubebuilder:rbac:groups=*,resources=*,verbs=* +// +kubebuilder:rbac:urls=*,verbs=* func (r *CloudOrchestratorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log, ctx := utils.InitializeControllerLogger(ctx, ControllerName) @@ -332,35 +332,35 @@ func convertToControlPlaneSpec(coSpec *openmcpv1alpha1.CloudOrchestratorSpec, ap } if coSpec.Crossplane != nil { - controlPlaneSpec.ComponentsConfig.Crossplane = &corev1beta1.CrossplaneConfig{ + controlPlaneSpec.Crossplane = &corev1beta1.CrossplaneConfig{ Version: coSpec.Crossplane.Version, Providers: convertCrossplaneProviders(coSpec.Crossplane.Providers), } } if coSpec.BTPServiceOperator != nil { - controlPlaneSpec.ComponentsConfig.BTPServiceOperator = &corev1beta1.BTPServiceOperatorConfig{ + controlPlaneSpec.BTPServiceOperator = &corev1beta1.BTPServiceOperatorConfig{ Version: coSpec.BTPServiceOperator.Version, } - controlPlaneSpec.ComponentsConfig.CertManager = &corev1beta1.CertManagerConfig{ + controlPlaneSpec.CertManager = &corev1beta1.CertManagerConfig{ Version: "1.16.1", } } if coSpec.ExternalSecretsOperator != nil { - controlPlaneSpec.ComponentsConfig.ExternalSecretsOperator = &corev1beta1.ExternalSecretsOperatorConfig{ + controlPlaneSpec.ExternalSecretsOperator = &corev1beta1.ExternalSecretsOperatorConfig{ Version: coSpec.ExternalSecretsOperator.Version, } } if coSpec.Kyverno != nil { - controlPlaneSpec.ComponentsConfig.Kyverno = &corev1beta1.KyvernoConfig{ + controlPlaneSpec.Kyverno = &corev1beta1.KyvernoConfig{ Version: coSpec.Kyverno.Version, } } if coSpec.Flux != nil { - controlPlaneSpec.ComponentsConfig.Flux = &corev1beta1.FluxConfig{ + controlPlaneSpec.Flux = &corev1beta1.FluxConfig{ Version: coSpec.Flux.Version, Values: &apiextensionsv1.JSON{Raw: fluxValues}, } diff --git a/internal/controller/core/landscaper/controller.go b/internal/controller/core/landscaper/controller.go index 71d8c4d..1f85d84 100644 --- a/internal/controller/core/landscaper/controller.go +++ b/internal/controller/core/landscaper/controller.go @@ -58,8 +58,8 @@ func (r *LandscaperConnector) SetAPIServerAccess(apiServerAccess apiserver.APISe r.ApiServerAccess = apiServerAccess } -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes/status,verbs=get;update;patch func (r *LandscaperConnector) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { log, ctx := utils.InitializeControllerLogger(ctx, ControllerName) @@ -86,7 +86,7 @@ func (r *LandscaperConnector) reconcile(ctx context.Context, req ctrl.Request) c log.Debug("Resource not found") return components.ReconcileResult[*openmcpv1alpha1.Landscaper]{} } - return components.ReconcileResult[*openmcpv1alpha1.Landscaper]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.NamespacedName.String(), err), cconst.ReasonCrateClusterInteractionProblem)} + return components.ReconcileResult[*openmcpv1alpha1.Landscaper]{ReconcileError: openmcperrors.WithReason(fmt.Errorf("unable to get resource '%s' from cluster: %w", req.String(), err), cconst.ReasonCrateClusterInteractionProblem)} } // handle operation annotation @@ -241,7 +241,7 @@ func (r *LandscaperConnector) handleCreateOrUpdate(ctx context.Context, ls *open ld = generatedLD log = log.WithValues("ldNamespace", ld.Namespace, "ldName", ld.Name) - //check if namespace exists and create if necessary + // check if namespace exists and create if necessary targetNamespace := &corev1.Namespace{} targetNamespace.SetName(ld.Namespace) targetNamespace.SetLabels(map[string]string{ diff --git a/internal/controller/core/managedcontrolplane/controller.go b/internal/controller/core/managedcontrolplane/controller.go index adba07f..aa8b651 100644 --- a/internal/controller/core/managedcontrolplane/controller.go +++ b/internal/controller/core/managedcontrolplane/controller.go @@ -44,9 +44,9 @@ func NewManagedControlPlaneController(c client.Client) *ManagedControlPlaneContr } } -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes,verbs=get;list;watch;create;update;patch;delete -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes/status,verbs=get;update;patch -//+kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes/finalizers,verbs=update +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=core.openmcp.cloud,resources=managedcontrolplanes/finalizers,verbs=update // Reconcile is part of the main kubernetes reconciliation loop which aims to // move the current state of the cluster closer to the desired state. diff --git a/internal/controller/core/managedcontrolplane/conversion.go b/internal/controller/core/managedcontrolplane/conversion.go index 3880390..53ad464 100644 --- a/internal/controller/core/managedcontrolplane/conversion.go +++ b/internal/controller/core/managedcontrolplane/conversion.go @@ -15,7 +15,7 @@ import ( ) // ManagedControlPlaneToSplitInternalResources converts the given v1alpha1.ManagedControlPlane into multiple internal resources. -// The returned map contains only those componentes, for which the ManagedControlPlane contains configuration. +// The returned map contains only those components for which the ManagedControlPlane contains configuration. func (*ManagedControlPlaneController) ManagedControlPlaneToSplitInternalResources(mcp *openmcpv1alpha1.ManagedControlPlane, icfg *openmcpv1alpha1.InternalConfiguration, ns *corev1.Namespace, scheme *runtime.Scheme, addReconcileAnnotation bool) (map[openmcpv1alpha1.ComponentType]*components.ComponentHandler, error) { if mcp == nil { return nil, nil diff --git a/internal/releasechannel/managedcomponents_test.go b/internal/releasechannel/managedcomponents_test.go index 0c978d7..a9b72c7 100644 --- a/internal/releasechannel/managedcomponents_test.go +++ b/internal/releasechannel/managedcomponents_test.go @@ -77,10 +77,10 @@ var _ = Describe("CO-1153 ReleasechannelRunnable", func() { } } - //err := crateClient.Create(env.Ctx, &managedComponent) - //if err != nil { - // Fail(err.Error()) - //} + // err := crateClient.Create(env.Ctx, &managedComponent) + // if err != nil { + // Fail(err.Error()) + // } Expect(coreClient).ToNot(BeNil()) Expect(crateClient).ToNot(BeNil()) diff --git a/internal/utils/components/components.go b/internal/utils/components/components.go index a2b8635..dd609c0 100644 --- a/internal/utils/components/components.go +++ b/internal/utils/components/components.go @@ -191,7 +191,7 @@ func UpdateStatus[T components.Component](ctx context.Context, c client.Client, } reqCons := rr.Component.GetRequiredConditions() if reqCons != nil && reqCons.Has(rr.Component.Type().HealthyCondition()) && !cu.HasCondition(rr.Component.Type().HealthyCondition()) && rr.ReconcileError != nil { - // if an error occured during the reconciliation and the component is expected to expose a Healthy condition, which is missing, put a reconciliation error into the condition + // if an error occurred during the reconciliation and the component is expected to expose a Healthy condition, which is missing, put a reconciliation error into the condition cu.UpdateCondition(rr.Component.Type().HealthyCondition(), openmcpv1alpha1.ComponentConditionStatusFalse, cconst.ReasonReconciliationError, cconst.MessageReconciliationError) } for eCon := range rr.Component.GetRequiredConditions() { @@ -243,7 +243,7 @@ type ReconcileResult[T components.Component] struct { // Conditions contains a list of conditions that should be updated on the component. // Note that this must not contain the Reconciliation condition, as that one is constructed from this struct's other fields. // Also note that names of conditions are globally unique, so take care to avoid conflicts with other components. - // Futhermore, all conditions on the component resource that are not included in this list anymore will be removed. + // Furthermore, all conditions on the component resource that are not included in this list anymore will be removed. // The lastTransition timestamp of the condition will be overwritten with the current time while updating. Conditions []openmcpv1alpha1.ComponentCondition } diff --git a/internal/utils/components/conditions.go b/internal/utils/components/conditions.go index 39196c6..786f308 100644 --- a/internal/utils/components/conditions.go +++ b/internal/utils/components/conditions.go @@ -157,7 +157,7 @@ func IsComponentReady(comp components.Component, relevantConditions ...string) b // The generation of the InternalConfiguration is expected to be -1, if no InternalConfiguration exists. // The generation of the component resource can be set to -1 if it is not known (it will then be ignored). func IsComponentReadyRaw(cpGen, icGen, rGen int64, obsGen openmcpv1alpha1.ObservedGenerations, conditions ...openmcpv1alpha1.ComponentCondition) bool { - if !(obsGen.ManagedControlPlane == cpGen && obsGen.InternalConfiguration == icGen && (rGen < 0 || obsGen.Resource == rGen)) { + if !(obsGen.ManagedControlPlane == cpGen && obsGen.InternalConfiguration == icGen && (rGen < 0 || obsGen.Resource == rGen)) { //nolint:staticcheck return false } for _, con := range conditions { diff --git a/internal/utils/components/patch_test.go b/internal/utils/components/patch_test.go index f24dfac..2738634 100644 --- a/internal/utils/components/patch_test.go +++ b/internal/utils/components/patch_test.go @@ -19,12 +19,12 @@ var _ = Describe("Patch", func() { Context("IsAnnotationAlreadyExistsError", func() { It("should return true if the error is of type AnnotationAlreadyExistsError", func() { - var err error = componentutils.NewAnnotationAlreadyExistsError("test-annotation", "desired-value", "actual-value") + err := componentutils.NewAnnotationAlreadyExistsError("test-annotation", "desired-value", "actual-value") Expect(componentutils.IsAnnotationAlreadyExistsError(err)).To(BeTrue()) }) It("should return false if the error is not of type AnnotationAlreadyExistsError", func() { - var err error = fmt.Errorf("test-error") + err := fmt.Errorf("test-error") Expect(componentutils.IsAnnotationAlreadyExistsError(err)).To(BeFalse()) }) diff --git a/internal/utils/region/region.go b/internal/utils/region/region.go index 677620c..9e7995a 100644 --- a/internal/utils/region/region.go +++ b/internal/utils/region/region.go @@ -126,7 +126,7 @@ func (g Geography) SortByProximity(start openmcpv1alpha1.RegionSpecification, pr continue } addDummy = true - if !(preferSameRegion && !sameRegionPriorityMode && cur.Name == start.Name) { + if !(preferSameRegion && !sameRegionPriorityMode && cur.Name == start.Name) { //nolint:staticcheck curRes = append(curRes, cur) } visited.Insert(cur) diff --git a/test/utils/test.go b/test/utils/test.go index 59c8c9a..764f6f4 100644 --- a/test/utils/test.go +++ b/test/utils/test.go @@ -47,7 +47,7 @@ func DefaultTestSetupBuilder(testDirPathSegments ...string) *testing.ComplexEnvi builder := testing.NewComplexEnvironmentBuilder(). WithFakeClient(CrateCluster, Scheme) - if len(testDirPathSegments) > 0 && !(len(testDirPathSegments) == 1 && testDirPathSegments[0] == "") { + if len(testDirPathSegments) > 0 && !(len(testDirPathSegments) == 1 && testDirPathSegments[0] == "") { //nolint:staticcheck builder.WithInitObjectPath(CrateCluster, testDirPathSegments...) apiServerDir := path.Join(path.Join(testDirPathSegments...), "apiserver") _, err := os.Stat(apiServerDir) From 1321ec9ecd67787807690680d8290843a35bb69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Wannenmacher?= Date: Mon, 19 May 2025 14:59:31 +0200 Subject: [PATCH 4/7] fix: if statement --- api/core/v1alpha1/authentication_defaults.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/v1alpha1/authentication_defaults.go b/api/core/v1alpha1/authentication_defaults.go index 4972f7a..513faa9 100644 --- a/api/core/v1alpha1/authentication_defaults.go +++ b/api/core/v1alpha1/authentication_defaults.go @@ -79,7 +79,7 @@ func ValidateIdp(idp IdentityProvider, fldPath *field.Path) field.ErrorList { // isLowerCaseLetter checks if the given string is a lowercase letter. func isLowerCaseLetter(s string) bool { for _, r := range s { - if !unicode.IsLetter(r) && !unicode.IsLower(r) { + if !(unicode.IsLetter(r) && unicode.IsLower(r)) { //nolint:staticcheck return false } } From 3ed2375cf9051744dc036b5c7987e514e14c1e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Wannenmacher?= Date: Mon, 19 May 2025 15:03:52 +0200 Subject: [PATCH 5/7] fix: revert misspell fix on CRD --- api/core/v1alpha1/authorization_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/v1alpha1/authorization_types.go b/api/core/v1alpha1/authorization_types.go index fad6452..6255e3e 100644 --- a/api/core/v1alpha1/authorization_types.go +++ b/api/core/v1alpha1/authorization_types.go @@ -166,7 +166,7 @@ type ClusterAdminStatus struct { // +kubebuilder:subresource:status // ClusterAdmin is the Schema for the cluster admin API -// +kubebuilder:resource:shortName=class +// +kubebuilder:resource:shortName=clas // +kubebuilder:printcolumn:name="Active",type=string,JSONPath=`.status.active` // +kubebuilder:printcolumn:name="Activated",type="date",JSONPath=".status.activationTime" // +kubebuilder:printcolumn:name="Expiration",type="string",JSONPath=".status.expirationTime" From b72d23231902e47152505ce14f11b17acee366ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Wannenmacher?= Date: Mon, 19 May 2025 15:15:56 +0200 Subject: [PATCH 6/7] fix: ignore misspell word "clas" --- .golangci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yaml b/.golangci.yaml index c30110f..f5ed762 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -19,6 +19,9 @@ linters: revive: rules: - name: comment-spacings + misspell: + ignore-rules: + - "clas" exclusions: generated: lax rules: From c885694c89789952aa0c55d97ae176d4fe690676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Wannenmacher?= Date: Mon, 19 May 2025 16:47:05 +0200 Subject: [PATCH 7/7] chore: task generate --- api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml b/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml index 5c00a2b..4aa8cda 100644 --- a/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml +++ b/api/crds/manifests/core.openmcp.cloud_clusteradmins.yaml @@ -12,7 +12,7 @@ spec: listKind: ClusterAdminList plural: clusteradmins shortNames: - - class + - clas singular: clusteradmin scope: Namespaced versions: