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

OCPBUGS-39133: Add graceful shutdown flags #34

Merged
merged 109 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
bab7229
Bump the gomod-dependencies group with 6 updates
dependabot[bot] Jan 22, 2024
1b01024
Merge pull request #1411 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Jan 25, 2024
fd7517d
feat(chart): Released v3.12.0 (v0.7.0)
stevehipwell Jan 30, 2024
605bc86
Merge pull request #1414 from stevehipwell/release-chart-v3-12-0
k8s-ci-robot Feb 7, 2024
bc7e702
fix(chart): Fixed incorrect changelog version lookup
stevehipwell Feb 7, 2024
1cd2b2d
Merge pull request #1417 from stevehipwell/fix-chart-release
k8s-ci-robot Feb 7, 2024
ac85a42
Bump action-stars/install-tool-from-github-release from 0.2.1 to 0.2.2
dependabot[bot] Feb 12, 2024
563eec0
Bump helm/kind-action from 1.8.0 to 1.9.0
dependabot[bot] Feb 12, 2024
c43bc64
Update kind to use v0.22.0 version to support new kubernetes version
yangjunmyfm192085 Feb 19, 2024
e761e04
Merge pull request #1420 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Feb 20, 2024
1185328
Merge pull request #1423 from yangjunmyfm192085/updatekind0.22.0
k8s-ci-robot Feb 20, 2024
018338c
Bump mikefarah/yq from 4.40.5 to 4.42.1
dependabot[bot] Feb 26, 2024
a6a0ea3
Merge pull request #1430 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Feb 27, 2024
3ce5101
Update README
tuladhar Mar 5, 2024
7c8daea
Add Prometheus hyperlink
tuladhar Mar 5, 2024
a9fdc88
pkg/api: fix singular name
dgrisonnet Mar 5, 2024
7d9dfa8
Merge pull request #1436 from dgrisonnet/fix-singular-name
k8s-ci-robot Mar 6, 2024
c74a862
Merge pull request #1435 from tuladhar/prometheus-hyperlink
k8s-ci-robot Mar 7, 2024
02081eb
Merge pull request #1434 from tuladhar/emphasize-using-alerts
k8s-ci-robot Mar 9, 2024
d935a09
Bump mindsers/changelog-reader-action from 2.2.2 to 2.2.3
dependabot[bot] Mar 11, 2024
ac29d55
Bump softprops/action-gh-release from 1 to 2
dependabot[bot] Mar 11, 2024
474a0e8
Merge pull request #1439 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Mar 12, 2024
1b6948f
Merge pull request #1419 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Mar 12, 2024
af43f40
Merge pull request #1440 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Mar 12, 2024
4b9ad3a
Bump actions/setup-python from 5.0.0 to 5.1.0
dependabot[bot] Apr 1, 2024
5694dce
chore(chart): Updated Helm chart for v0.7.1
stevehipwell Apr 3, 2024
525eb66
Merge pull request #1461 from stevehipwell/helm-chart-v0.7.1
k8s-ci-robot Apr 4, 2024
2f4a8b2
Remove double negative in README.md
Georift Apr 5, 2024
3d6ecce
Update README.md
Georift Apr 5, 2024
7e71fc5
Merge pull request #1462 from Georift/patch-2
k8s-ci-robot Apr 5, 2024
14e0c86
Bump sigs.k8s.io/mdtoc in /scripts in the gomod-dependencies group
dependabot[bot] Apr 8, 2024
2c07e13
Bump golang from 1.21.6 to 1.22.2
dependabot[bot] Apr 8, 2024
903e17c
Bump azure/setup-helm from 3.5 to 4
dependabot[bot] Apr 15, 2024
9f166ec
only enable psp in kubernetes version less than 1.25
treksler Apr 16, 2024
8d72a27
Update README.md
treksler Apr 16, 2024
ba32fb8
Update values.yaml
treksler Apr 16, 2024
9808f48
Merge pull request #1471 from treksler/patch-1
k8s-ci-robot Apr 17, 2024
5e45394
Merge pull request #1465 from kubernetes-sigs/dependabot/go_modules/s…
k8s-ci-robot Apr 18, 2024
95ca09a
Merge pull request #1466 from kubernetes-sigs/dependabot/docker/golan…
k8s-ci-robot Apr 18, 2024
3d43e71
Bump golang.org/x/net from 0.20.0 to 0.23.0
dependabot[bot] Apr 19, 2024
34c63f9
Merge pull request #1469 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Apr 19, 2024
c2b46c4
chore(chart): add conditional include on optional Deployment schedule…
senges Apr 26, 2024
90c6a3a
Merge pull request #1475 from senges/chore/chart-schduler-conditional
k8s-ci-robot Apr 29, 2024
f79654e
Bump helm/kind-action from 1.9.0 to 1.10.0
dependabot[bot] Apr 29, 2024
bba0277
Bump actions/checkout from 4.1.1 to 4.1.4
dependabot[bot] Apr 29, 2024
4c61f5d
fix(helm): nanny rolebinding needs to be in release ns
the-technat May 1, 2024
52389b3
Merge pull request #1479 from the-technat/fix/1275
k8s-ci-robot May 1, 2024
cce795e
Merge pull request #1478 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 2, 2024
ee887eb
Merge pull request #1472 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot May 2, 2024
0b6511a
Merge pull request #1477 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 2, 2024
4391bf6
Bump azure/setup-helm from 4.1.0 to 4.2.0
dependabot[bot] May 6, 2024
feb094d
Bump softprops/action-gh-release from 2.0.2 to 2.0.5
dependabot[bot] May 13, 2024
d27f15f
Bump actions/checkout from 4.1.4 to 4.1.5
dependabot[bot] May 13, 2024
2b1aa57
Bump mikefarah/yq from 4.42.1 to 4.44.1
dependabot[bot] May 13, 2024
82be94c
update k8s kind version to 1.30 for e2e tests
yangjunmyfm192085 May 15, 2024
55dd6d0
update go version to Keep in sync with Dockerfile
yangjunmyfm192085 May 15, 2024
f8ca73b
Merge pull request #1492 from yangjunmyfm192085/updatek8s1.30
k8s-ci-robot May 15, 2024
8920519
Merge pull request #1493 from yangjunmyfm192085/updatego
k8s-ci-robot May 15, 2024
404a338
Merge pull request #1488 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 16, 2024
eb834dd
Merge pull request #1489 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 16, 2024
10f2296
Merge pull request #1459 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 16, 2024
0026f4c
Merge pull request #1485 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 16, 2024
0d45c6e
Merge pull request #1487 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot May 16, 2024
19f9e22
fix gomod-dependencies
yangjunmyfm192085 May 17, 2024
cb1b979
Merge pull request #1494 from yangjunmyfm192085/updatedependencies
k8s-ci-robot May 21, 2024
0edc6ba
fix comment typo in pkg/storage/pod.go
simonpasquier Jun 3, 2024
b7a466e
Merge pull request #1502 from simonpasquier/fix-comment-typo
k8s-ci-robot Jun 3, 2024
3ba733c
build(deps): bump golang from 1.22.3 to 1.22.4
dependabot[bot] Jun 10, 2024
35d35cb
Merge pull request #1505 from kubernetes-sigs/dependabot/docker/golan…
k8s-ci-robot Jun 13, 2024
a580a10
build(deps): bump actions/checkout from 4.1.5 to 4.1.7
dependabot[bot] Jun 17, 2024
a832cfb
build(deps): bump mikefarah/yq from 4.44.1 to 4.44.2
dependabot[bot] Jun 17, 2024
ba39713
addOnResizer update
jimmy-ungerman Jun 17, 2024
e285375
Merge pull request #1504 from jimmy-ungerman/master
k8s-ci-robot Jun 18, 2024
986264f
update dependencies manually
yangjunmyfm192085 Jun 22, 2024
e621450
Merge pull request #1512 from yangjunmyfm192085/manualupdatedepend
k8s-ci-robot Jun 22, 2024
adccd76
build(deps): bump softprops/action-gh-release from 2.0.5 to 2.0.6
dependabot[bot] Jun 24, 2024
0eefcec
Merge pull request #1514 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Jun 27, 2024
e48425e
Merge pull request #1508 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Jun 27, 2024
a6f6df8
build(deps): bump action-stars/install-tool-from-github-release
dependabot[bot] Jul 8, 2024
26e96b8
update dependencies manually
yangjunmyfm192085 Jul 10, 2024
87f1176
Merge pull request #1507 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Jul 10, 2024
fb261a6
Merge pull request #1521 from yangjunmyfm192085/updatedepend
k8s-ci-robot Jul 10, 2024
a4e3533
build(deps): bump actions/setup-python from 5.1.0 to 5.1.1
dependabot[bot] Jul 15, 2024
13ac68f
build(deps): bump softprops/action-gh-release from 2.0.6 to 2.0.8
dependabot[bot] Jul 22, 2024
4487b50
Merge pull request #1529 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Jul 25, 2024
52f93bf
Merge pull request #1526 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Jul 25, 2024
0aa1632
build(deps): bump mikefarah/yq from 4.44.2 to 4.44.3
dependabot[bot] Aug 5, 2024
a178a19
Merge pull request #1517 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Aug 8, 2024
40ebf13
Merge pull request #1534 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Aug 8, 2024
b11fc79
bump the gomod-dependencies group across 1 directory with 8 updates
yangjunmyfm192085 Aug 9, 2024
89d86e6
Merge pull request #1535 from yangjunmyfm192085/updep
k8s-ci-robot Aug 9, 2024
aad8454
update the gomod-dependencies group in /scripts
yangjunmyfm192085 Aug 12, 2024
d512aa4
Merge pull request #1536 from yangjunmyfm192085/fixdep
k8s-ci-robot Aug 13, 2024
cc3047e
bump the gomod-dependencies
yangjunmyfm192085 Aug 16, 2024
c3393f5
Merge pull request #1541 from yangjunmyfm192085/updatek8s
k8s-ci-robot Aug 16, 2024
7ba91be
update k8s version for e2e tests
yangjunmyfm192085 Aug 16, 2024
7130a87
Merge pull request #1542 from yangjunmyfm192085/updatekind
k8s-ci-robot Aug 16, 2024
11c85f6
docs/command-line-flags.txt: update with latest flags
slashpai Aug 20, 2024
27e8622
Merge pull request #1545 from slashpai/disable-http2
k8s-ci-robot Aug 20, 2024
f5453d1
fix pull-metrics-server-test-version test
yangjunmyfm192085 Aug 21, 2024
d907097
Merge pull request #1546 from yangjunmyfm192085/fix-testversion
k8s-ci-robot Aug 21, 2024
2d53540
build(deps): bump github.com/onsi/ginkgo/v2
dependabot[bot] Aug 26, 2024
e8af0b3
Merge pull request #1550 from kubernetes-sigs/dependabot/go_modules/g…
k8s-ci-robot Aug 27, 2024
60694b9
.github: add content write perm to release jobs
dgrisonnet Aug 29, 2024
78b132f
Merge pull request #1555 from dgrisonnet/update-workflow-perms
k8s-ci-robot Sep 4, 2024
a4fc038
Wire server run options to flags.
benluddy Sep 6, 2024
aacd5cb
Merge pull request #1560 from benluddy/server-run-options
k8s-ci-robot Sep 6, 2024
6c7026f
Merge commit 'aacd5cbf09aa7d6a83e2444d1729f846b2e8439e' into graceful…
dgrisonnet Sep 9, 2024
07cb1ae
vendor: update
dgrisonnet Sep 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .github/workflows/gh-workflow-approve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- master

