Skip to content

Commit

Permalink
Add example for AuthConfig v1beta1 in the CSV
Browse files Browse the repository at this point in the history
Having an example for version of the API that is served is required by some operator hub test pipelines.
  • Loading branch information
guicassolato committed Feb 13, 2024
1 parent cdb55b4 commit 5b6bc92
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 5 deletions.
32 changes: 30 additions & 2 deletions bundle/manifests/authorino-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,39 @@ metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "authorino.kuadrant.io/v1beta1",
"kind": "AuthConfig",
"metadata": {
"name": "my-api-protection"
},
"spec": {
"hosts": [
"my-api.io"
],
"identity": [
{
"apiKey": {
"selector": {
"matchLabels": {
"group": "friends"
}
}
},
"credentials": {
"in": "authorization_header",
"keySelector": "APIKEY"
},
"name": "api-key-users"
}
]
}
},
{
"apiVersion": "authorino.kuadrant.io/v1beta2",
"kind": "AuthConfig",
"metadata": {
"name": "talker-api-protection"
"name": "my-api-protection"
},
"spec": {
"authentication": {
Expand All @@ -28,7 +56,7 @@ metadata:
}
},
"hosts": [
"talker-api.io"
"my-api.io"
]
}
},
Expand Down
16 changes: 16 additions & 0 deletions config/samples/authorino-operator_v1beta1_authconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: authorino.kuadrant.io/v1beta1
kind: AuthConfig
metadata:
name: my-api-protection
spec:
hosts:
- my-api.io
identity:
- name: api-key-users
apiKey:
selector:
matchLabels:
group: friends
credentials:
in: authorization_header
keySelector: APIKEY
6 changes: 3 additions & 3 deletions config/samples/authorino-operator_v1beta2_authconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apiVersion: authorino.kuadrant.io/v1beta2
kind: AuthConfig
metadata:
name: talker-api-protection
name: my-api-protection
spec:
hosts:
- talker-api.io
- my-api.io
authentication:
"api-key-users":
apiKey:
Expand All @@ -13,4 +13,4 @@ spec:
group: friends
credentials:
authorizationHeader:
prefix: APIKEY
prefix: APIKEY
1 change: 1 addition & 0 deletions config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Append samples you want in your CSV to this file as resources ##
resources:
- authorino-operator_v1beta1_authorino.yaml
- authorino-operator_v1beta1_authconfig.yaml
- authorino-operator_v1beta2_authconfig.yaml
#+kubebuilder:scaffold:manifestskustomizesamples

0 comments on commit 5b6bc92

Please sign in to comment.