From 5f105ce3f59085b8a366ac1004bc8b051ef4065d Mon Sep 17 00:00:00 2001 From: Denan Musinovic Date: Mon, 2 Sep 2024 11:27:17 +0200 Subject: [PATCH] update chart and add release actions Update helm chart --- .github/workflows/release_charts.yml | 26 +++++++++++++++++++++ charts/bright-cli/Chart.yaml | 14 +++++++---- charts/bright-cli/templates/deployment.yaml | 2 +- 3 files changed, 37 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release_charts.yml diff --git a/.github/workflows/release_charts.yml b/.github/workflows/release_charts.yml new file mode 100644 index 00000000..7f8e41ad --- /dev/null +++ b/.github/workflows/release_charts.yml @@ -0,0 +1,26 @@ +name: Release Charts + +on: + push: + branches: + - IR-545/add_bright-cli_helm_chart + +jobs: + packages: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Git + run: | + git config --global user.email "devops@brightsec.com" + git config --global user.name "Bright Security" + + - name: Release packages main + uses: helm/chart-releaser-action@v1.6.0 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + CR_SKIP_EXISTING: true diff --git a/charts/bright-cli/Chart.yaml b/charts/bright-cli/Chart.yaml index fa4145c3..0ebbb6dc 100644 --- a/charts/bright-cli/Chart.yaml +++ b/charts/bright-cli/Chart.yaml @@ -3,13 +3,19 @@ name: repeater description: | Repeater allows you to run Brightsec scans without exposing your ports outside. Also, it can be useful, if you want to run a local scan without deploying. + + #Add helm repository command: + helm repo add bright-cli https://neuralegion.github.io/bright-cli/ - Usage example from chart root dir: - helm upgrade repeater --install \ + #Update helm repository: + helm repo update + + #Install helm chart: + helm upgrade bright-cli --install bright-cli/repeater \ --set repeaterID= \ --set token= \ - --set cluster=hotel.playground.neuralegion.com . --wait + Default cluster being used is "app.brightsec.com". For different cluster you can use additional --cluster "cluster_name" flag. type: application -version: 0.0.1 +version: 0.0.2 keywords: - repeater diff --git a/charts/bright-cli/templates/deployment.yaml b/charts/bright-cli/templates/deployment.yaml index 07a11044..0d5e71fa 100644 --- a/charts/bright-cli/templates/deployment.yaml +++ b/charts/bright-cli/templates/deployment.yaml @@ -35,4 +35,4 @@ spec: - name: TOKEN value: "{{ .Values.token }}" - name: CLUSTER - value: "{{ .Values.cluster }}" + value: "{{ .Values.cluster | default "app.brightsec.com" }}"