szurubooru-server

by my0n

Helm chartv0.2.5App 2.5Verified publisher

An unofficial helm chart for the szurubooru server.

About this chart

my0n/szurubooru-server

An unofficial helm chart for the szurubooru server.

This chart is not maintained by the upstream project and any issues with the chart should be raised here.

Example usage

Install the helm chart:

helm repo add my0n https://my0n.github.io/helm-charts
helm repo update
helm install szurubooru-server my0n/szurubooru-server -f values.yaml

Sample values.yaml given below; see values.yaml for more details.

# values.yaml
configuration:
  enabled: true
  template: |
    name: My Self-Hosted Szurubooru
    domain: http://${SZURUBOORU_HOST}
    secret: ${SZURUBOORU_SECRET}
    max_dl_filesize: 10.0E+12
  templateEnv:
    - name: SZURUBOORU_SECRET
      valueFrom:
        secretKeyRef:
          name: szurubooru-server-salt
          key: salt
persistence:
  enabled: true
  size: 10Gi
postgres:
  db: postgres
  host: postgresql.default.svc
  port: 5432
  userSecret:
    name: postgresql-credentials
    key: user
  passwordSecret:
    name: postgresql-credentials
    key: password
  verboseLogs: false
podSecurityContext:
  runAsUser: 2000
  runAsGroup: 2000
  fsGroup: 2000

Example kubernetes secret:

# szurubooru-server-salt.yaml
apiVersion: v1
kind: Secret
metadata:
  name: szurubooru-server-salt
  namespace: default
type: Opaque
data:
  salt: dmVyeXNlY3JldHNhbHQ=

Values

KeyTypeDefaultDescription
affinityobject{}Defines affinity constraint rules. Read more about affinity here.
autoscaling.enabledboolfalseEnable the horizontal pod autoscaler.
autoscaling.maxReplicasint100Max replicas for the horizontal pod autoscaler.
autoscaling.minReplicasint1Min replicas for the horiziontal pod autoscaler.
autoscaling.targetCPUUtilizationPercentageint80Target CPU utilization for the horizontal pod autoscaler.
configuration.enabledbooltrueIf enabled, provide the config.yaml file to the server.
configuration.templatestring""Template for an automatically generated config file. Environment variables wrapped in ${} will be replaced. See example above. A more complete example of the config file can be found on the szurubooru repo here.
configuration.templateEnvlist[]A list of environment variables to use in configuration.templateEnv. See example above.
fullnameOverridestring""Override for full name of generated resources.
image.pullPolicystring"IfNotPresent"Image pull policy.
image.repositorystring"szurubooru/server"Image repository.
image.tagstring""Image tag.
imagePullSecretslist[]Secrets for pulling an image.
ingress.annotationsobject{}Provide additional ingress annotations if needed.
ingress.enabledboolfalseEnables or disables the ingress. For the server, this should be left set to false unless you want direct access to the API.
ingress.hoststring"chart-example.local"Host address.
ingress.pathstring"/"Path.
ingress.pathTypestring"ImplementationSpecific"Ignored if not kubeVersion >= 1.18-0
ingress.tlslist[]Configure TLS for the ingress.
nameOverridestring""Override for name of generated resources.
nodeSelectorobject{}Defines node selection constraints. Read more about nodeSelector here.
persistence.accessModes[0]string"ReadWriteOnce"Access mode for generated Persistent Volume Claim.
persistence.annotationsobject{}Annotations for the generated Persistent Volume Claim.
persistence.enabledboolfalseIf enabled, a Persistent Volume Claim will either be created or used. If not enabled, the server just uses an emptyDir.
persistence.existingClaimstring""Use an existing Persistent Volume Claim. If empty string (default), then a new one will be generated.
persistence.sizestring"10Gi"The size of the generated Persistent Volume Claim.
persistence.storageClassstring""The storage class for the generated Persistent Volume Claim. If empty string (default), then the default provisioner will be used.
podAnnotationsobject{}Annotations for the server pod.
podSecurityContextobject{}Pod security context.
postgres.dbstring"szurubooru"PostgreSQL database. Sets POSTGRES_DB on the server pod.
postgres.hoststring""PostgreSQL host. Sets POSTGRES_HOST on the server pod.
postgres.passwordstring""PostgreSQL password (overrides postgres.passwordSecret). Sets POSTGRES_PASSWORD on the server pod.
postgres.passwordSecretobject{}Existing secret for the PostgreSQL password. Sets POSTGRES_PASSWORD on the server pod.
postgres.portint5432PostgreSQL port. Sets POSTGRES_PORT on the server pod.
postgres.userstring""PostgreSQL username (overrides postgres.userSecret). Sets POSTGRES_USER on the server pod.
postgres.userSecretobject{}Existing secret for the PostgreSQL username. Sets POSTGRES_USER on the server pod.
postgres.verboseLogsboolfalseEnable verbose SQL logs. Sets LOG_SQL on the server pod.
replicaCountint1Number of desired pods.
resourcesobject{}Set the resource limits/requests for the pod.
securityContextobject{}Security context.
service.portint6666The port for the service.
service.typestring"ClusterIP"The type of service.
serviceAccount.annotationsobject{}Annotations to add to the service account.
serviceAccount.createbooltrueSpecifies whether a service account should be created.
serviceAccount.namestring""The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template.
tolerationslist[]Specify taint tolerations. Read more about tolerations here.

Deploy szurubooru-server with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has szurubooru-server on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartszurubooru-server is pinned at v0.2.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply