From 4f5c84155c7879ade19ff0a6936b181107acc373 Mon Sep 17 00:00:00 2001 From: Bharat Kunwar Date: Thu, 28 Dec 2023 08:32:36 +0000 Subject: [PATCH] fix: Regression with secrets fullname (#127) * fix: Secrets fullname and add CI test for secrets * fix: Release workflow badge URL --- README.md | 20 ++++++++++---------- charts/unleash/Chart.yaml | 2 +- charts/unleash/ci/unleash-values.yaml | 3 +++ charts/unleash/templates/deployment.yaml | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 402d39a..1e42772 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ # Unleash Kubernetes Helm Chart -[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Release Charts](https://github.com/unleash/helm-charts/workflows/release-chart/badge.svg?branch=main) +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) +[![Release](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml) ## Usage [Helm](https://helm.sh) must be installed to use the charts. Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. -Once Helm is set up properly, add the repo as follows: +Once Helm is set up properly, add the repository as follows: ```console helm repo add unleash https://docs.getunleash.io/helm-charts @@ -22,8 +23,7 @@ You can then run `helm search repo unleash` to see the charts. ## Kubernetes support strategy -We'll build this repo on all k8s versions that have not reached End of Life according to the [Kubernetes support period](https://kubernetes.io/releases/patch-releases/#support-period). - +We'll build this repository on all k8s versions that have not reached End of Life according to the [Kubernetes support period](https://kubernetes.io/releases/patch-releases/#support-period). ## Contributing @@ -41,26 +41,26 @@ We'd love to have you contribute! Please refer to our [contribution guidelines]( ## Helm charts build status -![Release Charts](https://github.com/unleash/helm-charts/workflows/release-chart/badge.svg?branch=main) +[![Release](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml) ## Releasing the charts To release new versions of the charts, you must update the chart version in the Chart.yaml file and then merge these modifications into the main branch. Following this, the workflow will detect these changes and automatically release a new version of the modified Helm chart. -## Helm repo +## Helm repository -This repository employs a process that converts it into a Helm repository, specifically using the Helm Chart Releaser Action version 1.5.0. It leverages GitHub Pages for hosting the artifacts. Furthermore, the Unleash documentation on Helm charts (found at https://docs.getunleash.io/helm-charts) utilizes a CNAME to direct to the GitHub Pages. +This repository employs a process that converts it into a Helm repository, specifically using the Helm Chart Releaser Action version 1.5.0. It leverages GitHub Pages for hosting the artifacts. Furthermore, the [Unleash documentation on Helm charts](https://docs.getunleash.io/helm-charts) utilizes a CNAME to direct to the GitHub Pages. The specific workflow is outlined in the file located at .github/workflows/release.yml. This workflow activates whenever there's an update to the chart version, which consequently prompts an update to the repository with the new chart version. ## Testing the helm chart locally -To test the helm chart locally, first you should set up a local k8s environment. An easy way to do this is to set up kind, you can see instructions for setting it up [here](https://github.com/bricks-software/unleash-infra-docs/blob/main/commands/k8s.md). +To test the helm chart locally, first you should set up a local k8s environment. An easy way to do this is to set up kind, you can see instructions for setting it up [here](https://github.com/bricks-software/unleash-infra-docs/blob/main/commands/k8s.md). Once you have your local k8s environment set up, you can run the following command to install the helm chart locally: -``` +```bash helm install --debug --generate-name . # this will install the chart using the local files provided you are in the folder that contains the chart # To see the output of the helm chart without running it locally, you can run the following command: helm install --debug --dry-run --generate-name . -``` \ No newline at end of file +``` diff --git a/charts/unleash/Chart.yaml b/charts/unleash/Chart.yaml index 58ba6ae..9b913e5 100644 --- a/charts/unleash/Chart.yaml +++ b/charts/unleash/Chart.yaml @@ -15,4 +15,4 @@ sources: - https://github.com/Unleash/unleash - https://github.com/Unleash/helm-charts type: application -version: 3.1.1 +version: 3.1.2 diff --git a/charts/unleash/ci/unleash-values.yaml b/charts/unleash/ci/unleash-values.yaml index dc9298f..232f936 100644 --- a/charts/unleash/ci/unleash-values.yaml +++ b/charts/unleash/ci/unleash-values.yaml @@ -5,3 +5,6 @@ autoscaling: enabled: true minReplicas: 1 maxReplicas: 4 + +secrets: + TEST_KEY: TEST_VALUE diff --git a/charts/unleash/templates/deployment.yaml b/charts/unleash/templates/deployment.yaml index af3a58f..850c117 100644 --- a/charts/unleash/templates/deployment.yaml +++ b/charts/unleash/templates/deployment.yaml @@ -64,7 +64,7 @@ spec: - name: {{ $key }} valueFrom: secretKeyRef: - name: {{ include "unleash.fullname" . }} + name: {{ include "unleash.fullname" $ }} key: {{ $key }} {{- end }} {{- end }}