Issue Summary: “flux create source git with –password fails to create secret”
Timestamp: May 17, 2023 Reporter: DeyvsonL
Description:
The user reports a bug in the Flux CLI where executing the command flux create source git
with a password (Azure DevOps personal access token - PAT) fails to create the necessary Kubernetes secret when the username is not provided. The user notes that manually adjusting the secret (removing the username) allows authentication to succeed, indicating that the CLI’s behavior is unintended.
Steps to Reproduce:
- Install Flux in a Kubernetes cluster.
- Run the command:
flux create source git password='${my-PAT}' --url='${my-git-repo}' name
- Observe that while the GitRepository is created, authentication fails due to an invalid secret.
Expected Behavior: A Kubernetes secret should be created containing only the password field, without a username.
Additional Context:
- Environment: Ubuntu 20.04, Flux version v0.34.0
- Flux Checks: Most checks passed, but a newer version of Flux is available.
Discussion:
- Later comments indicate that the current version of Flux (2.0.0-rc.4) doesn’t replicate the original issue regarding secret deletion, suggesting potential improvements or changes in handling username and password.
- There is consideration for user experience (UX) associated with this behavior, prompting suggestions for introducing a
--pat
flag to clarify usage intentions. - The issue was renamed to reflect the specific behavior being investigated, and it was confirmed that the behavior of secret creation does not involve deletion but fails to meet user expectations regarding token authentication.
Action Items:
- A request was made for the initial reporter to test against the latest version of Flux.
- Contributors are encouraged to clarify the case for change to enhance the command’s functionality and address the UX concern.
Current Assigned Contributors:
- MounilKshah has indicated interest in working on this issue, with encouragement from KingdonB.
Label: Good first issue
This summary encapsulates the core problem, expected outcomes, and ongoing discussions, allowing advanced developers to quickly grasp the context and technical focus of the issue.