Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CRD annotations for 1.x parity #1757

Merged
merged 12 commits into from
Aug 27, 2021
Prev Previous commit
Next Next commit
feat(crd) add additional printer columns
Add additional printer columns included in the 1.x CRDs to the 2.x CRDs.
  • Loading branch information
Travis Raines committed Aug 26, 2021
commit 68cc8163587649659b5c1c8e3bef32b828149aa3
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,24 @@ spec:
preserveUnknownFields: false
scope: Cluster
versions:
- name: v1
- additionalPrinterColumns:
- description: Name of the plugin
jsonPath: .plugin
name: Plugin-Type
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Indicates if the plugin is disabled
jsonPath: .disabled
name: Disabled
type: boolean
- description: Configuration of the plugin
jsonPath: .config
name: Config
type: string
name: v1
schema:
openAPIV3Schema:
description: KongClusterPlugin is the Schema for the kongclusterplugins API
Expand Down
11 changes: 10 additions & 1 deletion config/crd/bases/configuration.konghq.com_kongconsumers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,16 @@ spec:
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Username of a Kong Consumer
jsonPath: .username
name: Username
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1
schema:
openAPIV3Schema:
description: KongConsumer is the Schema for the kongconsumers API
Expand Down
19 changes: 18 additions & 1 deletion config/crd/bases/configuration.konghq.com_kongplugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,24 @@ spec:
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1
- additionalPrinterColumns:
- description: Name of the plugin
jsonPath: .plugin
name: Plugin-Type
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
- description: Indicates if the plugin is disabled
jsonPath: .disabled
name: Disabled
type: boolean
- description: Configuration of the plugin
jsonPath: .config
name: Config
type: string
name: v1
schema:
openAPIV3Schema:
description: KongPlugin is the Schema for the kongplugins API
Expand Down
11 changes: 10 additions & 1 deletion config/crd/bases/configuration.konghq.com_tcpingresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ spec:
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: Address of the load balancer
jsonPath: .status.loadBalancer.ingress[*].ip
name: Address
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: TCPIngress is the Schema for the tcpingresses API
Expand Down
11 changes: 10 additions & 1 deletion config/crd/bases/configuration.konghq.com_udpingresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ spec:
preserveUnknownFields: false
scope: Namespaced
versions:
- name: v1beta1
- additionalPrinterColumns:
- description: Address of the load balancer
jsonPath: .status.loadBalancer.ingress[*].ip
name: Address
type: string
- description: Age
jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1beta1
schema:
openAPIV3Schema:
description: UDPIngress is the Schema for the udpingresses API
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/configuration/v1/kongclusterplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import (
//+kubebuilder:subresource:status
//+kubebuilder:storageversion
//+kubebuilder:validation:Optional
//+kubebuilder:printcolumn:name="Plugin-Type",type=string,JSONPath=`.plugin`,description="Name of the plugin"
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"
rainest marked this conversation as resolved.
Show resolved Hide resolved
//+kubebuilder:printcolumn:name="Disabled",type=boolean,JSONPath=`.disabled`,description="Indicates if the plugin is disabled"
//+kubebuilder:printcolumn:name="Config",type=string,JSONPath=`.config`,description="Configuration of the plugin"

// KongClusterPlugin is the Schema for the kongclusterplugins API
type KongClusterPlugin struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/configuration/v1/kongconsumer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
//+kubebuilder:storageversion
//+kubebuilder:resource:shortName=kc
//+kubebuilder:validation:Optional
//+kubebuilder:printcolumn:name="Username",type=string,JSONPath=`.username`,description="Username of a Kong Consumer"
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"

// KongConsumer is the Schema for the kongconsumers API
type KongConsumer struct {
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/configuration/v1/kongplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import (
//+kubebuilder:storageversion
//+kubebuilder:resource:shortName=kp
//+kubebuilder:validation:Optional
//+kubebuilder:printcolumn:name="Plugin-Type",type=string,JSONPath=`.plugin`,description="Name of the plugin"
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"
//+kubebuilder:printcolumn:name="Disabled",type=boolean,JSONPath=`.disabled`,description="Indicates if the plugin is disabled"
//+kubebuilder:printcolumn:name="Config",type=string,JSONPath=`.config`,description="Configuration of the plugin"

// KongPlugin is the Schema for the kongplugins API
type KongPlugin struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/configuration/v1beta1/tcpingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
//+kubebuilder:subresource:status
//+kubebuilder:storageversion
//+kubebuilder:validation:Optional
//+kubebuilder:printcolumn:name="Address",type=string,JSONPath=`.status.loadBalancer.ingress[*].ip`,description="Address of the load balancer"
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"

// TCPIngress is the Schema for the tcpingresses API
type TCPIngress struct {
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/configuration/v1beta1/udpingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ type UDPIngressList struct {
//+kubebuilder:subresource:status
//+kubebuilder:storageversion
//+kubebuilder:validation:Optional
//+kubebuilder:printcolumn:name="Address",type=string,JSONPath=`.status.loadBalancer.ingress[*].ip`,description="Address of the load balancer"
//+kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"

// UDPIngress is the Schema for the udpingresses API
type UDPIngress struct {
Expand Down