Support authentication for custom CNI Helm repositories#13294
Support authentication for custom CNI Helm repositories#13294A-Soltani255 wants to merge 3 commits into
Conversation
Pass optional Helm repository username and password values to the custom CNI chart configuration. These values use default(omit) so authentication fields are only included when explicitly defined by the user.
Add commented sample variables for configuring a username and password when the custom CNI Helm repository requires authentication.
|
Welcome @A-Soltani255! |
|
Hi @A-Soltani255. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
|
Thanks @A-Soltani255 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Soltani255, yankay The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Adds optional Helm repository authentication support for the custom_cni network plugin when deploying a custom CNI via the helm-apps role.
Changes:
- Pass optional
username/passwordfields tohelm-appsrepository definitions usingdefault(omit). - Document the new inventory variables in the sample
k8s-net-custom-cni.yml.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| roles/network_plugin/custom_cni/meta/main.yml | Adds optional Helm repository username/password fields for the custom CNI chart repo. |
| inventory/sample/group_vars/k8s_cluster/k8s-net-custom-cni.yml | Documents the new optional repository credential variables in the sample inventory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Document paired repository credentials and secure password storage. Remove authentication placeholders from the public Cilium example.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Soltani255, yankay The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The Copilot review feedback has been addressed in commit I updated the credential documentation, clarified that username and password must be configured together, added Ansible Vault guidance, and removed the authentication placeholders from the public Cilium example. I also verified the following cases with Ansible Core 2.16.14:
@ErikJiang @tico88612, could you please review the updated changes? If everything looks good, could one of you add |
What this PR does
This PR adds optional Helm repository authentication support to the
custom_cninetwork plugin role.It updates:
to pass optional
usernameandpasswordvalues to thehelm-appsrole when a custom CNI is deployed from a Helm chart repository.The added fields are:
This PR also updates the sample custom CNI inventory file:
to document the optional variables:
Why this is needed
The current
custom_cniHelm chart deployment option supports configuring a Helm repository name and URL, but it does not provide a way to pass authentication credentials for private Helm repositories.This is useful for environments where the custom CNI chart is stored in an authenticated internal Helm repository, such as:
Without these variables, users must patch the Kubespray role locally when their Helm repository requires authentication.
Backward compatibility
This change is backward-compatible.
The new fields use
default(omit), so they are only passed when the user explicitly defines:Existing deployments using public or unauthenticated Helm repositories should continue to work without any change.
Security notes
No real credentials are added in this PR.
The sample inventory only documents placeholder values as commented examples. Users who need repository authentication can define these variables in their own inventory, preferably using Ansible Vault or another secret-management method.
Testing
pre-commit run --all-filesansible-playbook -i inventory/sample/inventory.ini cluster.yml --syntax-checkparameters are required together: repo_username, repo_passwordAdditional context
This change allows Kubespray users to deploy a custom CNI from a private authenticated Helm repository without maintaining a local patch to the
custom_cnirole.Release note