# yaml-language-server: $schema=./values.schema.json
image:
  pullPolicy: IfNotPresent
  repository: yourls
  tag: 1.10.3@sha256:40078ccb77cb4eedc40a57a125f6518ae1d30f40cf8a939ce61a4ad25feb71e4
securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsGroup: 0
    runAsUser: 0
service:
  main:
    ports:
      main:
        port: 8080
        protocol: tcp
        targetPort: 8080
workload:
  main:
    podSpec:
      containers:
        main:
          env:
            YOURLS_DB_HOST:
              secretKeyRef:
                expandObjectName: false
                name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}'
                key: plainhost
            YOURLS_DB_NAME: "{{ .Values.mariadb.mariadbDatabase }}"
            YOURLS_DB_USER: "{{ .Values.mariadb.mariadbUsername }}"
            YOURLS_DB_PASS:
              secretKeyRef:
                expandObjectName: false
                name: '{{ printf "%s-%s" .Release.Name "mariadbcreds" }}'
                key: mariadb-password
            # YOURLS_HOURS_OFFSET: ""
            # protect admin form
            YOURLS_PRIVATE: false
            YOURLS_SITE: "{{ .Values.chartContext.appUrl }}"
            YOURLS_USER: ""
            YOURLS_PASS: ""

mariadb:
  enabled: true
  mariadbUsername: yourls
  mariadbDatabase: yourls
