Provide a credential type for the Kubernetes configuration file `kubeconfig`
#15,574 创建于 2024年10月3日
描述
Please confirm the following
- I agree to follow this project's code of conduct.
- I have checked the current issues for duplicates.
- I understand that AWX is open source software provided for free and that I might not receive a timely response.
Feature type
New Feature
Feature Summary
If you have client-certificate-data and client-key-data in your kubeconfig file, you can't use the OpenShift or Kubernetes API Bearer Token credential type because that requires a token, and even if you do have a token, you shouldn't have to parse it out of the file.
It would be nice to have a built-in credential type called "Kubernetes configuration (kubeconfig)" or similar that just sticks the entire file into the K8S_AUTH_KUBECONFIG environment variable. The Kubernetes modules (e.g. kubernetes.core.k8s_info) can deal with the entire file or environment variable, without users having to split apart fields within the file (as required by the OpenShift or Kubernetes API Bearer Token credential type).
The only workaround I can think of right now is to create a custom credential type.
Select the relevant components
- UI
- API
- Docs
- Collection
- CLI
- Other
Steps to reproduce
- Go to Credentials.
- Add a new one.
- Look for a credential type that supports uploading of a
kubeconfigfile.
Current results
Such a credential type is not available, and the only other Kubernetes one doesn't support this (and it wouldn't make sense anyway).
Sugested feature result
It would be nice to have a built-in credential type called "Kubernetes configuration (kubeconfig)" or similar that just sticks the entire file into the K8S_AUTH_KUBECONFIG environment variable. The Kubernetes modules (e.g. kubernetes.core.k8s_info) can deal with the entire file or environment variable, without users having to split apart fields within the file (as required by the OpenShift or Kubernetes API Bearer Token credential type).
Additional information
No response