From ad76ec968d96cf0d91af601634fa4628dcfe9929 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Thu, 23 Dec 2021 18:05:01 +0000 Subject: [PATCH] Add chart --- .github/workflows/release-chart.yaml | 32 +++++++++++++++++++++ README.md | 3 ++ charts/ohayodash/Chart.yaml | 20 +++++++++++++ charts/ohayodash/ci/ct-values.yaml | 8 ++++++ charts/ohayodash/templates/NOTES.txt | 1 + charts/ohayodash/templates/common.yaml | 1 + charts/ohayodash/templates/rbac.yaml | 25 ++++++++++++++++ charts/ohayodash/values.yaml | 40 ++++++++++++++++++++++++++ 8 files changed, 130 insertions(+) create mode 100644 .github/workflows/release-chart.yaml create mode 100644 README.md create mode 100644 charts/ohayodash/Chart.yaml create mode 100644 charts/ohayodash/ci/ct-values.yaml create mode 100644 charts/ohayodash/templates/NOTES.txt create mode 100644 charts/ohayodash/templates/common.yaml create mode 100644 charts/ohayodash/templates/rbac.yaml create mode 100644 charts/ohayodash/values.yaml diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml new file mode 100644 index 0000000..f80731c --- /dev/null +++ b/.github/workflows/release-chart.yaml @@ -0,0 +1,32 @@ +name: release chart + +"on": + push: + branches: + - main + paths: + - "charts/ohayodash/**" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + 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: "ohayodash-helm-chart-{{ .Version }}" diff --git a/README.md b/README.md new file mode 100644 index 0000000..32fdd09 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Ohayo Dash + +Ohayo Dash is a Kubernetes driven start page and dashboard. All configuration is done by standard Kubernetes objects and ConfigMaps. \ No newline at end of file diff --git a/charts/ohayodash/Chart.yaml b/charts/ohayodash/Chart.yaml new file mode 100644 index 0000000..8f281c4 --- /dev/null +++ b/charts/ohayodash/Chart.yaml @@ -0,0 +1,20 @@ +apiVersion: v2 +appVersion: 0.0.1 +description: Ohayo Dash is a Kubernetes driven start page and dashboard. All configuration is done by standard Kubernetes objects and ConfigMaps. +name: hajimari +version: 0.0.1 +kubeVersion: ">=1.16.0-0" +keywords: +- ohayodash +- startpage +- dashboard +home: https://github.com/nikdoof/ohayodash/tree/main/charts/hajimari +sources: +- https://github.com/nikdoof/ohayodash +maintainers: +- name: nikdoof + email: nikdoof@users.noreply.github.com +dependencies: +- name: common + repository: https://library-charts.k8s-at-home.com + version: 4.0.0 \ No newline at end of file diff --git a/charts/ohayodash/ci/ct-values.yaml b/charts/ohayodash/ci/ct-values.yaml new file mode 100644 index 0000000..21c184d --- /dev/null +++ b/charts/ohayodash/ci/ct-values.yaml @@ -0,0 +1,8 @@ +ingress: + main: + enabled: true + hosts: + - host: ohayodash.domain.tld + paths: + - path: / + pathType: Prefix diff --git a/charts/ohayodash/templates/NOTES.txt b/charts/ohayodash/templates/NOTES.txt new file mode 100644 index 0000000..f169dbe --- /dev/null +++ b/charts/ohayodash/templates/NOTES.txt @@ -0,0 +1 @@ +{{ include "common.notes.defaultNotes" . }} \ No newline at end of file diff --git a/charts/ohayodash/templates/common.yaml b/charts/ohayodash/templates/common.yaml new file mode 100644 index 0000000..0964ad2 --- /dev/null +++ b/charts/ohayodash/templates/common.yaml @@ -0,0 +1 @@ +{{ include "common.all" . }} \ No newline at end of file diff --git a/charts/ohayodash/templates/rbac.yaml b/charts/ohayodash/templates/rbac.yaml new file mode 100644 index 0000000..108fbae --- /dev/null +++ b/charts/ohayodash/templates/rbac.yaml @@ -0,0 +1,25 @@ +{{- if .Values.serviceAccount.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: {{ include "common.names.fullname" . }} + labels: {{- include "common.labels" . | nindent 4 }} +rules: +- apiGroups: ["", "extensions", "networking.k8s.io"] + resources: ["ingresses", "namespaces"] + verbs: ["get", "list"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ include "common.names.fullname" . }} + labels: {{- include "common.labels" . | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ include "common.names.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ include "common.names.fullname" . }} + namespace: {{ .Release.Namespace }} +{{- end }} \ No newline at end of file diff --git a/charts/ohayodash/values.yaml b/charts/ohayodash/values.yaml new file mode 100644 index 0000000..f770892 --- /dev/null +++ b/charts/ohayodash/values.yaml @@ -0,0 +1,40 @@ +# +# 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/ohayodash + # -- image pull policy + pullPolicy: IfNotPresent + # -- image tag + tag: latest + +# -- environment variables. +# @default -- See below +env: + # -- Set the container timezone + TZ: UTC + +# -- Configures service settings for the chart. +# @default -- See values.yaml +service: + main: + ports: + http: + port: 80 + +# -- Configures service account needed for reading k8s ingress objects +# @default -- See below +serviceAccount: + # -- Create service account + create: true + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See values.yaml + main: + enabled: false