Skip to content

Commit 9dd1006

Browse files
authored
Merge pull request #48 from Kuadrant/update-kuadrant-resources-version
Update for v1 of Kuadrant CRDs
2 parents b5685c8 + 8fee8f8 commit 9dd1006

13 files changed

+6551
-1462
lines changed

config/examples/kube-prometheus/bundle.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ data:
14911491
- groupVersionKind:
14921492
group: kuadrant.io
14931493
kind: "TLSPolicy"
1494-
version: "v1alpha1"
1494+
version: "v1"
14951495
metricNamePrefix: gatewayapi_tlspolicy
14961496
labelsFromPath:
14971497
name:
@@ -1544,7 +1544,7 @@ data:
15441544
- groupVersionKind:
15451545
group: kuadrant.io
15461546
kind: "DNSPolicy"
1547-
version: "v1alpha1"
1547+
version: "v1"
15481548
metricNamePrefix: gatewayapi_dnspolicy
15491549
labelsFromPath:
15501550
name:
@@ -1597,7 +1597,7 @@ data:
15971597
- groupVersionKind:
15981598
group: kuadrant.io
15991599
kind: "RateLimitPolicy"
1600-
version: "v1beta2"
1600+
version: "v1"
16011601
metricNamePrefix: gatewayapi_ratelimitpolicy
16021602
labelsFromPath:
16031603
name:
@@ -1650,7 +1650,7 @@ data:
16501650
- groupVersionKind:
16511651
group: kuadrant.io
16521652
kind: "AuthPolicy"
1653-
version: "v1beta2"
1653+
version: "v1"
16541654
metricNamePrefix: gatewayapi_authpolicy
16551655
labelsFromPath:
16561656
name:

config/kuadrant/crd/kuadrant.io_authpolicies.yaml

Lines changed: 5489 additions & 1030 deletions
Large diffs are not rendered by default.

config/kuadrant/crd/kuadrant.io_dnspolicies.yaml

Lines changed: 351 additions & 186 deletions
Large diffs are not rendered by default.

config/kuadrant/crd/kuadrant.io_ratelimitpolicies.yaml

Lines changed: 379 additions & 132 deletions
Large diffs are not rendered by default.

config/kuadrant/crd/kuadrant.io_tlspolicies.yaml

Lines changed: 215 additions & 36 deletions
Large diffs are not rendered by default.

config/kuadrant/custom-resource-state-kuadrant.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- groupVersionKind:
22
group: kuadrant.io
33
kind: "TLSPolicy"
4-
version: "v1alpha1"
4+
version: "v1"
55
metricNamePrefix: gatewayapi_tlspolicy
66
labelsFromPath:
77
name:
@@ -54,7 +54,7 @@
5454
- groupVersionKind:
5555
group: kuadrant.io
5656
kind: "DNSPolicy"
57-
version: "v1alpha1"
57+
version: "v1"
5858
metricNamePrefix: gatewayapi_dnspolicy
5959
labelsFromPath:
6060
name:
@@ -107,7 +107,7 @@
107107
- groupVersionKind:
108108
group: kuadrant.io
109109
kind: "RateLimitPolicy"
110-
version: "v1beta2"
110+
version: "v1"
111111
metricNamePrefix: gatewayapi_ratelimitpolicy
112112
labelsFromPath:
113113
name:
@@ -160,7 +160,7 @@
160160
- groupVersionKind:
161161
group: kuadrant.io
162162
kind: "AuthPolicy"
163-
version: "v1beta2"
163+
version: "v1"
164164
metricNamePrefix: gatewayapi_authpolicy
165165
labelsFromPath:
166166
name:

config/kuadrant/custom-resource-state.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ spec:
506506
- groupVersionKind:
507507
group: kuadrant.io
508508
kind: "TLSPolicy"
509-
version: "v1alpha1"
509+
version: "v1"
510510
metricNamePrefix: gatewayapi_tlspolicy
511511
labelsFromPath:
512512
name:
@@ -559,7 +559,7 @@ spec:
559559
- groupVersionKind:
560560
group: kuadrant.io
561561
kind: "DNSPolicy"
562-
version: "v1alpha1"
562+
version: "v1"
563563
metricNamePrefix: gatewayapi_dnspolicy
564564
labelsFromPath:
565565
name:
@@ -612,7 +612,7 @@ spec:
612612
- groupVersionKind:
613613
group: kuadrant.io
614614
kind: "RateLimitPolicy"
615-
version: "v1beta2"
615+
version: "v1"
616616
metricNamePrefix: gatewayapi_ratelimitpolicy
617617
labelsFromPath:
618618
name:
@@ -665,7 +665,7 @@ spec:
665665
- groupVersionKind:
666666
group: kuadrant.io
667667
kind: "AuthPolicy"
668-
version: "v1beta2"
668+
version: "v1"
669669
metricNamePrefix: gatewayapi_authpolicy
670670
labelsFromPath:
671671
name:

config/kuadrant/kuadrant.yaml

