From 5dfccc54a0bedb1f650c333c5572322732deca81 Mon Sep 17 00:00:00 2001 From: Matthew Booth Date: Mon, 23 Dec 2024 16:28:06 +0000 Subject: [PATCH] Add all CRDs to the k-orc category This allows the user to do 'kubectl get k-orc' to list all ORC resources of every type. --- api/v1alpha1/zz_generated.flavor-resource.go | 1 + api/v1alpha1/zz_generated.image-resource.go | 1 + api/v1alpha1/zz_generated.network-resource.go | 1 + api/v1alpha1/zz_generated.port-resource.go | 1 + api/v1alpha1/zz_generated.router-resource.go | 1 + api/v1alpha1/zz_generated.securitygroup-resource.go | 1 + api/v1alpha1/zz_generated.server-resource.go | 1 + api/v1alpha1/zz_generated.subnet-resource.go | 1 + cmd/resource-generator/data/api.template | 1 + config/crd/bases/openstack.k-orc.cloud_flavors.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_images.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_networks.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_ports.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_routers.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_securitygroups.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_servers.yaml | 2 ++ config/crd/bases/openstack.k-orc.cloud_subnets.yaml | 2 ++ 17 files changed, 25 insertions(+) diff --git a/api/v1alpha1/zz_generated.flavor-resource.go b/api/v1alpha1/zz_generated.flavor-resource.go index 2171e855..52e1ae22 100644 --- a/api/v1alpha1/zz_generated.flavor-resource.go +++ b/api/v1alpha1/zz_generated.flavor-resource.go @@ -118,6 +118,7 @@ func (i *Flavor) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.image-resource.go b/api/v1alpha1/zz_generated.image-resource.go index 87089b93..6f0bc8c6 100644 --- a/api/v1alpha1/zz_generated.image-resource.go +++ b/api/v1alpha1/zz_generated.image-resource.go @@ -121,6 +121,7 @@ func (i *Image) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.network-resource.go b/api/v1alpha1/zz_generated.network-resource.go index 922527f5..06aa92f4 100644 --- a/api/v1alpha1/zz_generated.network-resource.go +++ b/api/v1alpha1/zz_generated.network-resource.go @@ -118,6 +118,7 @@ func (i *Network) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.port-resource.go b/api/v1alpha1/zz_generated.port-resource.go index bdcf76d6..09cee9ac 100644 --- a/api/v1alpha1/zz_generated.port-resource.go +++ b/api/v1alpha1/zz_generated.port-resource.go @@ -120,6 +120,7 @@ func (i *Port) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.router-resource.go b/api/v1alpha1/zz_generated.router-resource.go index 9eb87208..b3169706 100644 --- a/api/v1alpha1/zz_generated.router-resource.go +++ b/api/v1alpha1/zz_generated.router-resource.go @@ -118,6 +118,7 @@ func (i *Router) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.securitygroup-resource.go b/api/v1alpha1/zz_generated.securitygroup-resource.go index f4ac3a19..cb8882d4 100644 --- a/api/v1alpha1/zz_generated.securitygroup-resource.go +++ b/api/v1alpha1/zz_generated.securitygroup-resource.go @@ -118,6 +118,7 @@ func (i *SecurityGroup) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.server-resource.go b/api/v1alpha1/zz_generated.server-resource.go index 69c3a4a2..00d64e9e 100644 --- a/api/v1alpha1/zz_generated.server-resource.go +++ b/api/v1alpha1/zz_generated.server-resource.go @@ -118,6 +118,7 @@ func (i *Server) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/api/v1alpha1/zz_generated.subnet-resource.go b/api/v1alpha1/zz_generated.subnet-resource.go index 49ee8527..a1528952 100644 --- a/api/v1alpha1/zz_generated.subnet-resource.go +++ b/api/v1alpha1/zz_generated.subnet-resource.go @@ -120,6 +120,7 @@ func (i *Subnet) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/cmd/resource-generator/data/api.template b/cmd/resource-generator/data/api.template index 90be945d..2624c69b 100644 --- a/cmd/resource-generator/data/api.template +++ b/cmd/resource-generator/data/api.template @@ -127,6 +127,7 @@ func (i *{{ .Name }}) GetConditions() []metav1.Condition { // +genclient // +kubebuilder:object:root=true +// +kubebuilder:resource:categories=k-orc // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Resource ID" // +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.conditions[?(@.type=='Available')].status",description="Availability status of resource" diff --git a/config/crd/bases/openstack.k-orc.cloud_flavors.yaml b/config/crd/bases/openstack.k-orc.cloud_flavors.yaml index dcb5d124..fe52fda6 100644 --- a/config/crd/bases/openstack.k-orc.cloud_flavors.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_flavors.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Flavor listKind: FlavorList plural: flavors diff --git a/config/crd/bases/openstack.k-orc.cloud_images.yaml b/config/crd/bases/openstack.k-orc.cloud_images.yaml index 7710f533..19e54478 100644 --- a/config/crd/bases/openstack.k-orc.cloud_images.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_images.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Image listKind: ImageList plural: images diff --git a/config/crd/bases/openstack.k-orc.cloud_networks.yaml b/config/crd/bases/openstack.k-orc.cloud_networks.yaml index 497fbed2..94316d8a 100644 --- a/config/crd/bases/openstack.k-orc.cloud_networks.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_networks.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Network listKind: NetworkList plural: networks diff --git a/config/crd/bases/openstack.k-orc.cloud_ports.yaml b/config/crd/bases/openstack.k-orc.cloud_ports.yaml index 4a19dd3b..c4006f32 100644 --- a/config/crd/bases/openstack.k-orc.cloud_ports.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_ports.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Port listKind: PortList plural: ports diff --git a/config/crd/bases/openstack.k-orc.cloud_routers.yaml b/config/crd/bases/openstack.k-orc.cloud_routers.yaml index 0fc9fcd8..0fa462dc 100644 --- a/config/crd/bases/openstack.k-orc.cloud_routers.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_routers.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Router listKind: RouterList plural: routers diff --git a/config/crd/bases/openstack.k-orc.cloud_securitygroups.yaml b/config/crd/bases/openstack.k-orc.cloud_securitygroups.yaml index 18cc5162..6c1f3f78 100644 --- a/config/crd/bases/openstack.k-orc.cloud_securitygroups.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_securitygroups.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: SecurityGroup listKind: SecurityGroupList plural: securitygroups diff --git a/config/crd/bases/openstack.k-orc.cloud_servers.yaml b/config/crd/bases/openstack.k-orc.cloud_servers.yaml index 03d2d344..e87262cf 100644 --- a/config/crd/bases/openstack.k-orc.cloud_servers.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_servers.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Server listKind: ServerList plural: servers diff --git a/config/crd/bases/openstack.k-orc.cloud_subnets.yaml b/config/crd/bases/openstack.k-orc.cloud_subnets.yaml index 92d950da..ea448fb8 100644 --- a/config/crd/bases/openstack.k-orc.cloud_subnets.yaml +++ b/config/crd/bases/openstack.k-orc.cloud_subnets.yaml @@ -8,6 +8,8 @@ metadata: spec: group: openstack.k-orc.cloud names: + categories: + - k-orc kind: Subnet listKind: SubnetList plural: subnets