Skip to content

add helm alias subcommand to set up aliases and substitutions for OCI registries - #11771

Closed
cobexer wants to merge 1 commit into
helm:mainfrom
cobexer:oci-aliases-and-substitutions
Closed

cobexer wants to merge 1 commit into
helm:mainfrom
cobexer:oci-aliases-and-substitutions

Conversation

@cobexer

@cobexer cobexer commented Jan 26, 2023

Copy link
Copy Markdown

helm alias set: configure an alias that maps a name to an oci url
used like with legacy repositories @name or alias:name

helm alias list: shows aliases and substitutions

helm alias substitute: configure registry url substitutions
for example substitute oci://some-vendor.example.com/vendor/charts with
oci://internal.example.com/charts/3rdparty/vendor
and thus helm will never contact some-vendor.example.com but instead
resolve the vendors charts using internal.example.com

Signed-off-by: Christoph Obexer [email protected]

What this PR does / why we need it:
OCI Helm Charts lack support for repository aliases which makes adoption more difficult if different environments (dev, qa, prod) can't access a shared OCI registry. In #10013 I asked for the missing alias support... since nobody added it so far I created this PR. There is also a HIP asking for a similar feature helm/community#259

Special notes for your reviewer:
This is my first contribution to helm, while this PR contains some documentation and unit-tests I'm sure this needs more unit-tests and documentation to be acceptable :)

If applicable:

  • this PR contains documentation
  • this PR contains unit tests
  • this PR has been tested for backwards compatibility

@pull-request-size pull-request-size Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jan 26, 2023
@cobexer
cobexer force-pushed the oci-aliases-and-substitutions branch from af487e3 to 878acbb Compare January 27, 2023 10:34
@cobexer
cobexer force-pushed the oci-aliases-and-substitutions branch 2 times, most recently from 450d411 to 4e56a70 Compare March 15, 2023 11:13
@ffppmm

ffppmm commented Jan 29, 2024

Copy link
Copy Markdown

Hello,
when will this be merged? Is there anything missing?

regards Philipp

@rschamizo

Copy link
Copy Markdown

Hello!

We have the same use case, and we would like to know if it will be possible to merge this pull request.

Regards!

@philthethrill99

Copy link
Copy Markdown

Hi,

Is there an issue with the pull request? Can we have an explanation why it is not merged yet?

Thanks

@marioloko

Copy link
Copy Markdown

What would it be necessary for this pull request to be accepted?

This feature it is mandatory for people working with different environments: dev, test, prod.
As each environment may have different versions of the dependencies but the same code.

So I would like to know if there is something that is blocking the acceptance of this PR, and if so, how can I help to unblock the issue.

@alfsch

alfsch commented Jul 19, 2024

Copy link
Copy Markdown

Maybe solving the conflicts would help.

@antoinedeschenes

Copy link
Copy Markdown
Contributor

Should that be a subcommand to helm registry?

@taliesins

Copy link
Copy Markdown

@cobexer we would love to be able to use this functionality. Please resolve the conflicts. It would elevate OCI container registries first class citizens.

Then perhaps we can ask @mattfarina what we need to do to get helm/community#259 and this PR merged in

@ffppmm

ffppmm commented Sep 10, 2024

Copy link
Copy Markdown

Hello,

if @cobexer doesn't answer should I create a new pull request with the conflicts solved? I have a branch ready where the fix is applied to the current main branch:

https://github.com/ffppmm/helm/tree/oci-aliases-and-substitutions

Let me know if this is OK?

Regards Philipp

@ffppmm

ffppmm commented Oct 1, 2024 •

Copy link
Copy Markdown

Hi,

I managed to get all workflows to go green and merged current helm:main. Everything lgtm. How should we proceed? Should I create a new PR and refer to this one?

Regards Philipp

@ffppmm

ffppmm commented Nov 7, 2024

Copy link
Copy Markdown

Any news here?

Regards Philipp

@chris-parker-za

Copy link
Copy Markdown

We are also waiting on this - we have lots of generic pipeline code that works well with non-OCI registries. Bitnami have moved to OCI-only registries and now are stuck "hardcoding" registry URLs for our private registries into Helm charts which used alias before in different DTAP environments

@sabre1041 sabre1041 self-assigned this Jan 13, 2025
@sabre1041

Copy link
Copy Markdown
Contributor

@cobexer i am going to start evaluating this integration. would you be able to resolve the code conflicts?

@ffppmm

ffppmm commented Mar 17, 2025

Copy link
Copy Markdown

Hi,

I try again. I don't think @cobexer will answer. I recreated the changes in the right place and if you like I make a pull request:

https://github.com/ffppmm/helm/tree/oci-aliases-and-substitutions

Regards Philipp

@ffppmm

