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

ci: add workflow for publishing helm charts #693

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

aramase
Copy link
Member

@aramase aramase commented Aug 17, 2021

Signed-off-by: Anish Ramasekar anish.ramasekar@gmail.com

What this PR does / why we need it:

  • Adds github action to package and publish helm charts on GitHub pages.
  • I've created the gh-pages branch with the updated index for url https://kubernetes-sigs.github.io/secrets-store-csi-driver/charts for all the current releases: https://github.com/kubernetes-sigs/secrets-store-csi-driver/tree/gh-pages
  • Updates the promote-staging-manifest makefile target to remove helm package. The helm charts are packaged and published by the GitHub action.

Which issue(s) this PR fixes (optional, using fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when the PR gets merged):
Fixes #687

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 17, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aramase

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:

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

@k8s-ci-robot k8s-ci-robot requested review from ritazh and tam7t August 17, 2021 23:23
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2021
@@ -506,11 +506,6 @@ promote-staging-manifest: #promote staging manifests to release dir
@cp -r manifest_staging/deploy .
@rm -rf charts/secrets-store-csi-driver
@cp -r manifest_staging/charts/secrets-store-csi-driver ./charts
@mkdir -p ./charts/tmp
Copy link
Member Author

Choose a reason for hiding this comment

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

Updating the promote-staging-manifest makefile target to remove helm package. The helm charts are packaged and published by the GitHub action.

@aramase
Copy link
Member Author

aramase commented Aug 18, 2021

/test pull-secrets-store-csi-driver-e2e-windows

push:
branches:
- main
- master
Copy link
Contributor

Choose a reason for hiding this comment

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

release-v* too?

edit: Err I guess its not until there's a tag that we really want to build the chart hm

Copy link
Member Author

@aramase aramase Aug 18, 2021

Choose a reason for hiding this comment

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

That's right! So we need to only publish from main/master. We can certainly look into adding the release branches based on how we want to publish helm charts for patch releases.

@aramase
Copy link
Member Author

aramase commented Aug 18, 2021

/test pull-secrets-store-csi-driver-e2e-windows

uses: stefanprodan/helm-gh-pages@f1701eb82e4d4b82016e7965501c8b6d79feaec9
with:
# GitHub automatically creates a GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in a workflow run.
# See https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/

Could we configure this so that this workflow yaml explicitly needs the write permissions, then the repo level i think we can change the default to only read permissions

Copy link
Member Author

Choose a reason for hiding this comment

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

@tam7t good find!

Here is a sample run with setting contents: write permission: https://github.com/aramase/secrets-store-csi-driver/actions/runs/1144718022.

I've also updated the workflow permissions to Read repository contents permission

Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
@tam7t
Copy link
Contributor

tam7t commented Aug 18, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 18, 2021
@k8s-ci-robot k8s-ci-robot merged commit 0609d63 into kubernetes-sigs:master Aug 18, 2021
@aramase aramase deleted the chart-workflow branch August 18, 2021 22:03
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. 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hosting helm charts in github pages
3 participants