# yaml-language-server: $schema=./values.schema.json
image:
  repository: docker.io/semaphoreui/semaphore
  tag: v2.17.33@sha256:17678757e65621aaf27bffbfe8caa00fb85857d60124b49876a5326e3f3dfac9
  pullPolicy: IfNotPresent

securityContext:
  container:
    readOnlyRootFilesystem: false
    runAsNonRoot: false
    runAsUser: 0
    runAsGroup: 0

service:
  main:
    ports:
      main:
        port: 3000
        protocol: http
        targetPort: 3000

workload:
  main:
    podSpec:
      containers:
        main:
          env:
            # DB
            SEMAPHORE_DB_DIALECT: postgres
            SEMAPHORE_DB_USER: "{{ .Values.cnpg.main.user }}"
            SEMAPHORE_DB: "{{ .Values.cnpg.main.database }}"
            SEMAPHORE_DB_PORT: 5432
            SEMAPHORE_DB_HOST:
              secretKeyRef:
                name: cnpg-main-urls
                key: host
            SEMAPHORE_DB_PASS:
              secretKeyRef:
                name: cnpg-main-user
                key: password
            SEMAPHORE_ACCESS_KEY_ENCRYPTION:
              secretKeyRef:
                name: semaphore-secrets
                key: SEMAPHORE_ACCESS_KEY_ENCRYPTION
            # set paths to /data
            SEMAPHORE_PLAYBOOK_PATH: "{{.Values.persistence.data.mountPath }}"
            SEMAPHORE_ADMIN: admin
            SEMAPHORE_ADMIN_NAME: admin
            SEMAPHORE_ADMIN_PASSWORD: changeme
            SEMAPHORE_ADMIN_EMAIL: admin@localhost
            # LDAP
            # no | yes
            SEMAPHORE_LDAP_ACTIVATED: "no"
            # SEMAPHORE_LDAP_HOST: dc01.local.example.com
            # SEMAPHORE_LDAP_PORT: '636'
            # no | yes
            SEMAPHORE_LDAP_NEEDTLS: "no"
            # SEMAPHORE_LDAP_DN_BIND: 'uid=bind_user,cn=users,cn=accounts,dc=local,dc=shiftsystems,dc=net'
            # SEMAPHORE_LDAP_PASSWORD: 'ldap_bind_account_password'
            # SEMAPHORE_LDAP_DN_SEARCH: 'dc=local,dc=example,dc=com'
            # SEMAPHORE_LDAP_SEARCH_FILTER: "(\u0026(uid=%s)(memberOf=cn=ipausers,cn=groups,cn=accounts,dc=local,dc=example,dc=com))"

persistence:
  config:
    enabled: true
    mountPath: /etc/semaphore
  data:
    enabled: true
    mountPath: /data

cnpg:
  main:
    enabled: true
    user: semaphore
    database: semaphore
