Skip to content

Commit

Permalink
Add patch for insecure proxy support for helm (#3046)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahreehong committed Apr 1, 2024
1 parent 545b684 commit 20835f3
Show file tree
Hide file tree
Showing 3 changed files with 54 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
6fcb38a6aaaf27492693db5bcf6aefe733931dfb62d4b4bf7878da1768eeb440 _output/bin/helm/linux-amd64/helm
ce894fb35526d1566fa5361c50dbc981c86f38facd1fe73c5646b5a5090b69aa _output/bin/helm/linux-arm64/helm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 94c1deae6d5a43491c5a4e8444ecd8273a8122a1 Mon Sep 17 00:00:00 2001
From: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Date: Wed, 31 Jan 2024 12:48:22 +0100
Subject: [PATCH 1/2] bug: add proxy support for oci getter

adds missing proxy support on oci chart getter.

Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
---
pkg/getter/ocigetter.go | 1 +
1 file changed, 1 insertion(+)

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,
}
})

--
2.40.0

25 changes: 25 additions & 0 deletions projects/helm/helm/patches/0002-Set-proxy-in-registry-client.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 7c2e46274a80f39f5886c9ec3385758e18180764 Mon Sep 17 00:00:00 2001
From: Ahree Hong <ahreeh@amazon.com>
Date: Fri, 29 Mar 2024 18:34:15 -0700
Subject: [PATCH 2/2] Set proxy in registry client

Signed-off-by: Ahree Hong <ahreeh@amazon.com>
---
pkg/registry/util.go | 1 +
1 file changed, 1 insertion(+)

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 20835f3

Please sign in to comment.