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 <[email protected]>
  • Loading branch information
stevehipwell committed Oct 26, 2021
1 parent 8108af0 commit 5b65e8b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-test-chart.yaml
Original file line number Diff line number Diff line change
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/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
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
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ If your repo has certain guidelines for contribution, put them here ahead of the

- [Mentoring Initiatives](https://git.k8s.io/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers!

## Chart Changes

When contributing chart changes please follow the same process as when contributing other content but also please **DON'T** modify _Chart.yaml_ in the PR as this would result in a chart release when merged and will mean that your PR will need modifying before it can be accepted. The chart version will be updated as part of the PR to release the chart.

# Development

Required tools:
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
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 either directly from YAML manifest or via the official [Helm chart](https://artifacthub.io/packages/helm/metrics-server/metrics-server). To install the latest Metrics Server release from the _components.yaml_ 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 directly from a YAML manifest or via the official [Helm chart](https://artifacthub.io/packages/helm/metrics-server/metrics-server) by setting the `replicas` value greater than `1`. To install the latest Metrics Server release in high availability mode from the _high-availability.yaml_ manifest, run the following command.

```shell
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/high-availability.yaml
Expand All @@ -88,6 +84,10 @@ Note that this configuration **requires** having a cluster with at least 2 nodes

Also, to maximize the efficiency of this highly available configuration, it is **recommended** to add the `--enable-aggregator-routing=true` CLI flag to the kube-apiserver so that requests sent to Metrics Server are load balanced between the 2 instances.

### Helm Chart

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 chart repository backed on the `gh-pages` branch. A new version of the chart will be released for each Metrics Server release and can also be released independently if there is a need. The chart on the `master` branch shouldn't be referenced directly as it might contain modifications since it was last released, to view the chart code use the chart release tag.

## Security context

Metrics Server requires the `CAP_NET_BIND_SERVICE` capability in order to bind to a privileged ports as non-root.
Expand Down
10 changes: 10 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ 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 via the chart release process (below)
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`
1. An OWNER publishes the GitHub release. Once published, release manifests will be automatically added to the release by CI.
1. An announcement email is sent to `[email protected]` with the subject `[ANNOUNCE] metrics-server $VERSION is released`
1. The release issue is closed

## Chart Release Process

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

0 comments on commit 5b65e8b

Please sign in to comment.