8000 Design: "Image Configuration in Helm Chart" by inteon · Pull Request #7748 · cert-manager/cert-manager · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Design: "Image Configuration in Helm Chart" #7748

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

inteon
Copy link
Member
@inteon inteon commented May 12, 2025

Design document for review & lazy consensus.

Leave a 👍 if you agree with the proposal, leave a comment with feedback otherwise.

Kind

/kind design

Release Note

NONE

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@cert-manager-prow cert-manager-prow bot added kind/design Categorizes issue or PR as related to design. release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels May 12, 2025
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joshvanl for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 12, 2025
@inteon inteon requested a review from Copilot May 12, 2025 13:09
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This design doc proposes a new image configuration model for the Helm chart, aiming to simplify user customization and enable default digest support.

  • Introduces a new $.imagePrefix for concise registry configuration.
  • Deprecates the existing image.registry option in favor of a unified approach.
  • Adds a mechanism to default to a combined tag and digest value when neither is provided.

inteon and others added 2 commits May 12, 2025 15:15
typo fix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>

## Summary

We propose to replace the existing `image.registry` and `image.repository` options with `$.imagePrefix`, `image.name` and `image.repository`. Allowing users to change the registry/ image location by only changing 1 value (`$.imagePrefix`). Additionally, we will introduce the `image._defaultReference` value which will allow us to set a default digest value that still can be overwritten by setting `image.tag`.
Copy link
Contributor
@erikgb erikgb May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of introducing a custom "image prefix", I think we should fix the obviously wrong default on the image.registry value, and probably drop the image.repository value. The correct default for image.registry would at present be quay.io/jetstack, which will allow any user to set this once if pulling images through a proxy. There should be no need to override/set the image name.

Kyverno is doing this, and I think we should try to avoid doing something custom here. Ref. https://github.com/kyverno/kyverno/blob/main/charts/kyverno/values.yaml#L13

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would break use case 1, which I think is a very common use case.
Could you explain your proposal by adding/ updating the use cases?

Copy link
Contributor
@erikgb erikgb May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which use case? The most common reason to play around with these image settings is if you are in a situation where quay.io/jetstack is not directly available, and you have to use some kind of image proxy/mirroring solution. In this case, you don't want to set your image proxy/mirror registry more than once.

Copy link
Contributor
@erikgb erikgb May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So what I'm suggesting is about the same as you propose, except that we use "common" Helm values for this, instead of introducing something custom. My image.registry is the same as your image.prefix. This will be a breaking change no matter what.

Copy link
Member Author
@inteon inteon May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Story 1: https://github.com/cert-manager/cert-manager/pull/7748/files#diff-5c6a0bdaa3c837dda3d0a38e891fc3e939d67a249fdd61d0d31aab5936db631fR98

I would like to gather a set of helm install commands to understand the exact user-facing (breaking) changes.

My image.registry is the same as your image.prefix.

The $.imagePrefix value would be common across all images used in the Helm chart. The goal is to change the registry in a single location. If you want to overwrite the registry for only one of the images, you will have to modify image.repository with a full image URL.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we have a "global" image.registry property? It is the same as you are proposing, except that we follow an already established pattern in other Kubernetes community projects.

```yaml
# The container registry and repository namespace to pull the images from.
# +docs:property
imagePrefix: quay.io/jetstack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably out of scope, but when will this change to cert-manager.io?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to do this together with this change, such that we "group" possible breaking changes.

@inteon inteon requested review from erikgb, jsoref and Copilot May 12, 2025 13:27
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This design document proposes streamlining the Helm chart’s image configuration by replacing the current split configuration with a unified approach that leverages a new imagePrefix and introduces a default digest value for images. Key changes include:

  • Replacing image.registry and image.repository with a unified imagePrefix combined with image.name.
  • Introducing image._defaultReference for default tag and digest values.
  • Documenting the new values.yaml structure and its usage scenarios.
Comments suppressed due to low confidence (1)

design/20250512.images-in-the-helm-chart.md:1

  • [nitpick] Consider clarifying in the title whether the '$.' prefix is required in configuration or if it is used only to denote the combination of imagePrefix with image.name, to avoid potential confusion for users.
# Image Configuration in Helm Chart: add $.imagePrefix and support default digest

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/design Categorizes issue or PR as related to design. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0