permissions:
contents: read

jobs:
approve:
name: Approve ok-to-test
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/lint-test-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- .github/workflows/lint-test-chart.yaml
- "charts/metrics-server/**"

permissions:
contents: read

jobs:
lint-test:
name: Lint & Test
Expand All @@ -16,17 +19,17 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
fetch-depth: 0

- name: Set-up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.x"

- name: Set-up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
Expand All @@ -48,20 +51,20 @@ jobs:
- name: Get chart version
id: chart_version
if: steps.changes.outputs.changed == 'true'
uses: mikefarah/yq@dd648994340a5d03225d97abf19c9bf1086c3f07 # v4.40.5
uses: mikefarah/yq@bbdd97482f2d439126582a59689eb1c855944955 # v4.44.3
with:
cmd: yq eval '.version' './charts/metrics-server/Chart.yaml'

- name: Get changelog entry
if: steps.changes.outputs.changed == 'true'
uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
with:
path: charts/metrics-server/CHANGELOG.md
version: ${{ steps.chart_version.outputs.version }}
version: ${{ steps.chart_version.outputs.result }}

- name: Set-up Artifact Hub CLI
if: steps.changes.outputs.changed == 'true'
uses: action-stars/install-tool-from-github-release@b21a01813213cbbf482eeceda07ad03b41b754d1 # v0.2.1
uses: action-stars/install-tool-from-github-release@ece2623611b240002e0dd73a0d685505733122f6 # v0.2.4
with:
github_token: ${{ github.token }}
owner: artifacthub
Expand All @@ -80,7 +83,7 @@ jobs:

