-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Discrete helm charts for CA, VPA #8617
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
jackfrancis
wants to merge
1
commit into
kubernetes:master
Choose a base branch
from
jackfrancis:charts-fork
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+113
−51
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ca-release: | ||
permissions: | ||
contents: write # for helm/chart-releaser-action to push chart release and create a release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
|
||
- name: Install Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.4.0 | ||
|
||
- env: | ||
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CR_RELEASE_NAME_TEMPLATE: "cluster-autoscaler-chart-{{ .Version }}" | ||
name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: cluster-autoscaler/charts | ||
vpa-release: | ||
permissions: | ||
contents: write # for helm/chart-releaser-action to push chart release and create a release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "${GITHUB_ACTOR}" | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
|
||
- name: Install Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: v3.4.0 | ||
|
||
- env: | ||
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CR_RELEASE_NAME_TEMPLATE: "vertical-pod-autoscaler-chart-{{ .Version }}" | ||
name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: vertical-pod-autoscaler/charts | ||
name: Release Charts | ||
on: | ||
push: | ||
branches: | ||
- master |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,10 @@ jobs: | |
with: | ||
filters: | | ||
charts: | ||
- 'charts/**/Chart.yaml' | ||
- 'charts/**/*' | ||
- 'cluster-autoscaler/charts/**/Chart.yaml' | ||
- 'cluster-autoscaler/charts/**/*' | ||
- 'vertical-pod-autoscaler/charts/**/Chart.yaml' | ||
- 'vertical-pod-autoscaler/charts/**/*' | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
helm-lint-test: | ||
if: ${{ needs.changes.outputs.charts == 'true' }} | ||
|
@@ -34,12 +36,12 @@ jobs: | |
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
- name: Run chart-testing (lint) | ||
run: ct lint | ||
run: ct lint --chart-dirs cluster-autoscaler/charts vertical-pod-autoscaler/charts | ||
# Only build a kind cluster if there are chart changes to test. | ||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed) | ||
changed=$(ct list-changed --chart-dirs cluster-autoscaler/charts vertical-pod-autoscaler/charts) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> $GITHUB_OUTPUT | ||
fi | ||
|
@@ -48,7 +50,7 @@ jobs: | |
uses: helm/[email protected] | ||
- if: steps.list-changed.outputs.changed == 'true' | ||
name: Run chart-testing (install) | ||
run: ct install | ||
run: ct install --chart-dirs cluster-autoscaler/charts vertical-pod-autoscaler/charts | ||
helm-docs-validate: | ||
if: ${{ needs.changes.outputs.charts == 'true' }} | ||
name: Helm Docs | ||
|
@@ -59,14 +61,9 @@ jobs: | |
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Run helm-docs | ||
uses: docker://jnorwood/helm-docs:v1.14.2 | ||
- name: Check for changes | ||
run: | | ||
if ! git diff --exit-code charts/*/README.md; then | ||
echo "ERROR: Helm chart README.md files are out of date" | ||
echo "Run from charts/: docker run --rm --volume \"\$(pwd):/helm-docs\" -u \$(id -u) jnorwood/helm-docs:v1.14.2" | ||
exit 1 | ||
fi | ||
uses: losisin/helm-docs-github-action@v1 | ||
with: | ||
fail-on-diff: true | ||
|
||
name: Lint and Test Charts | ||
on: pull_request |
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# charts | ||
|
||
The Helm chart for the Cluster Autoscaler project resides within this folder. If making changes to the Helm charts, make sure you follow the instructions below for the pre-commit checks. | ||
|
||
## Pre-commit hooks | ||
|
||
This Helm repository has pre-commit hooks for Helm specific needs: | ||
|
||
* Makes sure all charts pass a `helm lint` check. | ||
* Updates the `README.md` file of all charts based on comments in that chart's `values.yaml` file. | ||
|
||
### Install `pre-commit` binary | ||
|
||
The binary for `pre-commit` can be installed via Homebrew: | ||
|
||
```shell | ||
$ brew install pre-commit | ||
``` | ||
|
||
For those without Homebrew, Pre-commit has [other installation methods available](https://pre-commit.com/#install). | ||
|
||
### Install git hooks | ||
|
||
After the `pre-commit` binary is installed, go to this repository's directory, and run the following command to install the git hook: | ||
|
||
```shell | ||
$ pre-commit install | ||
``` | ||
|
||
### Install hook dependencies | ||
|
||
The pre-commit hooks themselves call binaries under the hood; they can be installed via the [instructions found here](https://github.com/norwoodj/helm-docs#installation). | ||
|
||
Note: You should ensure that whichever installation method you are using you either install the same version of helm-docs as used in the PR workflow to ensure your PR passes CI checks or update the version used by the workflow to match. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it would be better to use a GitHub Action instead of Docker. However, I’m curious why you chose this particular action. I’m not familiar with it, and I noticed it only has about 10 stars - https://github.com/losisin/helm-docs-github-action. So I’m wondering if it’s reliable enough for our use case.
Btw, I’m familiar with https://github.com/norwoodj/helm-docs, which has around 1.6K stars and seems to be more established.
Is there a specific reason you chose the other one instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/norwoodj/helm-docs
is the official helm-docs project, but isn't a github action.https://github.com/marketplace?query=helm-docs&type=actions is where I found this, it seems to be the best option.
If we think a lightly used action is not prefereable compared to doing it manually I can revert this change.