Skip to content

Commit

Permalink
feat: szurubooru initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
toboshii committed Aug 30, 2021
1 parent 5944324 commit b741b40
Show file tree
Hide file tree
Showing 8 changed files with 423 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Chart dependencies
charts/*/charts
charts/*/Chart.lock
charts/*/local.yaml
26 changes: 26 additions & 0 deletions charts/szurubooru/.helmignore
Original file line number Diff line number Diff line change
@@ -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
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
26 changes: 26 additions & 0 deletions charts/szurubooru/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: v2
appVersion: v2.5.0
description: |
Szurubooru is an image board engine inspired by services such as Danbooru, Gelbooru and Moebooru
dedicated for small and medium communities.
name: szurubooru
version: 1.0.0
kubeVersion: ">=1.16.0-0"
keywords:
- szurubooru
- danbooru
- image-board
home: https://github.com/toboshii/charts/tree/master/charts/szurubooru
sources:
- https://github.com/rr-/szurubooru
maintainers:
- name: toboshii
email: toboshii@users.noreply.github.com
dependencies:
- name: common
repository: https://library-charts.k8s-at-home.com
version: 4.0.0
- name: postgresql
version: 10.5.3
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
112 changes: 112 additions & 0 deletions charts/szurubooru/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# szurubooru

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: v2.5.0](https://img.shields.io/badge/AppVersion-v2.5.0-informational?style=flat-square)

Szurubooru is an image board engine inspired by services such as Danbooru, Gelbooru and Moebooru
dedicated for small and medium communities.

**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/toboshii/charts/issues/new/choose)**

## Source Code

* <https://github.com/rr-/szurubooru>

## Requirements

Kubernetes: `>=1.16.0-0`

## Dependencies

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | postgresql | 10.5.3 |
| https://library-charts.k8s-at-home.com | common | 4.0.0 |

## TL;DR

```console
helm repo add toboshii https://toboshii.github.io/charts/
helm repo update
helm install szurubooru toboshii/szurubooru
```

## Installing the Chart

To install the chart with the release name `szurubooru`

```console
helm install szurubooru toboshii/szurubooru
```

## Uninstalling the Chart

To uninstall the `szurubooru` deployment

```console
helm uninstall szurubooru
```

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/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml) from the [common library](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common).

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

```console
helm install szurubooru \
--set env.TZ="America/New York" \
toboshii/szurubooru
```

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.

```console
helm install szurubooru toboshii/szurubooru -f values.yaml
```

## Values

**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common)

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalContainers.server.env | object | See below (only deviations from the default settings are specified) | environment variables. See [image docs](https://github.com/rr-/szurubooru/blob/master/docker-compose.yml) for more details. |
| additionalContainers.server.env.LOG_SQL | int | `0` | Set to 1 to enable verbose SQL logs |
| additionalContainers.server.env.POSTGRES_DB | string | `"szurubooru"` | Postgres database name |
| additionalContainers.server.env.POSTGRES_HOST | string | `"{{ .Release.Name }}-postgresql"` | Postgres database hostname |
| additionalContainers.server.env.POSTGRES_PASSWORD | string | `"szurubooru"` | Postgres database password |
| additionalContainers.server.env.POSTGRES_PORT | int | `5432` | Postgres custom port (empty = default port) |
| additionalContainers.server.env.POSTGRES_USER | string | `"szurubooru"` | Postgres database username |
| additionalContainers.server.env.TZ | string | `"UTC"` | Set the container timezone |
| additionalContainers.server.image | string | `"szurubooru/server:2.5-edge"` | |
| additionalContainers.server.imagePullPolicy | string | `"IfNotPresent"` | |
| additionalContainers.server.name | string | `"server"` | |
| additionalContainers.server.volumeMounts | list | `[]` | |
| env | object | See below (only deviations from the default settings are specified) | environment variables. See [image docs](https://github.com/rr-/szurubooru/blob/master/docker-compose.yml) for more details. |
| env.BACKEND_HOST | string | `"{{ .Release.Name }}-server"` | Set the backend host |
| env.BASE_URL | string | `"https://example.com"` | Set the base URL |
| env.TZ | string | `"UTC"` | Set the container timezone |
| image.pullPolicy | string | `"IfNotPresent"` | image pull policy |
| image.repository | string | `"szurubooru/client"` | image repository |
| image.tag | string | `"2.5-edge"` | image tag |
| ingress.main | object | See values.yaml | Enable and configure ingress settings for the chart under this key. |
| persistence | object | See values.yaml | Configure persistence settings for the chart under this key. |
| postgresql | object | See values.yaml | Enable and configure postgresql database subchart under this key. For more options see [postgresql chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/postgresql) |
| service | object | See values.yaml | Configures service settings for the chart. |
| szurubooru | object | See below | Configures Szurubooru settings. See [app docs](https://github.com/rr-/szurubooru/blob/master/server/config.yaml.dist) for more details. |
| szurubooru.domain | string | `"https://example.com"` | Full url to the homepage of this szurubooru site, with no trailing slash |
| szurubooru.name | string | `"szurubooru"` | Shown in the website title and on the front page |
| szurubooru.secret | string | `"change"` | Used to salt the users' password hashes and generate filenames for static content |

## Support

- See the [Docs](https://docs.k8s-at-home.com/our-helm-charts/getting-started/)
- Open an [issue](https://github.com/toboshii/charts/issues/new/choose)
- Join our [Discord](https://discord.gg/sTMX7Vh) community

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)

141 changes: 141 additions & 0 deletions charts/szurubooru/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{{- define "custom.repository.organization" -}}
toboshii
{{- end -}}

{{- define "custom.repository.url" -}}
https://github.com/toboshii/charts
{{- end -}}

{{- define "custom.helm.url" -}}
https://toboshii.github.io/charts/
{{- end -}}

{{- define "custom.helm.path" -}}
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
{{- end -}}

{{- define "custom.notes" -}}
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/toboshii/charts/issues/new/choose)**
{{- end -}}

{{- define "custom.requirements" -}}
## Requirements

{{ template "chart.kubeVersionLine" . }}
{{- end -}}

{{- define "custom.dependencies" -}}
## Dependencies

{{ template "chart.requirementsTable" . }}
{{- end -}}

{{- define "custom.install.tldr" -}}
## TL;DR

```console
helm repo add {{ template "custom.repository.organization" . }} {{ template "custom.helm.url" . }}
helm repo update
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }}
```
{{- end -}}

{{- define "custom.install" -}}
## Installing the Chart

To install the chart with the release name `{{ template "chart.name" . }}`

```console
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }}
```
{{- end -}}

{{- define "custom.uninstall" -}}
## Uninstalling the Chart

To uninstall the `{{ template "chart.name" . }}` deployment

```console
helm uninstall {{ template "chart.name" . }}
```

The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release.
{{- end -}}

{{- define "custom.configuration.header" -}}
## Configuration
{{- end -}}

{{- define "custom.configuration.readValues" -}}
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/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml) from the [common library](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common).
{{- end -}}

{{- define "custom.configuration.example.set" -}}
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

```console
helm install {{ template "chart.name" . }} \
--set env.TZ="America/New York" \
{{ template "custom.helm.path" . }}
```
{{- end -}}

{{- define "custom.configuration.example.file" -}}
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.

```console
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -f values.yaml
```
{{- end -}}

{{- define "custom.valuesSection" -}}
## Values

**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common)

{{ template "chart.valuesTable" . }}
{{- end -}}

{{- define "custom.support" -}}
## Support

- See the [Docs](https://docs.k8s-at-home.com/our-helm-charts/getting-started/)
- Open an [issue](https://github.com/toboshii/charts/issues/new/choose)
- Join our [Discord](https://discord.gg/sTMX7Vh) community
{{- end -}}

{{ template "chart.header" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "custom.notes" . }}

{{ template "chart.sourcesSection" . }}

{{ template "custom.requirements" . }}

{{ template "custom.dependencies" . }}

{{ template "custom.install.tldr" . }}

{{ template "custom.install" . }}

{{ template "custom.uninstall" . }}

{{ template "custom.configuration.header" . }}

{{ template "custom.configuration.readValues" . }}

{{ template "custom.configuration.example.set" . }}

{{ template "custom.configuration.example.file" . }}

{{ template "custom.valuesSection" . }}

{{ template "custom.support" . }}

{{ template "helm-docs.versionFooter" . }}
{{ "" }}
14 changes: 14 additions & 0 deletions charts/szurubooru/templates/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- include "common.values.setup" . }}

{{- define "szurubooru.settingsVolume" -}}
enabled: "true"
mountPath: "/opt/app/config.yaml"
subPath: "config.yaml"
type: "custom"
volumeSpec:
configMap:
name: {{ include "common.names.fullname" . }}-settings
{{- end -}}
{{- $_ := set .Values.persistence "szurubooru-settings" (include "szurubooru.settingsVolume" . | fromYaml) -}}

{{ include "common.all" . }}
8 changes: 8 additions & 0 deletions charts/szurubooru/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}-settings
labels: {{- include "common.labels" . | nindent 4 }}
data:
config.yaml: |-
{{ toYaml .Values.szurubooru | indent 4 }}
Loading

0 comments on commit b741b40

Please sign in to comment.