ffppmm commented Mar 18, 2025

Copy link
Copy Markdown

Hi,
was able to correct all "errors":
image

Should I create a pull request?

Regards Philipp

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Aug 24, 2025
@cobexer

cobexer commented Sep 10, 2025

Copy link
Copy Markdown
Author

@sabre1041 since this PR is from a past live at a past employer I did not pay attention to the GitHub notifications, if you are still interesed in this I may be able to spend a few minutes to pull relevant changes and update this PR but would like to then (mostly) hand over as I don't have relevant environments at hand any more.

@ffppmm I expect you may be able to test this in your environments?

@github-actions github-actions Bot removed the Stale label Sep 13, 2025
@cobexer
cobexer force-pushed the oci-aliases-and-substitutions branch from 4e56a70 to c4c87ac Compare September 18, 2025 20:29
@pull-request-size pull-request-size Bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 18, 2025
@cobexer

cobexer commented Sep 18, 2025

Copy link
Copy Markdown
Author

So I rebased this on top of v3.19.0 ... which seems to be distant from main?

@benoittgt

Copy link
Copy Markdown
Contributor

@cobexer if it's main it will be for helm v4. 👍

@cobexer

cobexer commented Sep 18, 2025 •

Copy link
Copy Markdown
Author

@benoittgt no idea what helm is up to right nowadays, do you have a pointer for me that could help me understand where to target the PR?

I guess the contribution guide is a start ^^ https://github.com/helm/helm/blob/d2236e95ed05e3c5b2598ceb677baa76011d9597/CONTRIBUTING.md#helm-v3-and-v4

@cobexer
cobexer force-pushed the oci-aliases-and-substitutions branch from c4c87ac to 173abb9 Compare September 18, 2025 21:15
@pull-request-size pull-request-size Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 18, 2025
@ffppmm

ffppmm commented Sep 19, 2025

Copy link
Copy Markdown

@benoittgt no idea what helm is up to right nowadays, do you have a pointer for me that could help me understand where to target the PR?

I guess the contribution guide is a start ^^ https://github.com/helm/helm/blob/d2236e95ed05e3c5b2598ceb677baa76011d9597/CONTRIBUTING.md#helm-v3-and-v4

👏 Thanks a lot

@cobexer
cobexer force-pushed the oci-aliases-and-substitutions branch from 173abb9 to c69a400 Compare September 21, 2025 09:44
helm alias set: configure an alias that maps a name to an oci url
 used like with legacy repositories `@name` or `alias:name`

helm alias list: shows aliases and substitutions

helm alias substitute: configure registry url substitutions
 for example substitute oci://some-vendor.example.com/vendor/charts with
 oci://internal.example.com/charts/3rdparty/vendor
 and thus helm will never contact some-vendor.example.com but instead
 resolve the vendors charts using internal.example.com

Signed-off-by: Christoph Obexer <[email protected]>
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Dec 21, 2025
@cobexer

cobexer commented Dec 23, 2025

Copy link
Copy Markdown
Author

@sabre1041 any current interest in helm oci alias support?

@sabre1041

Copy link
Copy Markdown
Contributor

Author

Hi @cobexer . Alias support is still functionality that it desired by the Helm project. The functionality found for aliasing OCI registries and other OCI capabilities is being included in this HIP which provides both a comprehensive and standardized method of managing OCI content. Your input in this HIP would be beneficial given your interest in the topic

@github-actions github-actions Bot removed the Stale label Dec 24, 2025
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been open for 90 days with no activity. This pull request will be automatically closed in 30 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Mar 24, 2026
@github-actions github-actions Bot closed this Apr 23, 2026
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Jul 12, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Jul 12, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Sep 1, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Oct 14, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Oct 14, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Oct 17, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Oct 25, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Oct 28, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
TerryHowe added a commit to TerryHowe/helm that referenced this pull request Nov 18, 2026
Migrate helm.sh/helm/v4/pkg/registry from oras.land/oras-go/v2 to
github.com/oras-project/oras-go/v3 (v3.0.2-dev) and wire in the full
container ecosystem config stack:

- Mechanical v2 -> v3 API migration (credentials, auth client, login/logout)
- config.LoadConfigs(): Docker config.json, containers auth.json,
  registries.conf, certs.d, policy.json, registries.d
- newRepository() uses RegistryProperties + NewRepositoryWithProperties
  for mirror resolution, per-registry TLS, and CLI flag overrides
- policy.json enforcement via builder.PolicyEvaluator
- registries.d + signedBy signature verification
- LoadConfigsWithOptions override paths (ConfigOptions)
- Login path Location rewrite from registries.conf
- Namespaced authentication support for registry login
- Set [pull,push] scope when pushing to token-auth registries

Closes: helm#11771
Signed-off-by: Terry Howe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.