diff --git a/metrics-server-helm/debian/deb_folder/changelog b/metrics-server-helm/debian/deb_folder/changelog index 76a0c9b..070a495 100644 --- a/metrics-server-helm/debian/deb_folder/changelog +++ b/metrics-server-helm/debian/deb_folder/changelog @@ -1,3 +1,9 @@ +metrics-server-helm (3.12-0) unstable; urgency=medium + + * New upstream release. + + -- Erickson Silva de Oliveira Mon, 12 Feb 2024 16:35:00 +0000 + metrics-server-helm (3.11-0) unstable; urgency=medium * New upstream release. diff --git a/metrics-server-helm/debian/deb_folder/copyright b/metrics-server-helm/debian/deb_folder/copyright index 7479f57..3708c79 100644 --- a/metrics-server-helm/debian/deb_folder/copyright +++ b/metrics-server-helm/debian/deb_folder/copyright @@ -3,7 +3,7 @@ Upstream-Name: metrics-server-helm Source: https://opendev.org/starlingx/metrics-server-armada-app Files: * -Copyright: (c) 2013-2023 Wind River Systems, Inc +Copyright: (c) 2013-2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (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 # the following clauses, or change it to suit. Delete these two lines Files: debian/* -Copyright: 2021-2023 Wind River Systems, Inc +Copyright: 2021-2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/metrics-server-helm/debian/deb_folder/rules b/metrics-server-helm/debian/deb_folder/rules index d07a90c..6f5a9f7 100644 --- a/metrics-server-helm/debian/deb_folder/rules +++ b/metrics-server-helm/debian/deb_folder/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # 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 ROOT=debian/tmp export APP_FOLDER=$(ROOT)$(HELM_FOLDER) diff --git a/metrics-server-helm/debian/meta_data.yaml b/metrics-server-helm/debian/meta_data.yaml index d4e5317..bb5e261 100644 --- a/metrics-server-helm/debian/meta_data.yaml +++ b/metrics-server-helm/debian/meta_data.yaml @@ -1,12 +1,12 @@ --- debname: metrics-server-helm -debver: 3.11-0 +debver: 3.12-0 src_path: files dl_files: - metrics-server-3.11.0.tgz: + metrics-server-3.12.0.tgz: 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 - md5sum: bd58754f21818235b22bad05b2a502c6 + url: https://github.com/kubernetes-sigs/metrics-server/releases/download/metrics-server-helm-chart-3.12.0/metrics-server-3.12.0.tgz + sha256sum: 19df2fa9c4c6e1ec4f134da56ae9c3e6b610bfd5674744115c9e9864c5f3debe revision: dist: $STX_DIST GITREVCOUNT: diff --git a/metrics-server-helm/files/0001-Add-sample-app-to-metrics-server.patch b/metrics-server-helm/files/0001-Add-sample-app-to-metrics-server.patch index f12055e..94b9673 100644 --- a/metrics-server-helm/files/0001-Add-sample-app-to-metrics-server.patch +++ b/metrics-server-helm/files/0001-Add-sample-app-to-metrics-server.patch @@ -1,21 +1,21 @@ -From 4c95ace6c320856a955a0066722649eff02ee256 Mon Sep 17 00:00:00 2001 -From: Luiz Felipe Kina -Date: Thu, 21 Sep 2023 15:24:19 -0300 +From 358191904954c1568f8e7545ea19c0764c338fb0 Mon Sep 17 00:00:00 2001 +From: Erickson Silva de Oliveira +Date: Tue, 13 Feb 2024 09:13:29 -0300 Subject: [PATCH 1/2] Add sample app to metrics-server 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 metrics-server namespace. +Signed-off-by: Erickson Silva de Oliveira Signed-off-by: Luiz Felipe Kina - --- templates/sample-app-cluster-role-binding.yml | 16 ++++++++++++ templates/sample-app-cluster-role.yml | 17 +++++++++++++ templates/sample-app-deployment.yml | 25 +++++++++++++++++++ templates/sample-app-service-account.yml | 11 ++++++++ - values.yaml | 9 +++++++ - 5 files changed, 78 insertions(+) + values.yaml | 8 ++++++ + 5 files changed, 77 insertions(+) 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-deployment.yml @@ -23,7 +23,7 @@ Signed-off-by: Luiz Felipe Kina diff --git a/templates/sample-app-cluster-role-binding.yml b/templates/sample-app-cluster-role-binding.yml new file mode 100644 -index 0000000..cffc2f1 +index 00000000..cffc2f1a --- /dev/null +++ b/templates/sample-app-cluster-role-binding.yml @@ -0,0 +1,16 @@ @@ -32,7 +32,7 @@ index 0000000..cffc2f1 +kind: ClusterRoleBinding +metadata: + labels: -+ app: metric-server-test-app ++ app: metrics-server-test-app + name: access-metrics-api +roleRef: + apiGroup: rbac.authorization.k8s.io @@ -40,12 +40,12 @@ index 0000000..cffc2f1 + name: access-metrics-api +subjects: +- kind: ServiceAccount -+ name: metric-server-test-app ++ name: metrics-server-test-app + namespace: metrics-server +{{- end }} diff --git a/templates/sample-app-cluster-role.yml b/templates/sample-app-cluster-role.yml new file mode 100644 -index 0000000..c78fb28 +index 00000000..c78fb282 --- /dev/null +++ b/templates/sample-app-cluster-role.yml @@ -0,0 +1,17 @@ @@ -54,7 +54,7 @@ index 0000000..c78fb28 +kind: ClusterRole +metadata: + labels: -+ app: metric-server-test-app ++ app: metrics-server-test-app + name: access-metrics-api +rules: +- apiGroups: @@ -69,7 +69,7 @@ index 0000000..c78fb28 \ No newline at end of file diff --git a/templates/sample-app-deployment.yml b/templates/sample-app-deployment.yml new file mode 100644 -index 0000000..26de1cc +index 00000000..26de1cc9 --- /dev/null +++ b/templates/sample-app-deployment.yml @@ -0,0 +1,25 @@ @@ -77,17 +77,17 @@ index 0000000..26de1cc +apiVersion: apps/v1 +kind: Deployment +metadata: -+ name: metric-server-test-app-deployment ++ name: metrics-server-test-app-deployment + namespace: metrics-server +spec: + selector: + matchLabels: -+ app: metric-server-test-app ++ app: metrics-server-test-app + replicas: 1 + template: + metadata: + labels: -+ app: metric-server-test-app ++ app: metrics-server-test-app + spec: + containers: + - name: sample-app @@ -96,11 +96,11 @@ index 0000000..26de1cc + env: + - name: TOKEN_PATH + value: /var/run/secrets/kubernetes.io/serviceaccount/token -+ serviceAccountName: metric-server-test-app ++ serviceAccountName: metrics-server-test-app +{{- end -}} diff --git a/templates/sample-app-service-account.yml b/templates/sample-app-service-account.yml new file mode 100644 -index 0000000..81b0ef6 +index 00000000..81b0ef6a --- /dev/null +++ b/templates/sample-app-service-account.yml @@ -0,0 +1,11 @@ @@ -111,19 +111,18 @@ index 0000000..81b0ef6 +kind: ServiceAccount +metadata: + labels: -+ app: metric-server-test-app -+ name: metric-server-test-app ++ app: metrics-server-test-app ++ name: metrics-server-test-app + namespace: metrics-server +{{- end }} diff --git a/values.yaml b/values.yaml -index fba10aa..b31a5fb 100644 +index 4f6b9219..54567451 100644 --- a/values.yaml +++ b/values.yaml -@@ -180,3 +180,12 @@ topologySpreadConstraints: [] - deploymentAnnotations: {} - +@@ -195,5 +195,13 @@ deploymentAnnotations: {} + schedulerName: "" -+ + +# If you want to deploy a sample app application to test metrics server +# Set the create value to true +sampleApp: @@ -132,5 +131,7 @@ index fba10aa..b31a5fb 100644 + repository: docker.io/starlingx/stx-metrics-server-sample-app + tag: stx.7.0-v1.0.0 + --- -2.25.1 + tmpVolume: + emptyDir: {} +-- +2.34.1 diff --git a/metrics-server-helm/files/0002-Add-label-platform-application-to-pods.patch b/metrics-server-helm/files/0002-Add-label-platform-application-to-pods.patch index 73a29d5..c448797 100644 --- a/metrics-server-helm/files/0002-Add-label-platform-application-to-pods.patch +++ b/metrics-server-helm/files/0002-Add-label-platform-application-to-pods.patch @@ -1,6 +1,6 @@ -From acb714d1a5b52b7246f616858fa2ee5e44f51289 Mon Sep 17 00:00:00 2001 -From: dbarbosa -Date: Wed, 13 Dec 2023 18:39:15 -0300 +From 82a35a0a883f4a0d4f004af08b8b83c0cc5075d1 Mon Sep 17 00:00:00 2001 +From: Erickson Silva de Oliveira +Date: Tue, 13 Feb 2024 09:35:43 -0300 Subject: [PATCH 2/2] Add label platform/application to pods 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 change will also restart the pods if the label in namespace change. + +Signed-off-by: Erickson Silva de Oliveira +Signed-off-by: David Barbosa Bastos --- templates/deployment.yaml | 2 ++ values.yaml | 1 + 2 files changed, 3 insertions(+) diff --git a/templates/deployment.yaml b/templates/deployment.yaml -index 1d656fc..097c55f 100644 +index 48cda7fe..77c1938f 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml -@@ -21,12 +21,14 @@ spec: +@@ -24,12 +24,14 @@ spec: template: metadata: labels: @@ -33,17 +36,16 @@ index 1d656fc..097c55f 100644 {{- end }} spec: diff --git a/values.yaml b/values.yaml -index b31a5fb..e6992c9 100644 +index 54567451..2182c37f 100644 --- a/values.yaml +++ b/values.yaml @@ -45,6 +45,7 @@ apiService: # The PEM encoded CA bundle for TLS verification caBundle: "" - + +isApplicationLabel: false commonLabels: {} podLabels: {} podAnnotations: {} --- +-- 2.34.1 - diff --git a/sample-app/readme.md b/sample-app/readme.md index 2c8f84d..6ab4eaf 100644 --- a/sample-app/readme.md +++ b/sample-app/readme.md @@ -23,14 +23,12 @@ Important files - Dockerfile - Application Dockerfile ## Run application -> Deploy tha sample app using `system helm-override-update --reuse-values ---set atribute=value ` folow the steps below: +> Deploy tha sample app using `system helm-override-update --reuse-values --set atribute=value ` follow the steps below: -- Run `system helm-override-update --reuse-values ---set sampleApp.create=true metrics-server metrics-server metrics-server` -- Run `system application apply metrics-server` to apply the override -- Run `kubectl get pods -n metric-server-test-app` to get the name of the pod -- 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 +- Run `system helm-override-update --reuse-values --set sampleApp.create=true metrics-server metrics-server metrics-server` +- 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 logs -n metrics-server --tail 1 -f` to see the logs and check if the sample application is requesting successfully the metrics server api ## 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/{pod}` - metrics for a specified pod - `/pods` - all pod metrics of all namespaces - - diff --git a/stx-metrics-server-helm/debian/deb_folder/changelog b/stx-metrics-server-helm/debian/deb_folder/changelog index b20c59d..0314a6a 100644 --- a/stx-metrics-server-helm/debian/deb_folder/changelog +++ b/stx-metrics-server-helm/debian/deb_folder/changelog @@ -1,3 +1,9 @@ +stx-metrics-server-helm (1.2-0) unstable; urgency=medium + + * New upstream release. + + -- Erickson Silva de Oliveira Mon, 12 Feb 2024 16:57:00 +0000 + stx-metrics-server-helm (1.1-0) unstable; urgency=medium * New upstream release. diff --git a/stx-metrics-server-helm/debian/deb_folder/copyright b/stx-metrics-server-helm/debian/deb_folder/copyright index fcbc0c4..d0064e1 100644 --- a/stx-metrics-server-helm/debian/deb_folder/copyright +++ b/stx-metrics-server-helm/debian/deb_folder/copyright @@ -4,11 +4,11 @@ Upstream-Contact: StarlingX Developers Source: https://opendev.org/starlingx/metrics-server-armada-app/ Files: * -Copyright: (c) 2017-2023 Wind River Systems, Inc +Copyright: (c) 2017-2024 Wind River Systems, Inc License: Apache-2 Files: debian/* -Copyright: 2021-2023 Wind River Systems, Inc +Copyright: 2021-2024 Wind River Systems, Inc License: Apache-2 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/stx-metrics-server-helm/debian/meta_data.yaml b/stx-metrics-server-helm/debian/meta_data.yaml index 3214d7a..9dd568e 100644 --- a/stx-metrics-server-helm/debian/meta_data.yaml +++ b/stx-metrics-server-helm/debian/meta_data.yaml @@ -1,6 +1,6 @@ --- debname: stx-metrics-server-helm -debver: 1.1-0 +debver: 1.2-0 src_path: stx-metrics-server-helm revision: dist: $STX_DIST diff --git a/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/helmrelease.yaml b/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/helmrelease.yaml index 0928ed9..992f958 100644 --- a/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/helmrelease.yaml +++ b/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/helmrelease.yaml @@ -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 # @@ -14,7 +14,7 @@ spec: chart: spec: chart: metrics-server - version: 3.11.0 + version: 3.12.0 sourceRef: kind: HelmRepository name: stx-platform diff --git a/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/metrics-server-static-overrides.yaml b/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/metrics-server-static-overrides.yaml index 8c19127..7d95a2c 100644 --- a/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/metrics-server-static-overrides.yaml +++ b/stx-metrics-server-helm/stx-metrics-server-helm/fluxcd-manifests/metrics-server/metrics-server-static-overrides.yaml @@ -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 # @@ -9,7 +9,7 @@ args: replicas: 1 image: repository: registry.k8s.io/metrics-server/metrics-server - tag: "v0.6.4" + tag: "v0.7.0" tolerations: - key: "node-role.kubernetes.io/control-plane" operator: "Exists"