Upgrade metrics-server to version 3.12.0/0.7.0

Upgrade metrics-server helm charts version from 3.11.0 to 3.12.0
and metrics-server image version from 0.6.4 to 0.7.0.
The new version supports k8s 1.24 - 1.29.

Furthermore, the name of the example application, which was in
the singular, and the readme, which was inconsistent, were corrected.

Test Plan:
    PASS: Build package
    PASS: App upload/apply/update/remove/delete
    PASS: Check application version
    PASS: Run sample application

Story: 2010681
Task: 49567

Change-Id: Ie592c03147b3cf40e9eeb631c18725d25460becf
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
This commit is contained in:
Erickson Silva de Oliveira 2024-02-13 15:01:53 -03:00
parent b09f7ede4b
commit f191346f95
12 changed files with 69 additions and 58 deletions

View File

@ -1,3 +1,9 @@
metrics-server-helm (3.12-0) unstable; urgency=medium
* New upstream release.
-- Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com> Mon, 12 Feb 2024 16:35:00 +0000
metrics-server-helm (3.11-0) unstable; urgency=medium metrics-server-helm (3.11-0) unstable; urgency=medium
* New upstream release. * New upstream release.

View File

@ -3,7 +3,7 @@ Upstream-Name: metrics-server-helm
Source: https://opendev.org/starlingx/metrics-server-armada-app Source: https://opendev.org/starlingx/metrics-server-armada-app
Files: * Files: *
Copyright: (c) 2013-2023 Wind River Systems, Inc Copyright: (c) 2013-2024 Wind River Systems, Inc
License: Apache-2 License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -23,7 +23,7 @@ License: Apache-2
# If you want to use GPL v2 or later for the /debian/* files use # If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines # the following clauses, or change it to suit. Delete these two lines
Files: debian/* Files: debian/*
Copyright: 2021-2023 Wind River Systems, Inc Copyright: 2021-2024 Wind River Systems, Inc
License: Apache-2 License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View File

@ -1,7 +1,7 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# export DH_VERBOSE = 1 # export DH_VERBOSE = 1
export METRICS_MGR_PKG="metrics-server-3.11.0.tgz" export METRICS_MGR_PKG="metrics-server-3.12.0.tgz"
export HELM_FOLDER=/usr/lib/helm export HELM_FOLDER=/usr/lib/helm
export ROOT=debian/tmp export ROOT=debian/tmp
export APP_FOLDER=$(ROOT)$(HELM_FOLDER) export APP_FOLDER=$(ROOT)$(HELM_FOLDER)

View File

@ -1,12 +1,12 @@
--- ---
debname: metrics-server-helm debname: metrics-server-helm
debver: 3.11-0 debver: 3.12-0
src_path: files src_path: files
dl_files: dl_files:
metrics-server-3.11.0.tgz: metrics-server-3.12.0.tgz:
topdir: null topdir: null
url: https://github.com/kubernetes-sigs/metrics-server/releases/download/metrics-server-helm-chart-3.11.0/metrics-server-3.11.0.tgz url: https://github.com/kubernetes-sigs/metrics-server/releases/download/metrics-server-helm-chart-3.12.0/metrics-server-3.12.0.tgz
md5sum: bd58754f21818235b22bad05b2a502c6 sha256sum: 19df2fa9c4c6e1ec4f134da56ae9c3e6b610bfd5674744115c9e9864c5f3debe
revision: revision:
dist: $STX_DIST dist: $STX_DIST
GITREVCOUNT: GITREVCOUNT:

View File

@ -1,21 +1,21 @@
From 4c95ace6c320856a955a0066722649eff02ee256 Mon Sep 17 00:00:00 2001 From 358191904954c1568f8e7545ea19c0764c338fb0 Mon Sep 17 00:00:00 2001
From: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com> From: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
Date: Thu, 21 Sep 2023 15:24:19 -0300 Date: Tue, 13 Feb 2024 09:13:29 -0300
Subject: [PATCH 1/2] Add sample app to metrics-server Subject: [PATCH 1/2] Add sample app to metrics-server
This patch allows the creation of a metrics-server sample-app. It adds This patch allows the creation of a metrics-server sample-app. It adds
the necessary elements to templates to create a sample-app pod on a the necessary elements to templates to create a sample-app pod on a
metrics-server namespace. metrics-server namespace.
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
Signed-off-by: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com> Signed-off-by: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com>
--- ---
templates/sample-app-cluster-role-binding.yml | 16 ++++++++++++ templates/sample-app-cluster-role-binding.yml | 16 ++++++++++++
templates/sample-app-cluster-role.yml | 17 +++++++++++++ templates/sample-app-cluster-role.yml | 17 +++++++++++++
templates/sample-app-deployment.yml | 25 +++++++++++++++++++ templates/sample-app-deployment.yml | 25 +++++++++++++++++++
templates/sample-app-service-account.yml | 11 ++++++++ templates/sample-app-service-account.yml | 11 ++++++++
values.yaml | 9 +++++++ values.yaml | 8 ++++++
5 files changed, 78 insertions(+) 5 files changed, 77 insertions(+)
create mode 100644 templates/sample-app-cluster-role-binding.yml create mode 100644 templates/sample-app-cluster-role-binding.yml
create mode 100644 templates/sample-app-cluster-role.yml create mode 100644 templates/sample-app-cluster-role.yml
create mode 100644 templates/sample-app-deployment.yml create mode 100644 templates/sample-app-deployment.yml
@ -23,7 +23,7 @@ Signed-off-by: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com>
diff --git a/templates/sample-app-cluster-role-binding.yml b/templates/sample-app-cluster-role-binding.yml diff --git a/templates/sample-app-cluster-role-binding.yml b/templates/sample-app-cluster-role-binding.yml
new file mode 100644 new file mode 100644
index 0000000..cffc2f1 index 00000000..cffc2f1a
--- /dev/null --- /dev/null
+++ b/templates/sample-app-cluster-role-binding.yml +++ b/templates/sample-app-cluster-role-binding.yml
@@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
@ -32,7 +32,7 @@ index 0000000..cffc2f1
+kind: ClusterRoleBinding +kind: ClusterRoleBinding
+metadata: +metadata:
+ labels: + labels:
+ app: metric-server-test-app + app: metrics-server-test-app
+ name: access-metrics-api + name: access-metrics-api
+roleRef: +roleRef:
+ apiGroup: rbac.authorization.k8s.io + apiGroup: rbac.authorization.k8s.io
@ -40,12 +40,12 @@ index 0000000..cffc2f1
+ name: access-metrics-api + name: access-metrics-api
+subjects: +subjects:
+- kind: ServiceAccount +- kind: ServiceAccount
+ name: metric-server-test-app + name: metrics-server-test-app
+ namespace: metrics-server + namespace: metrics-server
+{{- end }} +{{- end }}
diff --git a/templates/sample-app-cluster-role.yml b/templates/sample-app-cluster-role.yml diff --git a/templates/sample-app-cluster-role.yml b/templates/sample-app-cluster-role.yml
new file mode 100644 new file mode 100644
index 0000000..c78fb28 index 00000000..c78fb282
--- /dev/null --- /dev/null
+++ b/templates/sample-app-cluster-role.yml +++ b/templates/sample-app-cluster-role.yml
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
@ -54,7 +54,7 @@ index 0000000..c78fb28
+kind: ClusterRole +kind: ClusterRole
+metadata: +metadata:
+ labels: + labels:
+ app: metric-server-test-app + app: metrics-server-test-app
+ name: access-metrics-api + name: access-metrics-api
+rules: +rules:
+- apiGroups: +- apiGroups:
@ -69,7 +69,7 @@ index 0000000..c78fb28
\ No newline at end of file \ No newline at end of file
diff --git a/templates/sample-app-deployment.yml b/templates/sample-app-deployment.yml diff --git a/templates/sample-app-deployment.yml b/templates/sample-app-deployment.yml
new file mode 100644 new file mode 100644
index 0000000..26de1cc index 00000000..26de1cc9
--- /dev/null --- /dev/null
+++ b/templates/sample-app-deployment.yml +++ b/templates/sample-app-deployment.yml
@@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
@ -77,17 +77,17 @@ index 0000000..26de1cc
+apiVersion: apps/v1 +apiVersion: apps/v1
+kind: Deployment +kind: Deployment
+metadata: +metadata:
+ name: metric-server-test-app-deployment + name: metrics-server-test-app-deployment
+ namespace: metrics-server + namespace: metrics-server
+spec: +spec:
+ selector: + selector:
+ matchLabels: + matchLabels:
+ app: metric-server-test-app + app: metrics-server-test-app
+ replicas: 1 + replicas: 1
+ template: + template:
+ metadata: + metadata:
+ labels: + labels:
+ app: metric-server-test-app + app: metrics-server-test-app
+ spec: + spec:
+ containers: + containers:
+ - name: sample-app + - name: sample-app
@ -96,11 +96,11 @@ index 0000000..26de1cc
+ env: + env:
+ - name: TOKEN_PATH + - name: TOKEN_PATH
+ value: /var/run/secrets/kubernetes.io/serviceaccount/token + value: /var/run/secrets/kubernetes.io/serviceaccount/token
+ serviceAccountName: metric-server-test-app + serviceAccountName: metrics-server-test-app
+{{- end -}} +{{- end -}}
diff --git a/templates/sample-app-service-account.yml b/templates/sample-app-service-account.yml diff --git a/templates/sample-app-service-account.yml b/templates/sample-app-service-account.yml
new file mode 100644 new file mode 100644
index 0000000..81b0ef6 index 00000000..81b0ef6a
--- /dev/null --- /dev/null
+++ b/templates/sample-app-service-account.yml +++ b/templates/sample-app-service-account.yml
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
@ -111,19 +111,18 @@ index 0000000..81b0ef6
+kind: ServiceAccount +kind: ServiceAccount
+metadata: +metadata:
+ labels: + labels:
+ app: metric-server-test-app + app: metrics-server-test-app
+ name: metric-server-test-app + name: metrics-server-test-app
+ namespace: metrics-server + namespace: metrics-server
+{{- end }} +{{- end }}
diff --git a/values.yaml b/values.yaml diff --git a/values.yaml b/values.yaml
index fba10aa..b31a5fb 100644 index 4f6b9219..54567451 100644
--- a/values.yaml --- a/values.yaml
+++ b/values.yaml +++ b/values.yaml
@@ -180,3 +180,12 @@ topologySpreadConstraints: [] @@ -195,5 +195,13 @@ deploymentAnnotations: {}
deploymentAnnotations: {}
schedulerName: "" schedulerName: ""
+
+# If you want to deploy a sample app application to test metrics server +# If you want to deploy a sample app application to test metrics server
+# Set the create value to true +# Set the create value to true
+sampleApp: +sampleApp:
@ -132,5 +131,7 @@ index fba10aa..b31a5fb 100644
+ repository: docker.io/starlingx/stx-metrics-server-sample-app + repository: docker.io/starlingx/stx-metrics-server-sample-app
+ tag: stx.7.0-v1.0.0 + tag: stx.7.0-v1.0.0
+ +
-- tmpVolume:
2.25.1 emptyDir: {}
--
2.34.1

View File

@ -1,6 +1,6 @@
From acb714d1a5b52b7246f616858fa2ee5e44f51289 Mon Sep 17 00:00:00 2001 From 82a35a0a883f4a0d4f004af08b8b83c0cc5075d1 Mon Sep 17 00:00:00 2001
From: dbarbosa <david.barbosabastos@windriver.com> From: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
Date: Wed, 13 Dec 2023 18:39:15 -0300 Date: Tue, 13 Feb 2024 09:35:43 -0300
Subject: [PATCH 2/2] Add label platform/application to pods Subject: [PATCH 2/2] Add label platform/application to pods
Add support to 'app.starlingx.io/component' to be overwritten Add support to 'app.starlingx.io/component' to be overwritten
@ -8,16 +8,19 @@ by user override, with possible values being 'platform' and
'application'. With 'platform' being the default value. This 'application'. With 'platform' being the default value. This
change will also restart the pods if the label in namespace change will also restart the pods if the label in namespace
change. change.
Signed-off-by: Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com>
Signed-off-by: David Barbosa Bastos <David.BarbosaBastos@windriver.com>
--- ---
templates/deployment.yaml | 2 ++ templates/deployment.yaml | 2 ++
values.yaml | 1 + values.yaml | 1 +
2 files changed, 3 insertions(+) 2 files changed, 3 insertions(+)
diff --git a/templates/deployment.yaml b/templates/deployment.yaml diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 1d656fc..097c55f 100644 index 48cda7fe..77c1938f 100644
--- a/templates/deployment.yaml --- a/templates/deployment.yaml
+++ b/templates/deployment.yaml +++ b/templates/deployment.yaml
@@ -21,12 +21,14 @@ spec: @@ -24,12 +24,14 @@ spec:
template: template:
metadata: metadata:
labels: labels:
@ -33,17 +36,16 @@ index 1d656fc..097c55f 100644
{{- end }} {{- end }}
spec: spec:
diff --git a/values.yaml b/values.yaml diff --git a/values.yaml b/values.yaml
index b31a5fb..e6992c9 100644 index 54567451..2182c37f 100644
--- a/values.yaml --- a/values.yaml
+++ b/values.yaml +++ b/values.yaml
@@ -45,6 +45,7 @@ apiService: @@ -45,6 +45,7 @@ apiService:
# The PEM encoded CA bundle for TLS verification # The PEM encoded CA bundle for TLS verification
caBundle: "" caBundle: ""
+isApplicationLabel: false +isApplicationLabel: false
commonLabels: {} commonLabels: {}
podLabels: {} podLabels: {}
podAnnotations: {} podAnnotations: {}
-- --
2.34.1 2.34.1

View File

@ -23,14 +23,12 @@ Important files
- Dockerfile - Application Dockerfile - Dockerfile - Application Dockerfile
## Run application ## Run application
> Deploy tha sample app using `system helm-override-update --reuse-values > Deploy tha sample app using `system helm-override-update --reuse-values --set atribute=value <app name> <chart name> <namespace>` follow the steps below:
--set atribute=value <app name> <chart name> <namespace>` folow the steps below:
- Run `system helm-override-update --reuse-values - Run `system helm-override-update --reuse-values --set sampleApp.create=true metrics-server metrics-server metrics-server`
--set sampleApp.create=true metrics-server metrics-server metrics-server` - Run `system application-apply metrics-server` to apply the override
- Run `system application apply metrics-server` to apply the override - Run `kubectl get pods -n metrics-server` to get the name of the pod.
- Run `kubectl get pods -n metric-server-test-app` to get the name of the pod - Run `kubectl logs -n metrics-server <pod-name> --tail 1 -f` to see the logs and check if the sample application is requesting successfully the metrics server api
- Run `kubectl logs -n metric-server-test-app pod-name --tail 1 -f` to see the logs and check if the sample application is requesting successfully the metrics server api
## Endpoints ## Endpoints
@ -40,5 +38,3 @@ All of the following endpoints are GET endpoints and they are under the base pat
- `/namespaces/{namespace}/pods` - all pod metrics within namespace with support for all-namespaces - `/namespaces/{namespace}/pods` - all pod metrics within namespace with support for all-namespaces
- `/namespaces/{namespace}/pods/{pod}` - metrics for a specified pod - `/namespaces/{namespace}/pods/{pod}` - metrics for a specified pod
- `/pods` - all pod metrics of all namespaces - `/pods` - all pod metrics of all namespaces

View File

@ -1,3 +1,9 @@
stx-metrics-server-helm (1.2-0) unstable; urgency=medium
* New upstream release.
-- Erickson Silva de Oliveira <Erickson.SilvadeOliveira@windriver.com> Mon, 12 Feb 2024 16:57:00 +0000
stx-metrics-server-helm (1.1-0) unstable; urgency=medium stx-metrics-server-helm (1.1-0) unstable; urgency=medium
* New upstream release. * New upstream release.

View File

@ -4,11 +4,11 @@ Upstream-Contact: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Source: https://opendev.org/starlingx/metrics-server-armada-app/ Source: https://opendev.org/starlingx/metrics-server-armada-app/
Files: * Files: *
Copyright: (c) 2017-2023 Wind River Systems, Inc Copyright: (c) 2017-2024 Wind River Systems, Inc
License: Apache-2 License: Apache-2
Files: debian/* Files: debian/*
Copyright: 2021-2023 Wind River Systems, Inc Copyright: 2021-2024 Wind River Systems, Inc
License: Apache-2 License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View File

@ -1,6 +1,6 @@
--- ---
debname: stx-metrics-server-helm debname: stx-metrics-server-helm
debver: 1.1-0 debver: 1.2-0
src_path: stx-metrics-server-helm src_path: stx-metrics-server-helm
revision: revision:
dist: $STX_DIST dist: $STX_DIST

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2022-2023 Wind River Systems, Inc. # Copyright (c) 2022-2024 Wind River Systems, Inc.
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
@ -14,7 +14,7 @@ spec:
chart: chart:
spec: spec:
chart: metrics-server chart: metrics-server
version: 3.11.0 version: 3.12.0
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: stx-platform name: stx-platform

View File

@ -1,5 +1,5 @@
# #
# Copyright (c) 2022-2023 Wind River Systems, Inc. # Copyright (c) 2022-2024 Wind River Systems, Inc.
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
@ -9,7 +9,7 @@ args:
replicas: 1 replicas: 1
image: image:
repository: registry.k8s.io/metrics-server/metrics-server repository: registry.k8s.io/metrics-server/metrics-server
tag: "v0.6.4" tag: "v0.7.0"
tolerations: tolerations:
- key: "node-role.kubernetes.io/control-plane" - key: "node-role.kubernetes.io/control-plane"
operator: "Exists" operator: "Exists"