Skip to content

Commit

Permalink
feat: auth policy enforced condition
Browse files Browse the repository at this point in the history
  • Loading branch information
KevFan committed Feb 6, 2024
1 parent 133645e commit 5b15865
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 56 deletions.
3 changes: 2 additions & 1 deletion api/v1beta2/authpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ var _ common.KuadrantPolicy = &AuthPolicy{}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=direct"
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason`,description="AuthPolicy Status",priority=2
// +kubebuilder:printcolumn:name="Accepted",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].status`,description="AuthPolicy Accepted",priority=2
// +kubebuilder:printcolumn:name="Enforced",type=string,JSONPath=`.status.conditions[?(@.type=="Enforced")].status`,description="AuthPolicy Enforced",priority=2
// +kubebuilder:printcolumn:name="TargetRefKind",type="string",JSONPath=".spec.targetRef.kind",description="Type of the referenced Gateway API resource",priority=2
// +kubebuilder:printcolumn:name="TargetRefName",type="string",JSONPath=".spec.targetRef.name",description="Name of the referenced Gateway API resource",priority=2
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
Expand Down
3 changes: 2 additions & 1 deletion api/v1beta2/ratelimitpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ var _ common.KuadrantPolicy = &RateLimitPolicy{}
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=direct"
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason`,description="RateLimitPolicy Status",priority=2
// +kubebuilder:printcolumn:name="Accepted",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].status`,description="RateLimitPolicy Accepted",priority=2
// +kubebuilder:printcolumn:name="Enforced",type=string,JSONPath=`.status.conditions[?(@.type=="Enforced")].status`,description="RateLimitPolicy Enforced",priority=2
// +kubebuilder:printcolumn:name="TargetRefKind",type="string",JSONPath=".spec.targetRef.kind",description="Type of the referenced Gateway API resource",priority=2
// +kubebuilder:printcolumn:name="TargetRefName",type="string",JSONPath=".spec.targetRef.name",description="Name of the referenced Gateway API resource",priority=2
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/kuadrant-operator:latest
createdAt: "2024-01-23T14:59:43Z"
createdAt: "2024-02-06T11:59:47Z"
operators.operatorframework.io/builder: operator-sdk-v1.32.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/Kuadrant/kuadrant-operator
Expand Down
11 changes: 8 additions & 3 deletions bundle/manifests/kuadrant.io_authpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: AuthPolicy Status
jsonPath: .status.conditions[0].reason
name: Status
- description: AuthPolicy Accepted
jsonPath: .status.conditions[?(@.type=="Accepted")].status
name: Accepted
priority: 2
type: string
- description: AuthPolicy Enforced
jsonPath: .status.conditions[?(@.type=="Enforced")].status
name: Enforced
priority: 2
type: string
- description: Type of the referenced Gateway API resource
Expand Down
11 changes: 8 additions & 3 deletions bundle/manifests/kuadrant.io_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: RateLimitPolicy Status
jsonPath: .status.conditions[0].reason
name: Status
- description: RateLimitPolicy Accepted
jsonPath: .status.conditions[?(@.type=="Accepted")].status
name: Accepted
priority: 2
type: string
- description: RateLimitPolicy Enforced
jsonPath: .status.conditions[?(@.type=="Enforced")].status
name: Enforced
priority: 2
type: string
- description: Type of the referenced Gateway API resource
Expand Down
11 changes: 8 additions & 3 deletions config/crd/bases/kuadrant.io_authpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: AuthPolicy Status
jsonPath: .status.conditions[0].reason
name: Status
- description: AuthPolicy Accepted
jsonPath: .status.conditions[?(@.type=="Accepted")].status
name: Accepted
priority: 2
type: string
- description: AuthPolicy Enforced
jsonPath: .status.conditions[?(@.type=="Enforced")].status
name: Enforced
priority: 2
type: string
- description: Type of the referenced Gateway API resource
Expand Down
11 changes: 8 additions & 3 deletions config/crd/bases/kuadrant.io_ratelimitpolicies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: RateLimitPolicy Status
jsonPath: .status.conditions[0].reason
name: Status
- description: RateLimitPolicy Accepted
jsonPath: .status.conditions[?(@.type=="Accepted")].status
name: Accepted
priority: 2
type: string
- description: RateLimitPolicy Enforced
jsonPath: .status.conditions[?(@.type=="Enforced")].status
name: Enforced
priority: 2
type: string
- description: Type of the referenced Gateway API resource
Expand Down
Loading

0 comments on commit 5b15865

Please sign in to comment.