Skip to content

Commit

Permalink
Add patch for insecure proxy support for helm
Browse files Browse the repository at this point in the history
  • Loading branch information
ahreehong committed Apr 1, 2024
1 parent 0be005b commit 2e1639d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/helm/helm/CHECKSUMS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
20927c86b3fd83e65ebb83bcc849e5037f2f4ac64cf0047b70731416a0224713 _output/bin/helm/linux-amd64/helm
af6707bc4273a6237d5f7532ed9a960fc91204369aa30499d23903a8d420d284 _output/bin/helm/linux-arm64/helm
da345480912500ca29b03af5e191248e594f43e80155c9d421f0fb94e840dc54 _output/bin/helm/linux-amd64/helm
8ab5b5d854ff1ace5f87ebc57cdc8ff4ca420f8f1143739ef3e2a1aae20f1de1 _output/bin/helm/linux-arm64/helm
38 changes: 38 additions & 0 deletions projects/helm/helm/patches/0001-Set-proxy-in-registry-client.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From deeb3bda188465648bc5a4b294c373de3b8f1e9c Mon Sep 17 00:00:00 2001
From: Ahree Hong <[email protected]>
Date: Mon, 1 Apr 2024 11:13:57 -0700
Subject: [PATCH 1/1] Set proxy in registry client

Signed-off-by: Ahree Hong <[email protected]>
---
pkg/getter/ocigetter.go | 1 +
pkg/registry/util.go | 1 +
2 files changed, 2 insertions(+)

diff --git a/pkg/getter/ocigetter.go b/pkg/getter/ocigetter.go
index 209786bd..0547cdcb 100644
--- a/pkg/getter/ocigetter.go
+++ b/pkg/getter/ocigetter.go
@@ -119,6 +119,7 @@ func (g *OCIGetter) newRegistryClient() (*registry.Client, error) {
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
+ Proxy: http.ProxyFromEnvironment,
}
})

diff --git a/pkg/registry/util.go b/pkg/registry/util.go
index 8baf0852..2b0dab0c 100644
--- a/pkg/registry/util.go
+++ b/pkg/registry/util.go
@@ -156,6 +156,7 @@ func NewRegistryClientWithTLS(out io.Writer, certFile, keyFile, caFile string, i
ClientOptHTTPClient(&http.Client{
Transport: &http.Transport{
TLSClientConfig: tlsConf,
+ Proxy: http.ProxyFromEnvironment,
},
}),
)
--
2.40.0

0 comments on commit 2e1639d

Please sign in to comment.