Commit dff72be
use kube-authkit for better k8s authentication (#970)
* use kube-authkit for better k8s authentication
Signed-off-by: Saad Zaher <szaher@redhat.com>
* update poetry.lock
Signed-off-by: Saad Zaher <szaher@redhat.com>
* fix tests
Signed-off-by: Saad Zaher <szaher@redhat.com>
* fix test issues
Signed-off-by: Saad Zaher <szaher@redhat.com>
* fix tests for ci
Signed-off-by: Saad Zaher <szaher@redhat.com>
* mock k8s client calls
Signed-off-by: Saad Zaher <szaher@redhat.com>
* tests: mock k8s clients and add test resource files to fix CI
Replace global no-op of kubeconfig loaders with targeted test-only mocks so tests that assert loader behavior can still patch them locally.
Add fake k8s clients (AuthenticationApi, CoreV1Api, CustomObjectsApi) implementing the methods used by unit tests (get_api_group, read_namespaced_secret, list_namespaced_custom_object, list_cluster_custom_object, get/create/delete_namespaced_custom_object, etc.).
Create minimal resource YAMLs under $HOME/.codeflare/resources and TLS files in a tmp CWD so tests do not raise FileNotFoundError.
Test-only change: no production code modified.
Signed-off-by: Saad Zaher <szaher@redhat.com>
* Introduce set_k8s_client in codeflare-sdk
Signed-off-by: Saad Zaher <szaher@redhat.com>
* fix the unit tests
Signed-off-by: Saad Zaher <szaher@redhat.com>
* fix linting issues
Signed-off-by: Saad Zaher <szaher@redhat.com>
* upgrade to kube-authkit 0.2.0
Signed-off-by: Saad Zaher <szaher@redhat.com>
* update docs to use latest params from authkit 0.2.0
Signed-off-by: Saad Zaher <szaher@redhat.com>
* Update src/codeflare_sdk/common/kubernetes_cluster/auth.py
Co-authored-by: Bryan Keane <bryankeane0@gmail.com>
* fix check if authkit available
Signed-off-by: Saad Zaher <szaher@redhat.com>
---------
Signed-off-by: Saad Zaher <szaher@redhat.com>
Co-authored-by: Bryan Keane <bryankeane0@gmail.com>1 parent ac5ae0e commit dff72be
14 files changed
Lines changed: 3760 additions & 1910 deletions
File tree
- docs
- src/codeflare_sdk
- common
- kubernetes_cluster
- ray/cluster
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 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 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
20 | 100 | | |
21 | 101 | | |
22 | 102 | | |
| |||
0 commit comments