SecureLoadChartFromURL() - Downloads a Helm chart from a URL and verifies its digest
NewRetryableHTTPClient() - Creates an HTTP client with retry logic
copyAndVerify() - Helper for copying and verifying data against a digest
overwriteHostname() - Helper for overwriting URL hostnames (for localhost access)
Why Copied
The loader package is in internal/ and cannot be imported as a Go module dependency.
We need SecureLoadChartFromURL() to load Helm charts from source controller artifacts
exactly as Flux does, including digest verification.
Modifications
The code has been adapted to:
Use the loader package name
Remove controller-runtime logger dependency in favor of a simpler approach
Combine artifact_url.go and client.go into a single file