Lines changed: 62 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: kuadrant.io/v1alpha1
1+
apiVersion: kuadrant.io/v1
22
kind: TLSPolicy
33
metadata:
44
name: external
@@ -20,7 +20,7 @@ status:
2020
status: "True"
2121
type: Ready
2222
---
23-
apiVersion: kuadrant.io/v1alpha1
23+
apiVersion: kuadrant.io/v1
2424
kind: TLSPolicy
2525
metadata:
2626
name: internal
@@ -42,12 +42,18 @@ status:
4242
status: "True"
4343
type: Ready
4444
---
45-
apiVersion: kuadrant.io/v1alpha1
45+
apiVersion: kuadrant.io/v1
4646
kind: DNSPolicy
4747
metadata:
4848
name: external
4949
namespace: istio-system
5050
spec:
51+
loadBalancing:
52+
defaultGeo: true
53+
geo: US
54+
weight: 120
55+
providerRefs:
56+
- name: aws-credentials
5157
targetRef:
5258
group: gateway.networking.k8s.io
5359
kind: Gateway
@@ -61,7 +67,7 @@ status:
6167
type: Ready
6268
observedGeneration: 1
6369
---
64-
apiVersion: kuadrant.io/v1beta2
70+
apiVersion: kuadrant.io/v1
6571
kind: RateLimitPolicy
6672
metadata:
6773
name: rlp-www
@@ -71,11 +77,18 @@ spec:
7177
kind: HTTPRoute
7278
name: www
7379
limits:
74-
"global":
80+
alice-limit:
7581
rates:
76-
- limit: 5
77-
duration: 10
78-
unit: second
82+
- limit: 5
83+
window: 10s
84+
when:
85+
- predicate: auth.identity.userid == 'alice'
86+
bob-limit:
87+
rates:
88+
- limit: 2
89+
window: 10s
90+
when:
91+
- predicate: auth.identity.userid == 'bob'
7992
status:
8093
conditions:
8194
- lastTransitionTime: "2023-08-21T22:53:08Z"
@@ -84,7 +97,7 @@ status:
8497
status: "True"
8598
type: Available
8699
---
87-
apiVersion: kuadrant.io/v1beta2
100+
apiVersion: kuadrant.io/v1
88101
kind: RateLimitPolicy
89102
metadata:
90103
name: rlp-cdn
@@ -94,11 +107,18 @@ spec:
94107
kind: HTTPRoute
95108
name: cdn
96109
limits:
97-
"global":
110+
alice-limit:
111+
rates:
112+
- limit: 5
113+
window: 10s
114+
when:
115+
- predicate: auth.identity.userid == 'alice'
116+
bob-limit:
98117
rates:
99-
- limit: 5
100-
duration: 10
101-
unit: second
118+
- limit: 2
119+
window: 10s
120+
when:
121+
- predicate: auth.identity.userid == 'bob'
102122
status:
103123
conditions:
104124
- lastTransitionTime: "2023-08-21T22:53:08Z"
@@ -107,7 +127,7 @@ status:
107127
status: "True"
108128
type: Available
109129
---
110-
apiVersion: kuadrant.io/v1beta2
130+
apiVersion: kuadrant.io/v1
111131
kind: AuthPolicy
112132
metadata:
113133
name: dashboards-protection
@@ -118,29 +138,27 @@ spec:
118138
name: dashboards
119139
rules:
120140
authentication:
121-
"keycloak-users":
122-
jwt:
123-
issuerUrl: http://keycloak.example.com
124-
"k8s-service-accounts":
125-
kubernetesTokenReview:
126-
audiences:
127-
- https://kubernetes.example.com
128-
overrides:
129-
"sub":
130-
selector: auth.identity.user.username
131-
authorization:
132-
"k8s-rbac":
133-
kubernetesSubjectAccessReview:
134-
user:
135-
selector: auth.identity.sub
141+
api-key-users:
142+
apiKey:
143+
allNamespaces: true
144+
selector:
145+
matchLabels:
146+
app: toystore
147+
credentials:
148+
authorizationHeader:
149+
prefix: APIKEY
150+
metrics: false
151+
priority: 0
136152
response:
137153
success:
138-
dynamicMetadata:
139-
"identity":
154+
filters:
155+
identity:
140156
json:
141157
properties:
142-
"userid":
143-
selector: auth.identity.sub
158+
userid:
159+
selector: auth.identity.metadata.annotations.secret\.kuadrant\.io/user-id
160+
metrics: false
161+
priority: 0
144162
status:
145163
conditions:
146164
- lastTransitionTime: "2023-08-21T22:53:08Z"
@@ -149,7 +167,7 @@ status:
149167
status: "True"
150168
type: Available
151169
---
152-
apiVersion: kuadrant.io/v1beta2
170+
apiVersion: kuadrant.io/v1
153171
kind: AuthPolicy
154172
metadata:
155173
name: accounts
@@ -160,23 +178,27 @@ spec:
160178
name: accounts
161179
rules:
162180
authentication:
163-
"api-key-users":
181+
api-key-users:
164182
apiKey:
183+
allNamespaces: true
165184
selector:
166185
matchLabels:
167-
app: accounts
168-
allNamespaces: true
186+
app: toystore
169187
credentials:
170188
authorizationHeader:
171189
prefix: APIKEY
190+
metrics: false
191+
priority: 0
172192
response:
173193
success:
174-
dynamicMetadata:
175-
"identity":
194+
filters:
195+
identity:
176196
json:
177197
properties:
178-
"userid":
198+
userid:
179199
selector: auth.identity.metadata.annotations.secret\.kuadrant\.io/user-id
200+
metrics: false
201+
priority: 0
180202
status:
181203
conditions:
182204
- lastTransitionTime: "2023-08-21T22:53:08Z"

0 commit comments

Comments
 (0)