ansible/awx

Provide a credential type for the Kubernetes configuration file `kubeconfig`

Open

#15,574 建立於 2024年10月3日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Python (13,071 star) (3,333 fork)batch import
communitycomponent:apicomponent:docshelp wantedtype:enhancement

描述

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

  1. Go to Credentials.
  2. Add a new one.
  3. Look for a credential type that supports uploading of a kubeconfig file.

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

貢獻者指南