From e02dc5a90914222d40727357000a6b8c4621f16e Mon Sep 17 00:00:00 2001 From: Mikhail Fedosin Date: Wed, 17 Jan 2024 11:06:59 +0100 Subject: [PATCH] Add short names for custom resources --- api/v1alpha2/addonprovider_types.go | 1 + api/v1alpha2/bootstrapprovider_types.go | 1 + api/v1alpha2/controlplaneprovider_types.go | 1 + api/v1alpha2/coreprovider_types.go | 1 + api/v1alpha2/infrastructureprovider_types.go | 1 + api/v1alpha2/ipamprovider_types.go | 1 + .../operator.cluster.x-k8s.io_addonproviders.yaml | 2 ++ ...operator.cluster.x-k8s.io_bootstrapproviders.yaml | 2 ++ ...rator.cluster.x-k8s.io_controlplaneproviders.yaml | 2 ++ .../operator.cluster.x-k8s.io_coreproviders.yaml | 2 ++ ...tor.cluster.x-k8s.io_infrastructureproviders.yaml | 2 ++ .../operator.cluster.x-k8s.io_ipamproviders.yaml | 2 ++ test/e2e/resources/full-chart-install.yaml | 12 ++++++++++++ 13 files changed, 30 insertions(+) diff --git a/api/v1alpha2/addonprovider_types.go b/api/v1alpha2/addonprovider_types.go index 61d37eead..3685a13a0 100644 --- a/api/v1alpha2/addonprovider_types.go +++ b/api/v1alpha2/addonprovider_types.go @@ -31,6 +31,7 @@ type AddonProviderStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:path=addonproviders,shortName=caap,scope=Namespaced // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" diff --git a/api/v1alpha2/bootstrapprovider_types.go b/api/v1alpha2/bootstrapprovider_types.go index 3cee449ed..683e2f879 100644 --- a/api/v1alpha2/bootstrapprovider_types.go +++ b/api/v1alpha2/bootstrapprovider_types.go @@ -31,6 +31,7 @@ type BootstrapProviderStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:path=bootstrapproviders,shortName=cabp,scope=Namespaced // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" diff --git a/api/v1alpha2/controlplaneprovider_types.go b/api/v1alpha2/controlplaneprovider_types.go index 3b76824ed..51ba72c54 100644 --- a/api/v1alpha2/controlplaneprovider_types.go +++ b/api/v1alpha2/controlplaneprovider_types.go @@ -31,6 +31,7 @@ type ControlPlaneProviderStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:path=controlplaneproviders,shortName=cacpp,scope=Namespaced // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" diff --git a/api/v1alpha2/coreprovider_types.go b/api/v1alpha2/coreprovider_types.go index ae7ce15ca..cf752d5a3 100644 --- a/api/v1alpha2/coreprovider_types.go +++ b/api/v1alpha2/coreprovider_types.go @@ -31,6 +31,7 @@ type CoreProviderStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:path=coreproviders,shortName=cacp,scope=Namespaced // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" diff --git a/api/v1alpha2/infrastructureprovider_types.go b/api/v1alpha2/infrastructureprovider_types.go index 27a97466a..b09f5c037 100644 --- a/api/v1alpha2/infrastructureprovider_types.go +++ b/api/v1alpha2/infrastructureprovider_types.go @@ -31,6 +31,7 @@ type InfrastructureProviderStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:path=infrastructureproviders,shortName=caip,scope=Namespaced // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" diff --git a/api/v1alpha2/ipamprovider_types.go b/api/v1alpha2/ipamprovider_types.go index 996161069..01b2f7c4d 100644 --- a/api/v1alpha2/ipamprovider_types.go +++ b/api/v1alpha2/ipamprovider_types.go @@ -31,6 +31,7 @@ type IPAMProviderStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:resource:path=ipamproviders,shortName=caipamp,scope=Namespaced // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="InstalledVersion",type="string",JSONPath=".status.installedVersion" // +kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" diff --git a/config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml b/config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml index 452e5a95c..0dd382e58 100644 --- a/config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml +++ b/config/crd/bases/operator.cluster.x-k8s.io_addonproviders.yaml @@ -11,6 +11,8 @@ spec: kind: AddonProvider listKind: AddonProviderList plural: addonproviders + shortNames: + - caap singular: addonprovider scope: Namespaced versions: diff --git a/config/crd/bases/operator.cluster.x-k8s.io_bootstrapproviders.yaml b/config/crd/bases/operator.cluster.x-k8s.io_bootstrapproviders.yaml index 2e04be231..76f18435d 100644 --- a/config/crd/bases/operator.cluster.x-k8s.io_bootstrapproviders.yaml +++ b/config/crd/bases/operator.cluster.x-k8s.io_bootstrapproviders.yaml @@ -11,6 +11,8 @@ spec: kind: BootstrapProvider listKind: BootstrapProviderList plural: bootstrapproviders + shortNames: + - cabp singular: bootstrapprovider scope: Namespaced versions: diff --git a/config/crd/bases/operator.cluster.x-k8s.io_controlplaneproviders.yaml b/config/crd/bases/operator.cluster.x-k8s.io_controlplaneproviders.yaml index 6e288462b..043434c4f 100644 --- a/config/crd/bases/operator.cluster.x-k8s.io_controlplaneproviders.yaml +++ b/config/crd/bases/operator.cluster.x-k8s.io_controlplaneproviders.yaml @@ -11,6 +11,8 @@ spec: kind: ControlPlaneProvider listKind: ControlPlaneProviderList plural: controlplaneproviders + shortNames: + - cacpp singular: controlplaneprovider scope: Namespaced versions: diff --git a/config/crd/bases/operator.cluster.x-k8s.io_coreproviders.yaml b/config/crd/bases/operator.cluster.x-k8s.io_coreproviders.yaml index b1d50c4d7..21742395b 100644 --- a/config/crd/bases/operator.cluster.x-k8s.io_coreproviders.yaml +++ b/config/crd/bases/operator.cluster.x-k8s.io_coreproviders.yaml @@ -11,6 +11,8 @@ spec: kind: CoreProvider listKind: CoreProviderList plural: coreproviders + shortNames: + - cacp singular: coreprovider scope: Namespaced versions: diff --git a/config/crd/bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml b/config/crd/bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml index 6d85fbbcc..bfb21cf35 100644 --- a/config/crd/bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml +++ b/config/crd/bases/operator.cluster.x-k8s.io_infrastructureproviders.yaml @@ -11,6 +11,8 @@ spec: kind: InfrastructureProvider listKind: InfrastructureProviderList plural: infrastructureproviders + shortNames: + - caip singular: infrastructureprovider scope: Namespaced versions: diff --git a/config/crd/bases/operator.cluster.x-k8s.io_ipamproviders.yaml b/config/crd/bases/operator.cluster.x-k8s.io_ipamproviders.yaml index fa5844a43..990bd0558 100644 --- a/config/crd/bases/operator.cluster.x-k8s.io_ipamproviders.yaml +++ b/config/crd/bases/operator.cluster.x-k8s.io_ipamproviders.yaml @@ -11,6 +11,8 @@ spec: kind: IPAMProvider listKind: IPAMProviderList plural: ipamproviders + shortNames: + - caipamp singular: ipamprovider scope: Namespaced versions: diff --git a/test/e2e/resources/full-chart-install.yaml b/test/e2e/resources/full-chart-install.yaml index 12fdd5231..5f25f3dbd 100644 --- a/test/e2e/resources/full-chart-install.yaml +++ b/test/e2e/resources/full-chart-install.yaml @@ -27,6 +27,8 @@ spec: kind: AddonProvider listKind: AddonProviderList plural: addonproviders + shortNames: + - caap singular: addonprovider scope: Namespaced versions: @@ -1591,6 +1593,8 @@ spec: kind: BootstrapProvider listKind: BootstrapProviderList plural: bootstrapproviders + shortNames: + - cabp singular: bootstrapprovider scope: Namespaced versions: @@ -4684,6 +4688,8 @@ spec: kind: ControlPlaneProvider listKind: ControlPlaneProviderList plural: controlplaneproviders + shortNames: + - cacpp singular: controlplaneprovider scope: Namespaced versions: @@ -7781,6 +7787,8 @@ spec: kind: CoreProvider listKind: CoreProviderList plural: coreproviders + shortNames: + - cacp singular: coreprovider scope: Namespaced versions: @@ -10874,6 +10882,8 @@ spec: kind: InfrastructureProvider listKind: InfrastructureProviderList plural: infrastructureproviders + shortNames: + - caip singular: infrastructureprovider scope: Namespaced versions: @@ -13971,6 +13981,8 @@ spec: kind: IPAMProvider listKind: IPAMProviderList plural: ipamproviders + shortNames: + - caipamp singular: ipamprovider scope: Namespaced versions: