#
# IMPORTANT NOTE
#
# This chart inherits from our common library chart. You can check the default values/options here:
# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml
#

image:
  # -- image repository
  repository: gollumorg/gollum
  # -- image tag
  tag: latest
  # -- image pull policy
  pullPolicy: IfNotPresent

# -- Configures service settings for the chart.
# @default -- See values.yaml
service:
  main:
    ports:
      http:
        port: 4567

ingress:
  # -- Enable and configure ingress settings for the chart under this key.
  # @default -- See values.yaml
  main:
    enabled: false

# -- Configure persistence settings for the chart under this key.
# @default -- See values.yaml
persistence:
  wiki:
    enabled: false
    mountPath: /wiki

gollum:
  # -- Branch to pull
  gitBranch: master
  # -- Repository URL to pull (accepts access tokens)
  # Example: https://user:access-token@git.example.com/user/repo.git
  gitUrl: https://github.com/k8s-at-home/charts.git
  # -- Additional arguments for starting gollum
  additionalArgs:
    - --h1-title
  # -- Command run during the sync cron
  syncCommand: git pull && git push
  # -- Gollum config.rb customizations
  # [[ref]](https://github.com/gollum/gollum#config-file)
  config: |
    # Push and pull on commit
    Gollum::Hook.register(:post_commit, :hook_id) do |committer, sha1|
         committer.wiki.repo.git.pull('origin', committer.wiki.ref)
         committer.wiki.repo.git.push('origin', committer.wiki.ref)
    end
