-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support oci-based helm repository #4018
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4018 +/- ##
==========================================
- Coverage 42.89% 42.65% -0.25%
==========================================
Files 124 124
Lines 18255 18386 +131
==========================================
+ Hits 7831 7842 +11
- Misses 9423 9534 +111
- Partials 1001 1010 +9
Continue to review full report at Codecov.
|
Hi @jannfis,can you help have a review about this PR, proposal: Support to use Helm 3 with OCI for package distribution |
@jessesuen Pls take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @haoshuwei, thanks a lot for your PR - I have made a first review, please find my comments below.
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
@alexmt can you please help have a look at this PR? |
Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"` | ||
Name string `protobuf:"bytes,10,opt,name=name,proto3" json:"name,omitempty"` | ||
// Whether helm-oci support should be enabled for this repo | ||
EnableOci bool `protobuf:"varint,11,opt,name=enableOci,proto3" json:"enableOci,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golang coding standard sugguests that acronyms to have a consistent case. For example, EnableOci
should be EnabledOCI
. See
https://github.com/golang/go/wiki/CodeReviewComments#initialisms
And, I would probably use OCIEnabled
as the name of a bool field.
Sorry for delay @haoshuwei . Looking at PR ASAP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for delay again. Added a couple of minor comments. Looks like it is almost ready to merge. Thank you @haoshuwei !
cmd/argocd/commands/app.go
Outdated
@@ -122,6 +123,9 @@ func NewApplicationCreateCommand(clientOpts *argocdclient.ClientOptions) *cobra. | |||
# Create a Helm app from a Helm repo | |||
argocd app create nginx-ingress --repo https://kubernetes-charts.storage.googleapis.com --helm-chart nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc | |||
|
|||
# Create a Helm app from a Helm OCI-based repo | |||
argocd app create nginx-ingress --repo helm-oci-registry.cn-zhangjiakou.cr.aliyuncs.com --helm-chart acs/nginx-ingress --revision 1.24.3 --dest-namespace default --dest-server https://kubernetes.default.svc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stuck here for a couple of minutes trying to find the difference with non-oci repository :) . There is difference, right ? In this can we remove this line ?
@@ -106,7 +110,9 @@ func (c *nativeHelmChart) ExtractChart(chart string, version *semver.Version) (s | |||
} | |||
if !exists { | |||
// always use Helm V3 since we don't have chart content to determine correct Helm version | |||
helmCmd, err := NewCmdWithVersion(c.repoPath, HelmV3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: is helmCmd := &Cmd{}
required. Can you please use helmCmd, err := NewCmdWithVersion(c.repoPath, HelmV3, c.enableOci)
?
args = append(args, "--key-file", filePath) | ||
} | ||
|
||
return c.run(args...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add --insecure
flag is creds.InsecureSkipVerify
is set to true
.
args := []string{"registry", "logout"} | ||
args = append(args, repo) | ||
|
||
if creds.CAPath != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add --insecure
flag is creds.InsecureSkipVerify is set to true
Any news ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR contains great changes and implements a very useful feature. It would be a shame to waste the effort.
@haoshuwei implemented 99% of changes with only a few minors review comments. I took the liberty, resolved merged conflicts and reviewer comments in the fork. I hope you don't mind @haoshuwei .
LGTM :)
Codecov Report
@@ Coverage Diff @@
## master #4018 +/- ##
==========================================
- Coverage 41.37% 40.98% -0.39%
==========================================
Files 126 126
Lines 17154 17292 +138
==========================================
- Hits 7097 7087 -10
- Misses 9042 9185 +143
- Partials 1015 1020 +5
Continue to review full report at Codecov.
|
features for proposal #3349
Signed-off-by: haoshuwei haoshuwei24@gmail.com
Checklist: