-
Notifications
You must be signed in to change notification settings - Fork 190
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
Enable Umbrella Chart with dependencies from OCI repositories #770
Conversation
5b64acb
to
c26ecbe
Compare
c26ecbe
to
e425d69
Compare
e425d69
to
ae5c66e
Compare
I did some manual testing in my development environment with harbor for storing chart dependencies as OCI artifacts. Without this change, using a GitRepo as the chart source with dependencies: dependencies:
- name: hello-helm
version: "0.1.4"
repository: "oci://harbor.example.com/helm-test" Got
HelmChart status: status:
conditions:
- lastTransitionTime: "2022-06-28T20:51:40Z"
message: no artifact for resource in storage
observedGeneration: 1
reason: NoArtifact
status: "True"
type: Reconciling
- lastTransitionTime: "2022-06-28T20:51:40Z"
message: 'dependency build error: failed to add remote dependency ''hello-helm'':
failed to load index for ''hello-helm'': failed to strategically load index:
failed to cache index to temporary file: object required'
observedGeneration: 1
reason: DependencyBuildError
status: "False"
type: Ready
- lastTransitionTime: "2022-06-28T20:51:40Z"
message: 'dependency build error: failed to add remote dependency ''hello-helm'':
failed to load index for ''hello-helm'': failed to strategically load index:
failed to cache index to temporary file: object required'
observedGeneration: 1
reason: DependencyBuildError
status: "True"
type: BuildFailed
observedGeneration: -1
observedSourceArtifactRevision: main/4c5b64ddfec12f8aaafa3594af544385acacbd7f
Using this change, the build just succeeded and the HelmRelease was successful. HelmChart status: status:
artifact:
checksum: a8556733c0a2cc960c04d97432c8f7119b878026be65111437a00ca0e26c0f8f
lastUpdateTime: "2022-06-28T21:15:26Z"
path: helmchart/default/default-greetings/greetings-helm-0.1.1.tgz
revision: 0.1.1
size: 49332
url: http://source-controller.flux-system.svc.cluster.local./helmchart/default/default-greetings/greetings-helm-0.1.1.tgz
conditions:
- lastTransitionTime: "2022-06-28T21:15:26Z"
message: packaged 'greetings-helm' chart with version '0.1.1'
observedGeneration: 1
reason: ChartPackageSucceeded
status: "True"
type: Ready
- lastTransitionTime: "2022-06-28T21:15:26Z"
message: packaged 'greetings-helm' chart with version '0.1.1'
observedGeneration: 1
reason: ChartPackageSucceeded
status: "True"
type: ArtifactInStorage
observedChartName: greetings-helm
observedGeneration: 1
observedSourceArtifactRevision: main/4c5b64ddfec12f8aaafa3594af544385acacbd7f
url: http://source-controller.flux-system.svc.cluster.local./helmchart/default/default-greetings/latest.tar.gz
|
53c814c
to
ecec000
Compare
ecec000
to
a454bc3
Compare
I think this is looking very good now. |
a454bc3
to
224092e
Compare
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.
LGTM!
Need rebasing. |
224092e
to
f8a5a85
Compare
// or a shim with defaults if no object could be found. | ||
func (r *HelmChartReconciler) namespacedChartRepositoryCallback(ctx context.Context, name, namespace string) chart.GetChartRepositoryCallback { |
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.
This func has very much overlap with buildFromHelmRepository
and I wonder whether we can converge some of it into a common func. Not a blocker, though.
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'm not sure we can reuse that much with all the serror.Event
in buildFromHelmRepository
.
f8a5a85
to
3cfbcc0
Compare
Thanks all for the reviews. Can someone merge this please? |
Requires another rebase. |
Signed-off-by: Soule BA <soule@weave.works>
If implemented, the source controller will be able to resolve charts dependencies from OCI repositories. The remote builder has been refactored as part of this work. Signed-off-by: Soule BA <soule@weave.works>
3cfbcc0
to
361b975
Compare
fixes #722
new feature
When using a
gitrepository
source, it is possible to declare Umbrella Charts with adependencies
section like:A depended helm chart can be resolved from a local path with
file://
prefix or from ahelm repository
withhttps://
prefix in the repository field.This pull request adds a new option for resolving depended helm chart, OCI helm repositories. If implemented, user will be able to declare three type of repositories like:
code changes
Introduces a new interface that permits downloading Helm Charts from Helm HTTP/S repositories and Helm OCi repositories.
The dependency manager is refactored to accept those interfaces instead of a repository
struct
. It enables using both repository types to resolve chart dependencies.The remote builder has been refactored as part of this work.