- name: Create Kind cluster
if: steps.changes.outputs.changed == 'true'
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
with:
wait: 120s

Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths:
- charts/metrics-server/Chart.yaml

permissions:
contents: read

jobs:
release:
name: Release
Expand All @@ -15,9 +18,11 @@ jobs:
defaults:
run:
shell: bash
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
fetch-depth: 0

Expand All @@ -28,13 +33,13 @@ jobs:

- name: Get chart version
id: chart_version
uses: mikefarah/yq@dd648994340a5d03225d97abf19c9bf1086c3f07 # v4.40.5
uses: mikefarah/yq@bbdd97482f2d439126582a59689eb1c855944955 # v4.44.3
with:
cmd: yq eval '.version' './charts/metrics-server/Chart.yaml'

- name: Get chart app version
id: chart_app_version
uses: mikefarah/yq@dd648994340a5d03225d97abf19c9bf1086c3f07 # v4.40.5
uses: mikefarah/yq@bbdd97482f2d439126582a59689eb1c855944955 # v4.44.3
with:
cmd: yq eval '.appVersion' './charts/metrics-server/Chart.yaml'

Expand All @@ -60,18 +65,18 @@ jobs:

- name: Set-up Helm
if: steps.check_can_release.outputs.continue == 'true'
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest

