diff --git a/README.md b/README.md index f5efb0b81..1e754ae66 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ Also available on [ArtifactHub](https://artifacthub.io/packages/search?repo=gabe | [Healthchecks healthchecks icon](charts/healthchecks/) | A cron monitoring tool written in Python & Django | | [Home Assistant home-assistant icon](charts/home-assistant/) | Open source home automation that puts local control and privacy first. | | [Homer homer icon](charts/homer/) | A dead simple static HOMepage for your servER to keep your services on hand, from a simple yaml configuration file. | +| [KeyDB keydb icon](charts/keydb/) | A Multithreaded Fork of Redis | | [Limo ](charts/limo/) | A file upload server. | | [Matrimony matrimony icon](charts/matrimony/) | Self-hosted wedding site configured via YAML | | [Memos memos icon](charts/memos/) | A lightweight, self-hosted memo hub. Open Source and Free forever. | diff --git a/charts/keydb/.helmignore b/charts/keydb/.helmignore new file mode 100644 index 000000000..f2409818d --- /dev/null +++ b/charts/keydb/.helmignore @@ -0,0 +1,26 @@ +# 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/ +# helm-docs templates +*.gotmpl +icon.svg diff --git a/charts/keydb/Chart.lock b/charts/keydb/Chart.lock new file mode 100644 index 000000000..25b33c3a1 --- /dev/null +++ b/charts/keydb/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: https://bjw-s.github.io/helm-charts + version: 3.0.4 +digest: sha256:78897d8e0906d20d125abf971d035d68a19f31ed028eefe244a6d04eef8c76ad +generated: "2024-03-27T00:09:53.95755-05:00" diff --git a/charts/keydb/Chart.yaml b/charts/keydb/Chart.yaml new file mode 100644 index 000000000..159531612 --- /dev/null +++ b/charts/keydb/Chart.yaml @@ -0,0 +1,30 @@ +apiVersion: v2 +name: keydb +description: A Multithreaded Fork of Redis +home: https://charts.gabe565.com/charts/keydb/ +icon: https://raw.githubusercontent.com/gabe565/charts/main/charts/keydb/icon.svg +type: application +version: 0.0.1 +# renovate datasource=docker depName=eqalpha/keydb +appVersion: alpine_x86_64_v6.3.4 +kubeVersion: ">=1.22.0-0" +keywords: + - key-value + - cache + - message-broker + - database +dependencies: + - name: common + repository: https://bjw-s.github.io/helm-charts + version: 3.0.4 +sources: + - https://github.com/Snapchat/KeyDB +annotations: + artifacthub.io/changes: |- + - kind: added + description: Initial release + artifacthub.io/links: |- + - name: App Source + url: https://github.com/Snapchat/KeyDB + - name: Chart Source + url: https://github.com/gabe565/charts/tree/main/charts/keydb diff --git a/charts/keydb/README.md b/charts/keydb/README.md new file mode 100644 index 000000000..2d896d1f6 --- /dev/null +++ b/charts/keydb/README.md @@ -0,0 +1,110 @@ +# KeyDB + +keydb logo + +![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) +![AppVersion: alpine_x86_64_v6.3.4](https://img.shields.io/badge/AppVersion-alpine_x86_64_v6.3.4-informational?style=flat) + +A Multithreaded Fork of Redis + +**Homepage:** + +**This chart is not maintained by the upstream project and any issues with the chart should be raised +[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=keydb&version=0.0.1)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.22.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| | common | 3.0.4 | + +## Installing the Chart + +To install the chart with the release name `keydb` + +### OCI (Recommended) + +```console +helm install keydb oci://ghcr.io/gabe565/charts/keydb +``` + +### Traditional + +```console +helm repo add gabe565 https://charts.gabe565.com +helm repo update +helm install keydb gabe565/keydb +``` + +## Uninstalling the Chart + +To uninstall the `keydb` deployment + +```console +helm uninstall keydb +``` + +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 keydb \ + --set env.TZ="America/New York" \ + gabe565/keydb +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install keydb gabe565/keydb -f values.yaml +``` + +## Custom configuration + +### Authentication +Authentication can be enabled by setting the `KEYDB_PASSWORD` environment variable. + +Example: +```yaml +controllers: + keydb: + containers: + app: + env: + KEYDB_PASSWORD: changeme +``` + +## 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.keydb.containers.app.env | object | See [values.yaml](./values.yaml) | Environment variables. | +| controllers.keydb.containers.app.env.TZ | string | `"UTC"` | Set the container timezone | +| controllers.keydb.containers.app.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | +| controllers.keydb.containers.app.image.repository | string | `"eqalpha/keydb"` | Image repository | +| controllers.keydb.containers.app.image.tag | string | `"alpine_x86_64_v6.3.4"` | Image tag | +| controllers.keydb.containers.app.securityContext | object | `{"readOnlyRootFilesystem":true}` | KeyDB container security context | +| controllers.keydb.pod | object | `{"securityContext":{"fsGroup":999,"runAsNonRoot":true,"runAsUser":999}}` | Pod security context | +| controllers.keydb.statefulset.volumeClaimTemplates | list | `[]` | Used to create individual disks for each instance. | +| controllers.keydb.type | string | `"statefulset"` | Controller type | +| persistence | object | See [values.yaml](./values.yaml) | Configure persistence for the chart under this key. | + +--- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/keydb/README_CONFIG.md.gotmpl b/charts/keydb/README_CONFIG.md.gotmpl new file mode 100644 index 000000000..c3afa87f2 --- /dev/null +++ b/charts/keydb/README_CONFIG.md.gotmpl @@ -0,0 +1,24 @@ +{{- define "custom.chart.name" -}} +KeyDB +{{- end -}} + +{{- define "custom.custom.configuration.header" -}} +## Custom configuration +{{- end -}} + +{{- define "custom.custom.configuration" -}} +{{ template "custom.custom.configuration.header" . }} + +### Authentication +Authentication can be enabled by setting the `KEYDB_PASSWORD` environment variable. + +Example: +```yaml +controllers: + keydb: + containers: + app: + env: + KEYDB_PASSWORD: changeme +``` +{{- end -}} diff --git a/charts/keydb/icon.svg b/charts/keydb/icon.svg new file mode 100644 index 000000000..3a9036d38 --- /dev/null +++ b/charts/keydb/icon.svg @@ -0,0 +1 @@ + diff --git a/charts/keydb/templates/common.yaml b/charts/keydb/templates/common.yaml new file mode 100644 index 000000000..a0a6b9052 --- /dev/null +++ b/charts/keydb/templates/common.yaml @@ -0,0 +1,73 @@ +{{/* Append the hardcoded settings */}} +{{- define "keydb.harcodedValues" -}} +controllers: + keydb: + containers: + app: + probes: + startup: + enabled: true + custom: true + spec: + exec: + command: [/health/probe_readiness.sh] + periodSeconds: 5 + failureThreshold: 30 + timeoutSeconds: 2 + liveness: + enabled: true + custom: true + spec: + exec: + command: [/health/probe_liveness.sh] + periodSeconds: 10 + failureThreshold: 5 + timeoutSeconds: 2 + readiness: + enabled: true + custom: true + spec: + exec: + command: [/health/probe_readiness.sh] + periodSeconds: 10 + failureThreshold: 5 + timeoutSeconds: 2 + +persistence: + health: + enabled: true + type: configMap + name: {{ include "bjw-s.common.lib.chart.names.name" . }}-health + defaultMode: 0755 + +configMaps: + health: + enabled: true + data: + probe_liveness.sh: | + #!/bin/sh + [[ -n "$KEYDB_PASSWORD" ]] && export REDISCLI_AUTH="$KEYDB_PASSWORD" + response=$(redis-cli -h localhost ping) + responseFirstWord="$(echo "$response" | head -n1 | cut -d' ' -f1)" + if [[ "$response" != PONG ]] && [[ "$responseFirstWord" != LOADING ]] && [[ "$responseFirstWord" != MASTERDOWN ]]; then + echo "$response" + exit 1 + fi + probe_readiness.sh: | + #!/bin/sh + [[ -n "$KEYDB_PASSWORD" ]] && export REDISCLI_AUTH="$KEYDB_PASSWORD" + response=$(redis-cli -h localhost ping) + if [[ "$response" != PONG ]]; then + echo "$response" + exit 1 + fi +{{- end -}} + +{{- $tmplVars := deepCopy . -}} +{{ include "bjw-s.common.loader.init" $tmplVars }} +{{- $defaultValues := include "keydb.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/keydb/values.yaml b/charts/keydb/values.yaml new file mode 100644 index 000000000..de6e4c59c --- /dev/null +++ b/charts/keydb/values.yaml @@ -0,0 +1,67 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.0.4/charts/library/common/values.schema.json +# +# 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: + keydb: + # -- Controller type + type: statefulset + containers: + app: + image: + # -- Image repository + repository: eqalpha/keydb + # -- Image pull policy + pullPolicy: IfNotPresent + # -- Image tag + tag: alpine_x86_64_v6.3.4 + + # -- Environment variables. + # @default -- See [values.yaml](./values.yaml) + env: + # -- Set the container timezone + TZ: UTC + # KEYDB_PASSWORD: + + # -- KeyDB container security context + securityContext: + readOnlyRootFilesystem: true + + # -- Pod security context + pod: + securityContext: + runAsNonRoot: true + runAsUser: 999 + fsGroup: 999 + + statefulset: + # -- Used to create individual disks for each instance. + volumeClaimTemplates: [] + # - name: data + # globalMounts: + # - path: /data + # storageClass: "" + # accessMode: ReadWriteOnce + # size: 4Gi + +# @ignored +service: + keydb: + controller: keydb + ports: + keydb: + port: 6379 + +# -- Configure persistence for the chart under this key. +# @default -- See [values.yaml](./values.yaml) +persistence: + data: + enabled: false + retain: true + # storageClass: "" + # accessMode: ReadWriteOnce + # size: 4Gi