From 0f8b576241690cc2512bf705d09b8465dab26e85 Mon Sep 17 00:00:00 2001 From: Romain Pluciennik Date: Sat, 17 Aug 2024 11:51:08 +0200 Subject: [PATCH] feat(moodist): Initial release (#10) --- README.md | 1 + charts/moodist/.helmignore | 23 ++++++ charts/moodist/Chart.lock | 6 ++ charts/moodist/Chart.yaml | 31 ++++++++ charts/moodist/README.md | 106 +++++++++++++++++++++++++ charts/moodist/README_CONFIG.md.gotmpl | 13 +++ charts/moodist/icon.svg | 11 +++ charts/moodist/templates/common.yaml | 104 ++++++++++++++++++++++++ charts/moodist/values.yaml | 97 ++++++++++++++++++++++ 9 files changed, 392 insertions(+) create mode 100644 charts/moodist/.helmignore create mode 100644 charts/moodist/Chart.lock create mode 100644 charts/moodist/Chart.yaml create mode 100644 charts/moodist/README.md create mode 100644 charts/moodist/README_CONFIG.md.gotmpl create mode 100644 charts/moodist/icon.svg create mode 100644 charts/moodist/templates/common.yaml create mode 100644 charts/moodist/values.yaml diff --git a/README.md b/README.md index eafd47e..688433d 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ The code in this repository is provided as-is with no warranties. | Chart | Description | | ----- | ----------- | | [# it-tools it-tools icon](https://github.com/plcnk/charts/tree/master/charts/it-tools/) | Collection of handy online tools for developers, with great UX. | +| [# moodist moodist icon](https://github.com/plcnk/charts/tree/master/charts/moodist/) | Ambient sounds for focus and calm. | ## License diff --git a/charts/moodist/.helmignore b/charts/moodist/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/moodist/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/moodist/Chart.lock b/charts/moodist/Chart.lock new file mode 100644 index 0000000..dd16a7a --- /dev/null +++ b/charts/moodist/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: https://bjw-s.github.io/helm-charts + version: 3.3.2 +digest: sha256:5a0f9f06aa383b7cc3070899b879401bcd4ae48b021d0a2b7f9ba39827019e24 +generated: "2024-08-17T11:26:39.224544+02:00" diff --git a/charts/moodist/Chart.yaml b/charts/moodist/Chart.yaml new file mode 100644 index 0000000..5a29610 --- /dev/null +++ b/charts/moodist/Chart.yaml @@ -0,0 +1,31 @@ +apiVersion: v2 +name: moodist +description: Ambient sounds for focus and calm. +home: https://github.com/plcnk/charts/tree/master/charts/moodist +icon: https://raw.githubusercontent.com/plcnk/charts/master/charts/moodist/icon.svg +type: application +version: 0.1.0 +# renovate datasource=docker depName=ghcr.io/remvze/moodist +appVersion: "v1.5.0" +kubeVersion: ">=1.22.0-0" +keywords: + - ambient + - ambient-sounds + - calm + - white-noise + - focus +dependencies: + - name: common + repository: https://bjw-s.github.io/helm-charts + version: 3.3.2 +sources: + - https://github.com/remvze/moodist +annotations: + artifacthub.io/changes: |- + - kind: added + description: Initial release + artifacthub.io/links: |- + - name: App Source + url: https://github.com/remvze/moodist + - name: Chart Source + url: https://github.com/plcnk/charts/tree/master/charts/moodist diff --git a/charts/moodist/README.md b/charts/moodist/README.md new file mode 100644 index 0000000..a7d0b67 --- /dev/null +++ b/charts/moodist/README.md @@ -0,0 +1,106 @@ +# # moodist + +moodist logo + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) +![AppVersion: v1.5.0](https://img.shields.io/badge/AppVersion-v1.5.0-informational?style=flat) + +Ambient sounds for focus and calm. + +**Homepage:** + +**This chart is not maintained by the upstream project and any issues with the chart should be raised +[here](https://github.com/plcnk/charts/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name=moodist&version=0.1.0)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.22.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| | common | 3.3.2 | + +## Installing the Chart + +To install the chart with the release name `moodist` + +### OCI (Recommended) + +```console +helm install moodist oci://ghcr.io/plcnk/charts/moodist +``` + +### Traditional + +```console +helm repo add plcnk https://charts.plcnk.net +helm repo update +helm install moodist plcnk/moodist +``` + +## Uninstalling the Chart + +To uninstall the `moodist` deployment + +```console +helm uninstall moodist +``` + +The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. + +## Configuration + +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. +Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install moodist \ + --set env.TZ="America/New York" \ + plcnk/moodist +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install moodist plcnk/moodist -f values.yaml +``` + +## Custom configuration + +N/A + +## Values + +**Important**: When deploying an application Helm chart you can add more values from the bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| controllers.main.containers.app.env | object | See [values.yaml](./values.yaml) | Environment variables | +| controllers.main.containers.app.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | +| controllers.main.containers.app.image.repository | string | `"ghcr.io/remvze/moodist"` | Image repository | +| controllers.main.containers.app.image.tag | string | `"v1.5.0"` | Image tag | +| controllers.main.containers.app.securityContext.allowPrivilegeEscalation | bool | `false` | Disable privilege escalations | +| controllers.main.containers.app.securityContext.capabilities | object | `{"drop":["ALL"]}` | Drop all capabilities | +| controllers.main.containers.app.securityContext.readOnlyRootFilesystem | bool | `true` | Mount the container's root filesystem as read-only | +| controllers.main.pod.securityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group | +| controllers.main.pod.securityContext.runAsGroup | int | `65534` | Run as `nobody` group | +| controllers.main.pod.securityContext.runAsNonRoot | bool | `true` | Run container as a non-root user | +| controllers.main.pod.securityContext.runAsUser | int | `65534` | Run as `nobody` user | +| controllers.main.replicas | int | `1` | Number of desired pods | +| controllers.main.resources | object | `{}` | Set the resource requests / limits for the container. | +| controllers.main.type | string | `"deployment"` | Controller type | +| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. | +| persistence | object | See [values.yaml](./values.yaml) | Configure persistence for the chart under this key. | +| service | object | See [values.yaml](./values.yaml) | Configure the services for the chart here. | + +--- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/moodist/README_CONFIG.md.gotmpl b/charts/moodist/README_CONFIG.md.gotmpl new file mode 100644 index 0000000..2a8b9ec --- /dev/null +++ b/charts/moodist/README_CONFIG.md.gotmpl @@ -0,0 +1,13 @@ +{{- define "custom.chart.name" -}} +# {{ .Name }} +{{- end -}} + +{{- define "custom.custom.configuration.header" -}} +## Custom configuration +{{- end -}} + +{{- define "custom.custom.configuration" -}} +{{ template "custom.custom.configuration.header" . }} + +N/A +{{- end -}} diff --git a/charts/moodist/icon.svg b/charts/moodist/icon.svg new file mode 100644 index 0000000..fedcc84 --- /dev/null +++ b/charts/moodist/icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/charts/moodist/templates/common.yaml b/charts/moodist/templates/common.yaml new file mode 100644 index 0000000..73d4ac2 --- /dev/null +++ b/charts/moodist/templates/common.yaml @@ -0,0 +1,104 @@ +{{/* Append the hardcoded settings */}} +{{- define "moodist.harcodedValues" -}} +configMaps: + nginx-conf: + enabled: true + data: + nginx.conf: | + worker_processes 1; + + error_log /tmp/nginx/error.log warn; + pid /tmp/nginx/nginx.pid; + + events { + worker_connections 1024; + } + + http { + server { + listen 8080; + server_name _; + + root /usr/share/nginx/html; + index index.html index.htm; + include /etc/nginx/mime.types; + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + error_page 404 /404.html; + location = /404.html { + root /usr/share/nginx/html; + internal; + } + + location / { + try_files $uri $uri/index.html =404; + } + } + } + +persistence: + cache: + enabled: true + type: emptyDir + advancedMounts: + main: + app: + - path: /var/cache/nginx + tmp: + enabled: true + type: emptyDir + advancedMounts: + main: + app: + - path: /tmp/nginx + nginx-conf: + enabled: true + type: configMap + name: {{ include "bjw-s.common.lib.chart.names.fullname" . }}-nginx-conf + advancedMounts: + main: + app: + - path: /etc/nginx/nginx.conf + subPath: nginx.conf + +controllers: + main: + containers: + app: + ports: + - containerPort: 8080 + name: http + protocol: TCP + probes: + liveness: + enabled: true + custom: true + spec: + httpGet: + path: / + port: http + periodSeconds: 30 + timeoutSeconds: 30 + readiness: + enabled: true + custom: true + spec: + httpGet: + path: / + port: http + periodSeconds: 30 + timeoutSeconds: 30 +{{- end -}} + +{{- $tmplVars := deepCopy . -}} +{{ include "bjw-s.common.loader.init" $tmplVars }} +{{- $defaultValues := include "moodist.harcodedValues" $tmplVars | fromYaml -}} +{{- $_ := mustMerge .Values $defaultValues -}} + +{{/* Render the templates */}} +{{ include "bjw-s.common.loader.init" . }} +{{ include "bjw-s.common.loader.generate" . }} diff --git a/charts/moodist/values.yaml b/charts/moodist/values.yaml new file mode 100644 index 0000000..ea0346f --- /dev/null +++ b/charts/moodist/values.yaml @@ -0,0 +1,97 @@ +--- +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml +# + +controllers: + main: + # -- Controller type + type: deployment + # -- Number of desired pods + replicas: 1 + containers: + app: + image: + # -- Image repository + repository: ghcr.io/remvze/moodist + # -- Image pull policy + pullPolicy: IfNotPresent + # -- Image tag + tag: v1.5.0 + + # -- Environment variables + # @default -- See [values.yaml](./values.yaml) + env: {} + # TZ: UTC + + securityContext: + # -- Mount the container's root filesystem as read-only + readOnlyRootFilesystem: true + # -- Disable privilege escalations + allowPrivilegeEscalation: false + # -- Drop all capabilities + capabilities: + drop: + - ALL + + pod: + securityContext: + # -- Run container as a non-root user + runAsNonRoot: true + # -- Run as `nobody` user + runAsUser: 65534 + # -- Run as `nobody` group + runAsGroup: 65534 + # -- Volume binds will be granted to `nobody` group + fsGroup: 65534 + + # -- Set the resource requests / limits for the container. + resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +# -- Configure the services for the chart here. +# @default -- See [values.yaml](./values.yaml) +service: + main: + controller: main + ports: + http: + port: 8080 + +# -- Configure persistence for the chart under this key. +# @default -- See [values.yaml](./values.yaml) +persistence: + data: + enabled: false + retain: true + # storageClass: "" + # accessMode: ReadWriteOnce + # size: 1Gi + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See [values.yaml](./values.yaml) + main: + enabled: false + # className: "" + # annotations: {} + # hosts: + # - host: &host-main "chart-example.local" + # paths: + # - path: / + # pathType: Prefix + # service: + # identifier: main + # port: http + # tls: + # - secretName: chart-example-tls + # hosts: + # - *host-main