diff --git a/api/v2/apisixconsumer_types.go b/api/v2/apisixconsumer_types.go index 8207d6802..33360a4e4 100644 --- a/api/v2/apisixconsumer_types.go +++ b/api/v2/apisixconsumer_types.go @@ -33,6 +33,7 @@ type ApisixConsumerStatus = ApisixStatus // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=ac // ApisixConsumer is the Schema for the apisixconsumers API. type ApisixConsumer struct { diff --git a/api/v2/apisixglobalrule_types.go b/api/v2/apisixglobalrule_types.go index 85e1402ac..69380591a 100644 --- a/api/v2/apisixglobalrule_types.go +++ b/api/v2/apisixglobalrule_types.go @@ -31,6 +31,7 @@ type ApisixGlobalRuleStatus = ApisixStatus // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=agr // ApisixGlobalRule is the Schema for the apisixglobalrules API. type ApisixGlobalRule struct { diff --git a/api/v2/apisixpluginconfig_types.go b/api/v2/apisixpluginconfig_types.go index 8abbe6c75..7181f2f49 100644 --- a/api/v2/apisixpluginconfig_types.go +++ b/api/v2/apisixpluginconfig_types.go @@ -32,6 +32,7 @@ type ApisixPluginConfigStatus = ApisixStatus // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=apc // ApisixPluginConfig is the Schema for the apisixpluginconfigs API. type ApisixPluginConfig struct { diff --git a/api/v2/apisixroute_types.go b/api/v2/apisixroute_types.go index 6208b35ef..ec6369ea5 100644 --- a/api/v2/apisixroute_types.go +++ b/api/v2/apisixroute_types.go @@ -35,6 +35,13 @@ type ApisixRouteStatus = ApisixStatus // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=ar +// +kubebuilder:printcolumn:name="Hosts",type="string",JSONPath=".spec.http[].match.hosts",description="HTTP Hosts",priority=0 +// +kubebuilder:printcolumn:name="URIs",type="string",JSONPath=".spec.http[].match.paths",description="HTTP Paths",priority=0 +// +kubebuilder:printcolumn:name="Target Service (HTTP)",type="string",JSONPath=".spec.http[].backends[].serviceName",description="Backend Service for HTTP",priority=1 +// +kubebuilder:printcolumn:name="Ingress Port (TCP)",type="integer",JSONPath=".spec.tcp[].match.ingressPort",description="TCP Ingress Port",priority=1 +// +kubebuilder:printcolumn:name="Target Service (TCP)",type="string",JSONPath=".spec.tcp[].match.backend.serviceName",description="Backend Service for TCP",priority=1 +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Creation time",priority=0 // ApisixRoute is the Schema for the apisixroutes API. type ApisixRoute struct { diff --git a/api/v2/apisixtls_types.go b/api/v2/apisixtls_types.go index cc8462c9b..5941a0011 100644 --- a/api/v2/apisixtls_types.go +++ b/api/v2/apisixtls_types.go @@ -37,6 +37,12 @@ type ApisixTlsStatus = ApisixStatus // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:shortName=atls,path=apisixtlses +// +kubebuilder:printcolumn:name="SNIs",type=string,JSONPath=`.spec.hosts` +// +kubebuilder:printcolumn:name="Secret Name",type=string,JSONPath=`.spec.secret.name` +// +kubebuilder:printcolumn:name="Secret Namespace",type=string,JSONPath=`.spec.secret.namespace` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +// +kubebuilder:printcolumn:name="Client CA Secret Name",type=string,JSONPath=`.spec.client.ca.name` +// +kubebuilder:printcolumn:name="Client CA Secret Namespace",type=string,JSONPath=`.spec.client.ca.namespace` // ApisixTls is the Schema for the apisixtls API. type ApisixTls struct { @@ -47,14 +53,9 @@ type ApisixTls struct { Status ApisixTlsStatus `json:"status,omitempty"` } -// ApisixTlsList contains a list of ApisixTls. // +kubebuilder:object:root=true -// +kubebuilder:printcolumn:name="SNIs",type=string,JSONPath=`.spec.hosts` -// +kubebuilder:printcolumn:name="Secret Name",type=string,JSONPath=`.spec.secret.name` -// +kubebuilder:printcolumn:name="Secret Namespace",type=string,JSONPath=`.spec.secret.namespace` -// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` -// +kubebuilder:printcolumn:name="Client CA Secret Name",type=string,JSONPath=`.spec.client.ca.name` -// +kubebuilder:printcolumn:name="Client CA Secret Namespace",type=string,JSONPath=`.spec.client.ca.namespace` + +// ApisixTlsList contains a list of ApisixTls. type ApisixTlsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` diff --git a/api/v2/apisixupstream_types.go b/api/v2/apisixupstream_types.go index 23e47425d..4477eb606 100644 --- a/api/v2/apisixupstream_types.go +++ b/api/v2/apisixupstream_types.go @@ -42,6 +42,7 @@ type ApisixUpstreamStatus = ApisixStatus // +kubebuilder:object:root=true // +kubebuilder:subresource:status +// +kubebuilder:resource:shortName=au // ApisixUpstream is the Schema for the apisixupstreams API. type ApisixUpstream struct { diff --git a/config/crd/bases/apisix.apache.org_apisixconsumers.yaml b/config/crd/bases/apisix.apache.org_apisixconsumers.yaml index 248465021..b8ffd7340 100644 --- a/config/crd/bases/apisix.apache.org_apisixconsumers.yaml +++ b/config/crd/bases/apisix.apache.org_apisixconsumers.yaml @@ -11,6 +11,8 @@ spec: kind: ApisixConsumer listKind: ApisixConsumerList plural: apisixconsumers + shortNames: + - ac singular: apisixconsumer scope: Namespaced versions: diff --git a/config/crd/bases/apisix.apache.org_apisixglobalrules.yaml b/config/crd/bases/apisix.apache.org_apisixglobalrules.yaml index 670c495b4..2d7ca2d85 100644 --- a/config/crd/bases/apisix.apache.org_apisixglobalrules.yaml +++ b/config/crd/bases/apisix.apache.org_apisixglobalrules.yaml @@ -11,6 +11,8 @@ spec: kind: ApisixGlobalRule listKind: ApisixGlobalRuleList plural: apisixglobalrules + shortNames: + - agr singular: apisixglobalrule scope: Namespaced versions: diff --git a/config/crd/bases/apisix.apache.org_apisixpluginconfigs.yaml b/config/crd/bases/apisix.apache.org_apisixpluginconfigs.yaml index 4af1bcbc1..9300f7746 100644 --- a/config/crd/bases/apisix.apache.org_apisixpluginconfigs.yaml +++ b/config/crd/bases/apisix.apache.org_apisixpluginconfigs.yaml @@ -11,6 +11,8 @@ spec: kind: ApisixPluginConfig listKind: ApisixPluginConfigList plural: apisixpluginconfigs + shortNames: + - apc singular: apisixpluginconfig scope: Namespaced versions: diff --git a/config/crd/bases/apisix.apache.org_apisixroutes.yaml b/config/crd/bases/apisix.apache.org_apisixroutes.yaml index 13ce72edb..4fcd7744b 100644 --- a/config/crd/bases/apisix.apache.org_apisixroutes.yaml +++ b/config/crd/bases/apisix.apache.org_apisixroutes.yaml @@ -11,10 +11,40 @@ spec: kind: ApisixRoute listKind: ApisixRouteList plural: apisixroutes + shortNames: + - ar singular: apisixroute scope: Namespaced versions: - - name: v2 + - additionalPrinterColumns: + - description: HTTP Hosts + jsonPath: .spec.http[].match.hosts + name: Hosts + type: string + - description: HTTP Paths + jsonPath: .spec.http[].match.paths + name: URIs + type: string + - description: Backend Service for HTTP + jsonPath: .spec.http[].backends[].serviceName + name: Target Service (HTTP) + priority: 1 + type: string + - description: TCP Ingress Port + jsonPath: .spec.tcp[].match.ingressPort + name: Ingress Port (TCP) + priority: 1 + type: integer + - description: Backend Service for TCP + jsonPath: .spec.tcp[].match.backend.serviceName + name: Target Service (TCP) + priority: 1 + type: string + - description: Creation time + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v2 schema: openAPIV3Schema: description: ApisixRoute is the Schema for the apisixroutes API. diff --git a/config/crd/bases/apisix.apache.org_apisixtlses.yaml b/config/crd/bases/apisix.apache.org_apisixtlses.yaml index c384301f8..78926611a 100644 --- a/config/crd/bases/apisix.apache.org_apisixtlses.yaml +++ b/config/crd/bases/apisix.apache.org_apisixtlses.yaml @@ -16,7 +16,26 @@ spec: singular: apisixtls scope: Namespaced versions: - - name: v2 + - additionalPrinterColumns: + - jsonPath: .spec.hosts + name: SNIs + type: string + - jsonPath: .spec.secret.name + name: Secret Name + type: string + - jsonPath: .spec.secret.namespace + name: Secret Namespace + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.client.ca.name + name: Client CA Secret Name + type: string + - jsonPath: .spec.client.ca.namespace + name: Client CA Secret Namespace + type: string + name: v2 schema: openAPIV3Schema: description: ApisixTls is the Schema for the apisixtls API. diff --git a/config/crd/bases/apisix.apache.org_apisixupstreams.yaml b/config/crd/bases/apisix.apache.org_apisixupstreams.yaml index 9da6294ed..3d6be40e6 100644 --- a/config/crd/bases/apisix.apache.org_apisixupstreams.yaml +++ b/config/crd/bases/apisix.apache.org_apisixupstreams.yaml @@ -11,6 +11,8 @@ spec: kind: ApisixUpstream listKind: ApisixUpstreamList plural: apisixupstreams + shortNames: + - au singular: apisixupstream scope: Namespaced versions: