Skip to content

Commit

Permalink
Update AuthPolicy sample to v1beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
grzpiotrowski committed Nov 23, 2023
1 parent 9f7ca40 commit f2bdaf9
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 33 deletions.
61 changes: 60 additions & 1 deletion bundle/manifests/kuadrant-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,65 @@ metadata:
},
"spec": {}
},
{
"apiVersion": "kuadrant.io/v1beta2",
"kind": "AuthPolicy",
"metadata": {
"name": "toystore"
},
"spec": {
"rules": {
"authentication": {
"apikey": {
"apiKey": {
"selector": {
"matchLabels": {
"app": "toystore"
}
}
}
},
"credentials": {
"in": "authorization_header",
"keySelector": "APIKEY"
}
},
"response": {
"success": {
"dynamicMetadata": {
"ext_auth_data": {
"json": {
"properties": {
"user-id": {
"selector": "auth.identity.metadata.annotations.secret\\.kuadrant\\.io/user-id"
}
}
}
}
}
}
},
"routeSelectors": [
{
"matches": [
{
"method": "DELETE",
"path": {
"type": "Exact",
"value": "/admin/toy"
}
}
]
}
]
},
"targetRef": {
"group": "gateway.networking.k8s.io",
"kind": "HTTPRoute",
"name": "toystore"
}
}
},
{
"apiVersion": "kuadrant.io/v1beta2",
"kind": "RateLimitPolicy",
Expand Down Expand Up @@ -41,7 +100,7 @@ metadata:
capabilities: Basic Install
categories: Integration & Delivery
containerImage: quay.io/kuadrant/kuadrant-operator:latest
createdAt: "2023-11-23T15:55:13Z"
createdAt: "2023-11-23T17:11:53Z"
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
31 changes: 0 additions & 31 deletions config/samples/kuadrant_v1beta1_authpolicy.yaml

This file was deleted.

34 changes: 34 additions & 0 deletions config/samples/kuadrant_v1beta2_authpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
apiVersion: kuadrant.io/v1beta2
kind: AuthPolicy
metadata:
name: toystore
spec:
targetRef:
group: gateway.networking.k8s.io
kind: HTTPRoute
name: toystore
rules:
routeSelectors:
- matches:
- path:
type: Exact
value: "/admin/toy"
method: DELETE
authentication:
"apikey":
apiKey:
selector:
matchLabels:
app: toystore
credentials:
in: authorization_header
keySelector: APIKEY
response:
success:
dynamicMetadata:
"ext_auth_data":
json:
properties:
"user-id":
selector: auth.identity.metadata.annotations.secret\.kuadrant\.io/user-id
2 changes: 1 addition & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Append samples you want in your CSV to this file as resources ##
resources:
- kuadrant_v1beta1_kuadrant.yaml
- kuadrant_v1beta1_authpolicy.yaml
- kuadrant_v1beta2_authpolicy.yaml
- kuadrant_v1beta2_ratelimitpolicy.yaml
#+kubebuilder:scaffold:manifestskustomizesamples

0 comments on commit f2bdaf9

Please sign in to comment.