cloud-ark / kubeplus

Kubernetes Operator for multi-instance multi-tenancy
https://cloudark.io/
Apache License 2.0
662 stars 82 forks source link

Add explainer text for the flags in the provider-kubeconfig #1195

Closed devdattakulkarni closed 6 months ago

devdattakulkarni commented 11 months ago

provider-kubeconfig supports the following flags: -s, -f, -k

The "-s" flag is to be used to pass in the IP address of the API server on which KubePlus is installed. This IP address will be used in constructing the server's endpoint in generating the provider kubeconfig. Use parse-api-server-url.sh(https://github.com/cloud-ark/kubeplus/blob/master/parse-api-server-url.sh) to find out the IP address of your cluster's API server.

The "-f" flag is to be used to provide the output file name in which the provider's kubeconfig will be stored.

The "-k" flag is used to specify the path of the kubeconfig file that should be used as part of executing steps in provider-kubeconfig. The default value is ~/.kube/config

The "-p" flag is used to specify the path to permissions file. We should include an example of the permissions file in the help message.

We need to add above documentation to provider-kubeconfig. It can come after the following https://github.com/cloud-ark/kubeplus/blob/2d905f50d3c214e921dd7845c326fb65b838beb3/provider-kubeconfig.py#L765

Currently, when we run python provider-kubeconfig.py, following output is shown: usage: provider-kubeconfig.py [-h] [-k KUBECONFIG] [-s SERVERIP] [-f FILENAME] [-p PERMISSIONFILE] {create,delete,update} namespace The description of each flag should show after this output.