feat(plugins): load helm chart from flux artifact for oci mirror flow#1993
Open
abhijith-darshan wants to merge 1 commit into
Open
feat(plugins): load helm chart from flux artifact for oci mirror flow#1993abhijith-darshan wants to merge 1 commit into
abhijith-darshan wants to merge 1 commit into
Conversation
71209ce to
1d30eda
Compare
Contributor
There was a problem hiding this comment.
I know its not in the scope of the PR but since we touch these funcs might be worth to change that to errors.Is(err, os.ErrNotExist)?
IvoGoman
reviewed
May 19, 2026
96cbe80 to
7a06ad9
Compare
IvoGoman
approved these changes
May 22, 2026
This commit promotes the catalog-internal artifact fetcher into a reusable internal/flux package so multiple controllers can share a single instance. The IArtifactory interface now takes artifactID per call instead of binding it to the constructor, exposes GetRaw to return raw bytes without tar/gzip extraction, and adds Path so callers can resolve the on-disk location of a cached artifact. The catalog controller is updated to construct one artifactory in SetupWithManager and pass an artifactID per source. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> feat(plugins): load helm chart from flux artifact for oci mirror flow This commit replaces the upstream registry pull during plugin reconciliation with a fetch from the Flux source-controller artifact already produced for the plugin's HelmChart. The plugin reconciler now constructs a flux.IArtifactory in SetupWithManager and uses GetRaw + Save + Path to persist the chart .tgz on disk; the helm package's TemplateHelmChartFromPluginOptionValues loads the chart directly from that path, avoiding repeated upstream pulls during post-render image transformation. The CLI flags are renamed from --catalog-artifact-* to --artifact-* to reflect their broader use. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> feat(charts): mount capped emptyDir for artifact storage This commit adds a 1Gi emptyDir volume mounted at the configured artifact storage path so the controller's on-disk cache is bounded and isolated from the node's writable layer. The new controllerManager.artifactStorage values block lets operators override the path or size limit, and the storage path is wired through to the new --artifact-storage-path flag from a single source so the mount and the flag cannot drift. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> chore(dev-env): align local dev with new artifact storage and zot mirrors This commit adds the artifactStorage values to the local dev values file so the manager chart renders cleanly when only dev.values.yaml is supplied (the local helm tooling does not merge chart defaults). The sample organization manifest grows a containerRegistryConfig ConfigMap pointing at the local zot mirrors used by kind setup, and the extensions catalog sample switches the perses ref to a tagged release sourced from the local mirror so end-to-end flows work without internet pulls. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> (chore): improve err check Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> refactor(flux): generalize artifactory for multi-consumer use This commit promotes the catalog-internal artifact fetcher into a reusable internal/flux package so multiple controllers can share a single instance. The IArtifactory interface now takes artifactID per call instead of binding it to the constructor, exposes GetRaw to return raw bytes without tar/gzip extraction, and adds Path so callers can resolve the on-disk location of a cached artifact. The catalog controller is updated to construct one artifactory in SetupWithManager and pass an artifactID per source. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> feat(plugins): load helm chart from flux artifact for oci mirror flow This commit replaces the upstream registry pull during plugin reconciliation with a fetch from the Flux source-controller artifact already produced for the plugin's HelmChart. The plugin reconciler now constructs a flux.IArtifactory in SetupWithManager and uses GetRaw + Save + Path to persist the chart .tgz on disk; the helm package's TemplateHelmChartFromPluginOptionValues loads the chart directly from that path, avoiding repeated upstream pulls during post-render image transformation. The CLI flags are renamed from --catalog-artifact-* to --artifact-* to reflect their broader use. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> feat(charts): mount capped emptyDir for artifact storage This commit adds a 1Gi emptyDir volume mounted at the configured artifact storage path so the controller's on-disk cache is bounded and isolated from the node's writable layer. The new controllerManager.artifactStorage values block lets operators override the path or size limit, and the storage path is wired through to the new --artifact-storage-path flag from a single source so the mount and the flag cannot drift. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> chore(dev-env): align local dev with new artifact storage and zot mirrors This commit adds the artifactStorage values to the local dev values file so the manager chart renders cleanly when only dev.values.yaml is supplied (the local helm tooling does not merge chart defaults). The sample organization manifest grows a containerRegistryConfig ConfigMap pointing at the local zot mirrors used by kind setup, and the extensions catalog sample switches the perses ref to a tagged release sourced from the local mirror so end-to-end flows work without internet pulls. Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com> Apply suggestions from code review Co-authored-by: IvoGoman <ivo.gosemann@sap.com> (chore): replace http retry in missing places Signed-off-by: abhijith-darshan <abhijith.ravindra@sap.com>
7a06ad9 to
0f7a54e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR replaces the upstream registry pull during plugin reconciliation with a fetch from the Flux source-controller artifact already produced for the plugin's HelmChart. The chart
.tgzis persisted on disk via a sharedflux.IArtifactory, then handed directly to the helm chart loader — avoiding repeated upstream pulls during post-render image transformation.The artifact fetcher (previously catalog-internal) is generalized into a reusable
internal/fluxpackage. The interface now takesartifactIDper call, exposesGetRawfor raw bytes (no tar/gzip extraction), and addsPathso callers can resolve the on-disk location of a cached artifact. Both catalog and plugin reconcilers construct one shared instance inSetupWithManager.The chart now mounts a capped 1Gi emptyDir at the artifact storage path so the on-disk cache is bounded and isolated from the node's writable layer. The CLI flags are renamed from
--catalog-artifact-*to--artifact-*to reflect their broader use, and the storage path is wired from a single values key so the mount and flag cannot drift.What type of PR is this? (check all applicable)
Related Tickets & Documents
Closes #1844
Added tests?
Added to documentation?
Checklist