[WIP] Refactoring the provider-kubeconfig.py#1326
[WIP] Refactoring the provider-kubeconfig.py#1326chiukapoor wants to merge 1 commit intocloud-ark:masterfrom
Conversation
d4d61ce to
0cf0453
Compare
|
Looks like CI has failed: |
8d27eb2 to
553d884
Compare
|
https://github.com/cloud-ark/kubeplus/actions/runs/9838401881/job/27158227902?pr=1326#step:5:1901 Need to add kubernetes to requirements.txt. |
b7faeb2 to
aa17328
Compare
|
@devdattakulkarni I would like to propose that we move the |
aa17328 to
3dee342
Compare
|
Rebased with |
.github/workflows/pr.yaml
Outdated
| apiserver=`kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}'` | ||
| echo "API_SERVER_URL:$apiserver" | ||
| python3 provider-kubeconfig.py -s $apiserver create $KUBEPLUS_NS | ||
| python3 provider-kubeconfig.py create -s $apiserver -n $KUBEPLUS_NS |
There was a problem hiding this comment.
About putting Namespace as a parameter under a flag - the problem is it will make Namespace an optional parameter. We want to keep Namespace a required parameter. Keeping it a positional parameter achieves this. So I suggest we keep Namespace as a positional parameter.
There was a problem hiding this comment.
Updated to keep namespace as a positional parameter.
|
@chiukapoor I have started testing the changes. Here is a gist with early results. https://gist.github.com/devdattakulkarni/bb3833c9589ca3139c971da43ac2fa62 I would suggest you try all the flags with all the commands to verify whether all combinations of commands and flags are working correctly. |
3dee342 to
e991f2f
Compare
|
Test 2: "Namespace does not exist" is working fine for me. Rest of the issues are resolved in latest commit. |
* Use python kube-client * Modularize delete functionality * Add check to verify if API server is reachable * Error handling Signed-off-by: Chirayu Kapoor <dev.csociety@gmail.com>
e991f2f to
976738f
Compare
|
Rebased the PR @devdattakulkarni |
Issue
Updates
-n, --namespaceparameter for namespaceTODO
UPDATEfunctionalitykubeplus/provider-kubeconfig.py
Lines 346 to 391 in d4d61ce
kubeplus/provider-kubeconfig.py
Lines 421 to 439 in d4d61ce