Skip to content

Commit

Permalink
remove useless validation:Optional annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
randmonkey committed Nov 7, 2023
1 parent 40d8ffe commit 57bd585
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1/kongclusterplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
// +kubebuilder:resource:scope=Cluster,shortName=kcp,categories=kong-ingress-controller
// +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"
// +kubebuilder:printcolumn:name="Disabled",type=boolean,JSONPath=`.disabled`,description="Indicates if the plugin is disabled",priority=1
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1/kongconsumer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=kc,categories=kong-ingress-controller
// +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"
// +kubebuilder:printcolumn:name="Programmed",type=string,JSONPath=`.status.conditions[?(@.type=="Programmed")].status`
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1/kongingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=ki,categories=kong-ingress-controller
// +kubebuilder:validation:Optional
// +kubebuilder:validation:XValidation:rule="!has(self.proxy)", message="'proxy' field is no longer supported, use Service's annotations instead"
// +kubebuilder:validation:XValidation:rule="!has(self.route)", message="'route' field is no longer supported, use Ingress' annotations instead"

Expand Down
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1/kongplugin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=kp,categories=kong-ingress-controller
// +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",priority=1
Expand Down
6 changes: 0 additions & 6 deletions pkg/apis/configuration/v1beta1/ingress_rules.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package v1beta1

// +kubebuilder:validation:Optional

// UDPIngressRule represents a rule to apply against incoming requests
// wherein no Host matching is available for request routing, only the port
// is used to match requests.
Expand All @@ -20,8 +18,6 @@ type UDPIngressRule struct {
Backend IngressBackend `json:"backend"`
}

// +kubebuilder:validation:Optional

// IngressRule represents a rule to apply against incoming requests.
// Matching is performed based on an (optional) SNI and port.
type IngressRule struct {
Expand Down Expand Up @@ -49,8 +45,6 @@ type IngressRule struct {
Backend IngressBackend `json:"backend"`
}

// +kubebuilder:validation:Optional

// IngressBackend describes all endpoints for a given service and port.
type IngressBackend struct {
// Specifies the name of the referenced service.
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1beta1/kongconsumergroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
// +kubebuilder:subresource:status
// +kubebuilder:storageversion
// +kubebuilder:resource:shortName=kcg,categories=kong-ingress-controller
// +kubebuilder:validation:Optional
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age"
// +kubebuilder:printcolumn:name="Programmed",type=string,JSONPath=`.status.conditions[?(@.type=="Programmed")].status`

Expand Down
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1beta1/tcpingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
// +kubebuilder:resource:categories=kong-ingress-controller
// +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"

Expand Down
1 change: 0 additions & 1 deletion pkg/apis/configuration/v1beta1/udpingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type UDPIngressList struct {
// +kubebuilder:resource:categories=kong-ingress-controller
// +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"

Expand Down

0 comments on commit 57bd585

Please sign in to comment.