- name: Get CHANGELOG entry
id: changelog_reader
if: steps.check_can_release.outputs.continue == 'true'
uses: mindsers/changelog-reader-action@b97ce03a10d9bdbb07beb491c76a5a01d78cd3ef # v2.2.2
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3
with:
path: charts/metrics-server/CHANGELOG.md
version: ${{ steps.chart_version.outputs.version }}
version: ${{ steps.chart_version.outputs.result }}

- name: Create release notes
if: steps.check_can_release.outputs.continue == 'true'
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@ on:
types:
- published

permissions:
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
- name: Build manifests
run: make release-manifests
- name: Release manifests
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v0.1.15
with:
files: |
_output/components.yaml
Expand All @@ -27,7 +32,7 @@ jobs:
- name: Build binaries
run: make build-all
- name: Release binaries
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v0.1.15
with:
files: |
_output/metrics-server-*
25 changes: 12 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,29 +170,28 @@ test-image: container

.PHONY: test-image-all
test-image-all:
@for arch in $(ALL_ARCHITECTURES); do ARCH=$${arch} $(MAKE) test-image; done
@set -e;for arch in $(ALL_ARCHITECTURES); do ARCH=$${arch} $(MAKE) test-image; done

# E2e tests
# -----------

.PHONY: test-e2e
test-e2e: test-e2e-1.29
test-e2e: test-e2e-1.31

