From cb66bd27d03d037df529594ed5cdefdbf28150ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Fri, 20 Nov 2020 13:32:51 +0100 Subject: [PATCH] Helm Chart: Fix chart-testing, upgrade ingress to networking.k8s.io/v1beta1, set metrics-provider=none if metrics scraper is not enabled. (#5691) * Helm Chart: set metrics-provider=none if metrics scraper is not enabled. * Helm CI: fix chart-testing-action configuration. * Helm Chart: Switch Ingress from extensions/v1beta1 to networking.k8s.io/v1beta1. Requires kubernetes >= 1.14.0. --- .github/workflows/ci-helm-workflow.yml | 29 ++++++++++--------- .../kubernetes-dashboard/Chart.yaml | 4 +-- .../helm-chart/kubernetes-dashboard/README.md | 6 +++- .../templates/deployment.yaml | 2 ++ .../templates/ingress.yaml | 2 +- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci-helm-workflow.yml b/.github/workflows/ci-helm-workflow.yml index 86a47370f..5b3c439ff 100644 --- a/.github/workflows/ci-helm-workflow.yml +++ b/.github/workflows/ci-helm-workflow.yml @@ -33,25 +33,28 @@ jobs: with: fetch-depth: "0" - - name: Run chart-testing (lint) - id: lint - uses: helm/chart-testing-action@v2.0.1 - with: - command: lint - config: aio/deploy/helm-chart/.helm-chart-testing.yaml - - name: Validate schema uses: desaintmartin/helm-kubeval-action@v1.0.2 with: path: aio/deploy/helm-chart + - uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.0.1 + + - name: Cleanup charts directory + id: cleanup + run: sudo rm -rf aio/deploy/helm-chart/kubernetes-dashboard/charts + + - name: Run chart-testing (lint) + id: lint + run: ct lint --config=aio/deploy/helm-chart/.helm-chart-testing.yaml + - name: Create kind cluster uses: helm/kind-action@v1.1.0 - # Only build a kind cluster if there are chart changes to test. - if: steps.lint.outputs.changed == 'true' - name: Run chart-testing (install) - uses: helm/chart-testing-action@v2.0.1 - with: - command: install - config: aio/deploy/helm-chart/.helm-chart-testing.yaml + run: ct install --config=aio/deploy/helm-chart/.helm-chart-testing.yaml diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml b/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml index da7fdba78..99d3116ca 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml +++ b/aio/deploy/helm-chart/kubernetes-dashboard/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 name: kubernetes-dashboard -version: 2.8.3 +version: 3.0.0 appVersion: 2.0.4 description: General-purpose web UI for Kubernetes clusters keywords: @@ -27,4 +27,4 @@ maintainers: - name: desaintmartin email: cdesaintmartin@wiremind.fr icon: https://raw.githubusercontent.com/kubernetes/kubernetes/master/logo/logo.svg -kubeVersion: ">=1.10.0-0" +kubeVersion: ">=1.14.0-0" diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/README.md b/aio/deploy/helm-chart/kubernetes-dashboard/README.md index fd66cc5d2..6f00bbd9f 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/README.md +++ b/aio/deploy/helm-chart/kubernetes-dashboard/README.md @@ -22,7 +22,7 @@ To install the [Chart](https://helm.sh/docs/intro/using_helm/#three-big-concepts ```console helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/ -helm install kubernetes-dashboard/kubernetes-dashboard --name my-release +helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard ``` The command deploys kubernetes-dashboard on the Kubernetes cluster in the default configuration. @@ -43,6 +43,10 @@ The command removes all the Kubernetes components associated with the chart and A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. +### Upgrade from 2.x.x to 3.x.x + +- Switch Ingress from extensions/v1beta1 to networking.k8s.io/v1beta1. Requires kubernetes >= 1.14.0. + ### Upgrade from 1.x.x to 2.x.x Version 2.0.0 of this chart is the first version hosted in the kubernetes/dashboard.git repository. v1.x.x until 1.10.1 is hosted on https://github.com/helm/charts. diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml b/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml index 3d8be99e4..b19e1dee1 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml +++ b/aio/deploy/helm-chart/kubernetes-dashboard/templates/deployment.yaml @@ -66,6 +66,8 @@ spec: {{- end }} {{- if .Values.metricsScraper.enabled }} - --sidecar-host=http://127.0.0.1:8000 +{{- else }} + - --metrics-provider=none {{- end }} {{- with .Values.extraArgs }} {{ toYaml . | indent 10 }} diff --git a/aio/deploy/helm-chart/kubernetes-dashboard/templates/ingress.yaml b/aio/deploy/helm-chart/kubernetes-dashboard/templates/ingress.yaml index a183cf378..7a2f2634c 100644 --- a/aio/deploy/helm-chart/kubernetes-dashboard/templates/ingress.yaml +++ b/aio/deploy/helm-chart/kubernetes-dashboard/templates/ingress.yaml @@ -16,7 +16,7 @@ {{- $serviceName := include "kubernetes-dashboard.fullname" . -}} {{- $servicePort := .Values.service.externalPort -}} {{- $paths := .Values.ingress.paths -}} -apiVersion: extensions/v1beta1 +apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ template "kubernetes-dashboard.fullname" . }} -- GitLab