Commit 5184909
authored
feat: add ServiceAccountRef support for ClusterAccess authentication (#129)
* feat: add ServiceAccountRef support for ClusterAccess authentication
- Add extractServiceAccountAuth to metadata injector for storing SA reference info
- Implement ServiceAccountRoundTripper for dynamic token generation via TokenRequest API
- Extend AuthMetadata struct with service account fields
- Initialize local k8s client in ClusterRegistry for token generation
- Make Name and Namespace required fields in ServiceAccountRef
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
On-behalf-of: @SAP <bastian.echterhoelter@sap.com>
* fix: add workaround for setup-envtest empty directory bug
setup-envtest doesn't verify binaries exist if the directory is present.
Check if etcd binary exists before deciding whether to force re-download.
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
On-behalf-of: @SAP <bastian.echterhoelter@sap.com>
* fix: address PR review comments
- Use Status.ExpirationTimestamp from TokenRequest API instead of requested TTL
(API server may override the requested expiration)
- Check both etcd and kube-apiserver executability in Taskfile envtest workaround
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
On-behalf-of: @SAP <bastian.echterhoelter@sap.com>
* fix: make default ServiceAccount token expiration configurable
Add listener-default-sa-expiration-seconds config option to allow
customizing the default token expiration for ServiceAccount-based
authentication when not explicitly set in the ClusterAccess spec.
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
On-behalf-of: @SAP <bastian.echterhoelter@sap.com>
* feat: add docker:kind task to build and load images into kind cluster
Add a new Taskfile task that:
- Looks up the current image tag from the running deployment
- Builds the container image with that tag
- Loads it into the kind cluster
- Restarts the deployment to pick up the new image
Supports both docker and podman via CONTAINER_RUNTIME variable.
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
On-behalf-of: @SAP <bastian.echterhoelter@sap.com>
* docs: update local_test.md with docker:kind task
Replace manual build/tag/load steps with the new docker:kind task
that automates the entire workflow.
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>
On-behalf-of: @SAP <bastian.echterhoelter@sap.com>
---------
Signed-off-by: Bastian Echterhölter <bastian.echterhoelter@sap.com>1 parent c03d1f2 commit 5184909
File tree
17 files changed
+886
-90
lines changed- cmd
- common
- apis/v1alpha1
- auth
- config
- config/crd
- docs
- gateway/manager
- roundtripper
- targetcluster
- listener/reconciler/clusteraccess
17 files changed
+886
-90
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
49 | 73 | | |
50 | 74 | | |
51 | 75 | | |
| |||
59 | 83 | | |
60 | 84 | | |
61 | 85 | | |
62 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
63 | 94 | | |
64 | 95 | | |
65 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | | - | |
41 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
149 | 163 | | |
150 | 164 | | |
151 | 165 | | |
| |||
210 | 224 | | |
211 | 225 | | |
212 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
213 | 251 | | |
214 | 252 | | |
215 | 253 | | |
| |||
460 | 498 | | |
461 | 499 | | |
462 | 500 | | |
463 | | - | |
| 501 | + | |
464 | 502 | | |
465 | 503 | | |
466 | 504 | | |
467 | 505 | | |
468 | 506 | | |
469 | | - | |
| 507 | + | |
470 | 508 | | |
471 | 509 | | |
472 | 510 | | |
473 | 511 | | |
474 | 512 | | |
475 | 513 | | |
476 | 514 | | |
477 | | - | |
| 515 | + | |
478 | 516 | | |
479 | 517 | | |
480 | 518 | | |
481 | 519 | | |
482 | 520 | | |
483 | | - | |
| 521 | + | |
484 | 522 | | |
485 | 523 | | |
0 commit comments