.PHONY: test-e2e-all
test-e2e-all: test-e2e-1.29 test-e2e-1.28 test-e2e-1.27
test-e2e-all: test-e2e-1.31 test-e2e-1.30 test-e2e-1.29

.PHONY: test-e2e-1.29
test-e2e-1.29:
NODE_IMAGE=kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570 KIND_CONFIG="${PWD}/test/kind-config-with-sidecar-containers.yaml" ./test/test-e2e.sh

.PHONY: test-e2e-1.28
test-e2e-1.28:
NODE_IMAGE=kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31 KIND_CONFIG="${PWD}/test/kind-config-with-sidecar-containers.yaml" ./test/test-e2e.sh
.PHONY: test-e2e-1.31
test-e2e-1.31:
NODE_IMAGE=kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865 KIND_CONFIG="${PWD}/test/kind-config-with-sidecar-containers.yaml" ./test/test-e2e.sh

.PHONY: test-e2e-1.27
test-e2e-1.27:
NODE_IMAGE=kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72 ./test/test-e2e.sh
.PHONY: test-e2e-1.30
test-e2e-1.30:
NODE_IMAGE=kindest/node:v1.30.4@sha256:976ea815844d5fa93be213437e3ff5754cd599b040946b5cca43ca45c2047114 KIND_CONFIG="${PWD}/test/kind-config-with-sidecar-containers.yaml" ./test/test-e2e.sh

.PHONY: test-e2e-1.29
test-e2e-1.29:
NODE_IMAGE=kindest/node:v1.29.8@sha256:d46b7aa29567e93b27f7531d258c372e829d7224b25e3fc6ffdefed12476d3aa KIND_CONFIG="${PWD}/test/kind-config-with-sidecar-containers.yaml" ./test/test-e2e.sh

.PHONY: test-e2e-ha
test-e2e-ha:
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Metrics Server collects resource metrics from Kubelets and exposes them in Kuber
for use by [Horizontal Pod Autoscaler] and [Vertical Pod Autoscaler]. Metrics API can also be accessed by `kubectl top`,
making it easier to debug autoscaling pipelines.

Metrics Server is not meant for non-autoscaling purposes. For example, don't use it to forward metrics to monitoring solutions, or as a source of monitoring solution metrics. In such cases please collect metrics from Kubelet `/metrics/resource` endpoint directly.
> [!CAUTION]
> Metrics Server is meant only for autoscaling purposes. For example, don't use it to forward metrics to monitoring solutions, or as a source of monitoring solution metrics. In such cases please collect metrics from Kubelet `/metrics/resource` endpoint directly.

Metrics Server offers:

Expand All @@ -33,7 +34,7 @@ Don't use Metrics Server when you need:
- An accurate source of resource usage metrics
- Horizontal autoscaling based on other resources than CPU/Memory

