Skip to content

Commit

Permalink
chore(chart): update chart process
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
  • Loading branch information
stevehipwell committed Oct 26, 2021
1 parent 8108af0 commit 0ea9d1f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-test-chart.yaml
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
lint-test:
if: github.repository == "kubernetes-sigs/metrics-server"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -36,7 +37,7 @@ jobs:
fi
- name: Run chart-testing (lint)
run: ct lint
run: ct lint --check-version-increment false

- name: Create Kind cluster
uses: helm/kind-action@v1.2.0
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-chart.yaml
Expand Up @@ -5,10 +5,11 @@ on:
branches:
- master
paths:
- "charts/metrics-server/**"
- "charts/metrics-server/Chart.yaml"

jobs:
release:
if: github.repository == "kubernetes-sigs/metrics-server"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
18 changes: 18 additions & 0 deletions CHART.md
@@ -0,0 +1,18 @@
# Chart Process

The [Helm chart](https://artifacthub.io/packages/helm/metrics-server/metrics-server) is maintained as an additional component within this repo and released into a repo backed on the `gh-pages` branch. The chart on the `master` branch shouldn't be referenced directly as it might contain modifications since it was last released.

## Contributing to the Chart

1. Open a PR to modify the chart following the general repo rule, but **DON'T** modify _Chart.yaml_ in the PR as this would result in a release when merged
1. The PR triggers the chart linting and testing GitHub action to validate the chart
1. Once the PR is merged the changes will be included in the next chart released from the `master` branch

## Releasing the Chart

The chart needs to be released in response to a Metrics Server release or on an as-needed basis. The process is as follows:

1. An issue is proposing a new chart release
1. A PR is opened to update _Chart.yaml_ with the `appVersion`, `version` (based on the release changes) and `annotations`
1. The PR triggers the chart linting and testing GitHub action to validate the chart
1. The PR is merged and a GitHub action releases the chart
14 changes: 5 additions & 9 deletions README.md
Expand Up @@ -53,17 +53,15 @@ distributions. Please ensure that your cluster distribution supports these requi

## Installation

Latest Metrics Server release can be installed by running:
Metrics Server can be installed via the official [Helm chart](https://artifacthub.io/packages/helm/metrics-server/metrics-server) or directly from the _components.yaml_ manifest. To install the latest Metrics Server release from the manifest, run the following command.

```shell
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
```

Or via the [Helm chart](charts/metrics-server/README.md).
Installation instructions for previous releases can be found in [Metrics Server releases](https://github.com/kubernetes-sigs/metrics-server/releases).

Installation instructions for previous releases can be found in [Metrics Server releases].

Compatibility matrix:
### Compatibility Matrix

Metrics Server | Metrics API group/version | Supported Kubernetes version
---------------|---------------------------|-----------------------------
Expand All @@ -72,13 +70,11 @@ Metrics Server | Metrics API group/version | Supported Kubernetes version
0.4.x | `metrics.k8s.io/v1beta1` | *1.8+
0.3.x | `metrics.k8s.io/v1beta1` | 1.8-1.21

*For <1.16 requires passing `--authorization-always-allow-paths=/livez,/readyz` command line flag

[Metrics Server releases]: https://github.com/kubernetes-sigs/metrics-server/releases
*Kubernetes versions lower than v1.16 require passing the `--authorization-always-allow-paths=/livez,/readyz` command line flag

### High Availability

Latest Metrics Server release can be installed in high availability mode by running:
Metrics Server can be installed in high availability mode via the official [Helm chart](https://artifacthub.io/packages/helm/metrics-server/metrics-server) by setting the `replicas` value or directly from the _high-availability.yaml_ manifest. To install the latest Metrics Server release in high availability mode from the manifest, run the following command.

```shell
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/high-availability.yaml
Expand Down
1 change: 1 addition & 0 deletions RELEASE.md
Expand Up @@ -6,6 +6,7 @@ The Metrics Server is released on an as-needed basis. The process is as follows:
1. At least one [OWNER](OWNERS) must LGTM this release
1. A PR that bumps version hardcoded in code is created and merged
1. An OWNER creates a draft GitHub release
1. An OWNER creates an issue to release the corresponding Helm chart (see [CHART.md](CHART.md) for chart release process)
1. An OWNER creates a release tag using `GIT_TAG=$VERSION make release-tag` and waits for [prow.k8s.io](prow.k8s.io) to build and push new images to [gcr.io/k8s-staging-metrics-server](https://gcr.io/k8s-staging-metrics-server)
1. An OWNER builds the release manifests using `make release-manifests` and uploads them to Github release
1. A PR in [kubernetes/k8s.io](https://github.com/kubernetes/k8s.io/blob/main/k8s.gcr.io/images/k8s-staging-metrics-server/images.yaml) is created to release images to `k8s.gcr.io`
Expand Down

0 comments on commit 0ea9d1f

Please sign in to comment.