Skip to content

Commit

Permalink
feat: Add proper categories for CRDs (#1337)
Browse files Browse the repository at this point in the history
* feat: Add proper categories for CRDs

* fix

---------

Co-authored-by: Marek Kołodziejczak <69915024+kolodziejczak@users.noreply.github.com>
  • Loading branch information
a-thaler and kolodziejczak authored Oct 4, 2024
1 parent 76f323b commit c90a235
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions apis/gateway/v1beta1/apirule_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func (s *APIRuleStatus) ApiRuleStatusVersion() versions.Version {
// APIRule is the Schema for ApiRule APIs.
// +kubebuilder:storageversion
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={kyma-api-gateway}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.APIRuleStatus.code"
// +kubebuilder:printcolumn:name="Host",type="string",JSONPath=".spec.host"
Expand Down
1 change: 1 addition & 0 deletions apis/gateway/v2alpha1/apirule_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func (s *APIRuleStatus) ApiRuleStatusVersion() versions.Version {
// APIRule is the Schema for ApiRule APIs.
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:resource:categories={kyma-api-gateway}
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.state"
// +kubebuilder:printcolumn:name="Hosts",type="string",JSONPath=".spec.hosts"
type APIRule struct {
Expand Down
2 changes: 1 addition & 1 deletion apis/operator/v1alpha1/apigateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type APIGatewayStatus struct {
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:JSONPath=".status.state",name="State",type="string"
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:resource:scope=Cluster,categories={kyma-modules,kyma-api-gateway}

// APIGateway is the Schema for the apigateways API
type APIGateway struct {
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/gateway.kyma-project.io_apirules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
spec:
group: gateway.kyma-project.io
names:
categories:
- kyma-api-gateway
kind: APIRule
listKind: APIRuleList
plural: apirules
Expand Down
3 changes: 3 additions & 0 deletions config/crd/bases/operator.kyma-project.io_apigateways.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ metadata:
spec:
group: operator.kyma-project.io
names:
categories:
- kyma-modules
- kyma-api-gateway
kind: APIGateway
listKind: APIGatewayList
plural: apigateways
Expand Down

0 comments on commit c90a235

Please sign in to comment.