Skip to content
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

add documentation on how to publish helm charts to registry.k8s.io #7915

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

kannon92
Copy link
Contributor

@kannon92 kannon92 commented Mar 24, 2025

Add a section on how to host helm charts for your subprojects on registry.k8s.io.

Fixes #7906

Copy link

linux-foundation-easycla bot commented Mar 24, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: kannon92 / name: Kevin Hannon (19d3f62)

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/registry.k8s.io Code in registry.k8s.io/ sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. labels Mar 24, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 24, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Mar 24, 2025
@kannon92
Copy link
Contributor Author

/assign @BenTheElder @aojea

@dims
Copy link
Member

dims commented Mar 24, 2025

🙏🏾 @kannon92

@kannon92 kannon92 mentioned this pull request Mar 30, 2025
3. On release tags, one can promote the chart and images to registry.k8s.io by obtaining the sha
for the tagged helm chart and the tagged image.
4. Open a PR into your images directory (registry.k8s.io/images/k8s-staging-SUBPROJECT/images.yaml)
5. Add chart and image sha to the respective sections.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe another yaml file for helm chart? Right now, there's no field in images.yaml to distinguish between them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

To the image promoter there is no meaningful difference. They appear as OCI images artifacts.

Copy link
Member

Choose a reason for hiding this comment

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

For humans, these need to be reviewed regardless, the PR adding them should clearly specify where the build came from in the opening body.

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

thanks!

which should be linked.
4. Open a PR into your images directory (registry.k8s.io/images/k8s-staging-SUBPROJECT/images.yaml)
5. Add chart and image sha to the respective sections.
6. Once PR is merged, confirm both images and helm charts exist by `helm install subproject oci://registry.k8s.io/subproject/charts/subproject --version=$VERSION`
Copy link
Member

Choose a reason for hiding this comment

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

If there any way to trigger the helm-chart-push manually? I think the helm chart (in lws) generated with the tag release is not working as expected, I need to build a new helm chart.

Copy link
Contributor Author

@kannon92 kannon92 Apr 9, 2025

Choose a reason for hiding this comment

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

I don't think there is a way to trigger postsubmits manually. Am I correct in that @BenTheElder?

@BenTheElder
Copy link
Member

/cc @kubernetes/sig-k8s-infra-leads

@k8s-ci-robot
Copy link
Contributor

@BenTheElder: GitHub didn't allow me to request PR reviews from the following users: kubernetes/sig-k8s-infra-leads.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @kubernetes/sig-k8s-infra-leads

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ameukam
Copy link
Member

ameukam commented Apr 1, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 1, 2025
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

I proposed some changes to improve the readability. I also think we should look into recommending kpromo instead of manually updating manifests.

Comment on lines 135 to 137
3. On release tags, one can promote the chart and images to registry.k8s.io by obtaining the sha
for the tagged helm chart and the tagged image from the build logs,
which should be linked.
Copy link
Member

Choose a reason for hiding this comment

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

This is kind of unclear to me, here's some suggestions how to improve it:

Suggested change
3. On release tags, one can promote the chart and images to registry.k8s.io by obtaining the sha
for the tagged helm chart and the tagged image from the build logs,
which should be linked.
3. Once the release has been created and the release job has been successful, obtain the SHA for the container images and the Helm charts from the build logs. This will be used later to promote these assets to `registry.k8s.io`

Aside from that, I think we should direct users towards kpromo rather than manually fiddling with manifests (cc @kubernetes/sig-k8s-infra-leads). We should also check if kpromo is supporting promoting Helm charts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what kpromo is. This seems unrelated to this PR and we are fiddling with manifests for images as is right now?

Copy link
Member

Choose a reason for hiding this comment

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

Aside from that, I think we should direct users towards kpromo rather than manually fiddling with manifests (cc @kubernetes/sig-k8s-infra-leads). We should also check if kpromo is supporting promoting Helm charts.

I'm really doubtful of this, I would actually very much prefer to see people link to a build log and cite the digest from the log that two humans can verify. (author, approver/lgtm), the actual yaml format being updated is quite simple and I'm not worried about human errors (also we can lint etc).

I don't think bringing in a tool is justified when simply adding a digest : tag mapping, and I worry about people trusting tooling output without actually vetting that the image came from a trusted build (or openly acknowledging a manual push)

Copy link
Member

Choose a reason for hiding this comment

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

Either way, I don't think we should block this PR on it.

for the tagged helm chart and the tagged image from the build logs,
which should be linked.
4. Open a PR into your images directory (registry.k8s.io/images/k8s-staging-SUBPROJECT/images.yaml)
5. Add chart and image sha to the respective sections.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
5. Add chart and image sha to the respective sections.
5. Create a PR and make sure that it gets merged for the image promoter process to kick off

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Apr 8, 2025
Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 9, 2025
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, kannon92, xmudrii

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [BenTheElder,xmudrii]

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

@kannon92
Copy link
Contributor Author

@BenTheElder @xmudrii

Can we release the hold?

@BenTheElder
Copy link
Member

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2025
@BenTheElder
Copy link
Member

thank you!

@k8s-ci-robot k8s-ci-robot merged commit b3ca8e4 into kubernetes:main Apr 10, 2025
3 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/registry.k8s.io Code in registry.k8s.io/ cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/k8s-infra Categorizes an issue or PR as relevant to SIG K8s Infra. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create documentation on how to publish a helm chart for a kubernetes-sig project
8 participants