fix: authenticate Helm downloads with image pull secrets - #150
Merged
Conversation
Greptile SummaryThis PR adds authenticated Helm chart downloads using compatible Kubernetes image pull Secrets.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defects identified. The changed flow limits Secret reads to chart-loading paths, preserves anonymous access when no compatible credential exists, retries usable credentials in order, and prevents credentials from crossing repository-host boundaries. Important Files Changed
Sequence DiagramsequenceDiagram
participant Deploy as Phase 0 Deploy
participant K8s as Kubernetes API
participant Repo as Helm Repository
participant Archive as Chart Archive Host
Deploy->>K8s: Read configured image pull Secrets
K8s-->>Deploy: Docker credentials
loop Compatible credentials in configured order
Deploy->>Repo: Fetch index.yaml with Basic Auth
Repo-->>Deploy: Chart archive URL
alt Archive host matches repository host
Deploy->>Archive: Download chart with Basic Auth
else Archive host differs
Deploy->>Archive: Download chart anonymously
end
end
Reviews (1): Last reviewed commit: "fix: authenticate Helm downloads with pu..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
networkOperator.imagePullSecretsfrom the Network Operator namespace when Phase 0 actually needs to install or upgrade the chart.nvcr.iotohelm.ngc.nvidia.comcredential mapping.kubernetes.io/dockerconfigjsonand legacykubernetes.io/dockercfg, and preserve anonymous downloads when no compatible credentials are configured.networkOperator.namespaceand the kubeconfig must be able to read it.Why
PR #148 propagates image pull secret names into the generated Network Operator Helm values. Phase 0 still fetched the chart anonymously, so private and staging NGC repositories could fail before Helm ever used those values. This change explicitly bridges the already-configured Kubernetes Docker Secret into the in-process Helm downloader.
Validation
go test ./... -count=1 -skip 'TestGetPresetsDir_(NotFound|SkipsFiles)'go test -race ./pkg/networkoperatorplugin -run 'Test(CredentialsFromImagePullSecrets|PullChart)' -count=1go vet ./...make buildmkdocs build --strict --cleangit diff --check