For unsupported use cases, check out full monitoring solutions like Prometheus.
For unsupported use cases, check out full monitoring solutions like [Prometheus](https://github.com/prometheus/prometheus).

[Horizontal Autoscaling]: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
[Vertical Autoscaling]: https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/
Expand Down Expand Up @@ -93,7 +94,8 @@ On Kubernetes v1.19-1.21:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/high-availability.yaml
```

Note that this configuration **requires** having a cluster with at least 2 nodes on which Metrics Server can be scheduled.
>[!NOTE]
> This configuration **requires** having a cluster with at least 2 nodes on which Metrics Server can be scheduled.

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.

Expand Down
9 changes: 9 additions & 0 deletions charts/metrics-server/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@

## [UNRELEASED]

### Fixed

- Fixed nanny's RoleBinding which contained a hard-coded namespace instead of the Helm's release namespace. ([#1479](https://github.com/kubernetes-sigs/metrics-server/pull/1479)) _@
the-technat_

- ### Changed
- Updated the _addonResizer_ OCI image to [1.8.21](https://github.com/kubernetes/autoscaler/releases/tag/addon-resizer-1.8.21). _@jimmy-ungerman_

## [3.12.1] - TBC

### Changed

- Updated the _Metrics Server_ OCI image to [v0.7.1](https://github.com/kubernetes-sigs/metrics-server/releases/tag/v0.7.1). ([#1461](https://github.com/kubernetes-sigs/metrics-server/pull/1461)) _@stevehipwell_
- Changed `Deployment` templating to ignore `schedulerName` when value is empty. ([#1475](https://github.com/kubernetes-sigs/metrics-server/pull/1475)) _@senges_

## [3.12.0] - 2024-02-07

Expand Down
4 changes: 2 additions & 2 deletions charts/metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the full name template. | `nil` |
| `serviceAccount.secrets` | The list of secrets mountable by this service account. See <https://kubernetes.io/docs/reference/labels-annotations-taints/#enforce-mountable-secrets> | `[]` |
| `rbac.create` | If `true`, create the RBAC resources. | `true` |
| `rbac.pspEnabled` | If `true`, create a pod security policy resource. | `false` |
| `rbac.pspEnabled` | If `true`, create a pod security policy resource, unless Kubernetes version is 1.25 or later. | `false` |
| `apiService.create` | If `true`, create the `v1beta1.metrics.k8s.io` API service. You typically want this enabled! If you disable API service creation you have to manage it outside of this chart for e.g horizontal pod autoscaling to work with this release. | `true` |
| `apiService.annotations` | Annotations to add to the API service | `{}` |
| `apiService.insecureSkipTLSVerify` | Specifies whether to skip TLS verification (NOTE: this setting is not a proxy for the `--kubelet-insecure-tls` metrics-server flag) | `true` |
Expand Down Expand Up @@ -63,7 +63,7 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `addonResizer.enabled` | If `true`, run the addon-resizer as a sidecar to automatically scale resource requests with cluster size. | `false` |
| `addonResizer.securityContext` | Security context for the _metrics_server_container. | _See values.yaml |
| `addonResizer.image.repository` | addon-resizer image repository | `registry.k8s.io/autoscaling/addon-resizer` |
| `addonResizer.image.tag` | addon-resizer image tag | `1.8.19` |
| `addonResizer.image.tag` | addon-resizer image tag | `1.8.21` |
| `addonResizer.resources` | Resource requests and limits for the _nanny_ container. | `{ requests: { cpu: 40m, memory: 25Mi }, limits: { cpu: 40m, memory: 25Mi } }` |
| `addonResizer.nanny.cpu` | The base CPU requirement. | `0m` |
| `addonResizer.nanny.extraCPU` | The amount of CPU to add per node. | `1m` |
Expand Down
4 changes: 3 additions & 1 deletion charts/metrics-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
schedulerName: {{ .Values.schedulerName }}
{{- with .Values.schedulerName }}
schedulerName: {{ . }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/metrics-server/templates/psp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.rbac.pspEnabled }}
{{- if and (.Values.rbac.pspEnabled) (semverCompare "<1.25-0" .Capabilities.KubeVersion.GitVersion) }}
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/metrics-server/templates/rolebinding-nanny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ printf "%s-nanny" (include "metrics-server.fullname" .) }}
namespace: kube-system
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
roleRef:
Expand Down
3 changes: 2 additions & 1 deletion charts/metrics-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ serviceAccount:
rbac:
# Specifies whether RBAC resources should be created
create: true
# Note: PodSecurityPolicy will not be created when Kubernetes version is 1.25 or later.
pspEnabled: false

apiService:
Expand Down Expand Up @@ -129,7 +130,7 @@ addonResizer:
enabled: false
image:
repository: registry.k8s.io/autoscaling/addon-resizer
tag: 1.8.20
tag: 1.8.21
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
Expand Down
Loading