From e8e41bbfef9bb68e9675ca9e0febed4bb10fee4b Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 9 Jun 2022 10:11:17 +0100 Subject: [PATCH] Add helm chart --- .github/workflows/release-chart.yaml | 32 +++++++++++++++++++++++++ charts/smsbot/Chart.lock | 6 +++++ charts/smsbot/Chart.yaml | 18 ++++++++++++++ charts/smsbot/ci/ct-values.yaml | 10 ++++++++ charts/smsbot/templates/NOTES.txt | 1 + charts/smsbot/templates/common.yaml | 1 + charts/smsbot/values.yaml | 35 ++++++++++++++++++++++++++++ 7 files changed, 103 insertions(+) create mode 100644 .github/workflows/release-chart.yaml create mode 100644 charts/smsbot/Chart.lock create mode 100644 charts/smsbot/Chart.yaml create mode 100644 charts/smsbot/ci/ct-values.yaml create mode 100644 charts/smsbot/templates/NOTES.txt create mode 100644 charts/smsbot/templates/common.yaml create mode 100644 charts/smsbot/values.yaml diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml new file mode 100644 index 0000000..9547ea2 --- /dev/null +++ b/.github/workflows/release-chart.yaml @@ -0,0 +1,32 @@ +name: Release Helm Chart + +"on": + push: + branches: + - main + paths: + - "charts/**/Chart.yaml" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + - name: Install Helm + uses: azure/setup-helm@v1 + with: + version: v3.6.3 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.2.1 + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + CR_RELEASE_NAME_TEMPLATE: "smsbot-helm-chart-{{ .Version }}" diff --git a/charts/smsbot/Chart.lock b/charts/smsbot/Chart.lock new file mode 100644 index 0000000..a5579f3 --- /dev/null +++ b/charts/smsbot/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: https://library-charts.k8s-at-home.com + version: 4.0.0 +digest: sha256:0c6cd85b0c4a451d01fcbbe16ae1d969d2cf323e053944d6c543113b6a281f88 +generated: "2021-12-23T18:33:24.377986Z" diff --git a/charts/smsbot/Chart.yaml b/charts/smsbot/Chart.yaml new file mode 100644 index 0000000..9943d22 --- /dev/null +++ b/charts/smsbot/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v2 +appVersion: 0.0.2 +description: A simple Telegram bot to receive SMS messages. +name: smsbot +version: 0.0.2 +kubeVersion: ">=1.19.0-0" +keywords: +- smsbot +home: https://github.com/nikdoof/smsbot/tree/main/charts/smsbot +sources: +- https://github.com/nikdoof/smsbot +maintainers: +- name: nikdoof + email: nikdoof@users.noreply.github.com +dependencies: +- name: common + repository: https://library-charts.k8s-at-home.com + version: 4.3.0 \ No newline at end of file diff --git a/charts/smsbot/ci/ct-values.yaml b/charts/smsbot/ci/ct-values.yaml new file mode 100644 index 0000000..14fa1eb --- /dev/null +++ b/charts/smsbot/ci/ct-values.yaml @@ -0,0 +1,10 @@ +env: + SMSBOT_TELEGRAM_BOT_TOKEN: xxxx +ingress: + main: + enabled: true + hosts: + - host: smsbot.domain.tld + paths: + - path: / + pathType: Prefix diff --git a/charts/smsbot/templates/NOTES.txt b/charts/smsbot/templates/NOTES.txt new file mode 100644 index 0000000..f169dbe --- /dev/null +++ b/charts/smsbot/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "common.notes.defaultNotes" . }} \ No newline at end of file diff --git a/charts/smsbot/templates/common.yaml b/charts/smsbot/templates/common.yaml new file mode 100644 index 0000000..0964ad2 --- /dev/null +++ b/charts/smsbot/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} \ No newline at end of file diff --git a/charts/smsbot/values.yaml b/charts/smsbot/values.yaml new file mode 100644 index 0000000..7601c53 --- /dev/null +++ b/charts/smsbot/values.yaml @@ -0,0 +1,35 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from the k8s@home library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml +# + +image: + # -- image repository + repository: ghcr.io/nikdoof/smsbot + # -- image pull policy + pullPolicy: IfNotPresent + # -- image tag + tag: 0.0.2 + +# -- environment variables. +# @default -- See below +env: + # -- Set the container timezone + TZ: UTC + # SMSBOT_TELEGRAM_BOT_TOKEN: + +# -- Configures service settings for the chart. +# @default -- See values.yaml +service: + main: + ports: + http: + port: 80 + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See values.yaml + main: + enabled: false