ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/proxy-body-size: 512m
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
  #
  # run author and public in different contexts and use the same domain name
  # only one of these hosts/tls sections may be active
  #
#  hosts:
#  - host: {{ .Env.DEPLOYMENT }}.paastraining.magnolia-platform.io
#    paths:
#    - path: /
#      instance: public
#    - path: /author
#      instance: author
#  tls:
#  - hosts:
#    - {{ .Env.DEPLOYMENT }}.paastraining.magnolia-platform.io
#    secretName: {{ .Env.DEPLOYMENT }}-paastraining-magnolia-platform-io
  #
  # run author and public in ROOT context and use different domain names
  # only one of these hosts/tls sections may be active
  #
  hosts:
  - host: {{ .Env.DEPLOYMENT }}.author.paastraining.magnolia-platform.io
    paths:
    - path: /
      instance: author
  - host: {{ .Env.DEPLOYMENT }}.public.paastraining.magnolia-platform.io
    paths:
    - path: /
      instance: public
#  - host: {{ .Env.DEPLOYMENT }}.frontend-author.paastraining.magnolia-platform.io
#    paths:
#      - path: /
#        instance: frontend-author
#  - host: {{ .Env.DEPLOYMENT }}.frontend-public.paastraining.magnolia-platform.io
#    paths:
#    - path: /
#      instance: frontend-public
  tls:
  - hosts:
    - {{ .Env.DEPLOYMENT }}.author.paastraining.magnolia-platform.io
    - {{ .Env.DEPLOYMENT }}.public.paastraining.magnolia-platform.io
#    - {{ .Env.DEPLOYMENT }}.frontend-author.paastraining.magnolia-platform.io
#    - {{ .Env.DEPLOYMENT }}.frontend-public.paastraining.magnolia-platform.io
    secretName: {{ .Env.DEPLOYMENT }}-paastraining-magnolia-platform-io
image:
  pullSecrets:
    - name: gitlab
  pullPolicy: Always
magnoliaAuthor:
  enabled: true
  restartPolicy: Always
  redeploy: true
  bootstrap:
    password: superuser!
  activation:
    useExistingSecret: False
  #
  # run author and public in different contexts and use the same domain name
  # only one of these contextPath/base_url values may be active
  #
#  contextPath: /author
#  base_url: https://{{ .Env.DEPLOYMENT }}.paastraining.magnolia-platform.io/author
  #
  # run author and public in ROOT context and use different domain names
  # only one of these contextPath/base_url values may be active
  #
  contextPath: /
  base_url: https://{{ .Env.DEPLOYMENT }}.author.paastraining.magnolia-platform.io/
  sameSiteCookies: strict
  webarchive:
    repository: {{ .Env.CI_REGISTRY_IMAGE }}/magnolia-webapp
    tag: {{ .Env.GIT_TAG | quote }}
  env:
    - name: instance
      value: "author"
    - name: deployment
      value: {{ .Env.DEPLOYMENT }}
    - name: magnolia.superuser.enabled
      value: "true"
    - name: magnolia.superuser.password
      value: "superuser!"
    - name: magnolia.bootstrap.license.owner
      value: "[replace with email]"
    - name: magnolia.bootstrap.license.key
      value: "[replace with key]"
  setenv:
    memory:
      maxPercentage: 80
  resources:
    requests:
      memory: 4Gi
    limits:
      memory: 4Gi
  livenessProbe:
    enabled: true
    path: "/.rest/status"

  db:
    tag: 15-alpine
    persistence:
      size: "10Gi"
    contentsync:
      enabled: true
    restore:
      enabled: False
    backup:
      enabled: True
      env:
        - name: MGNLBACKUP_USE_PG_WAL
          value: "true"
        - name: MGNLBACKUP_SYNC_DIR
          value: "/archive"
        - name: MGNLBACKUP_NO_STDOUT
          value: "true"
        - name: MGNLBACKUP_LOGLEVEL
          value: "debug"
        - name: MGNLBACKUP_BUCKET
          value: "paastraining-backup-bucket"
        - name: MGNLBACKUP_PREFIX
          value: "{{ .Env.DEPLOYMENT }}/author"
        - name: MGNLBACKUP_CRON
          value: "0 3 * * *"
        - name: MGNLBACKUP_KEEPDAYS
          value: "30"
        - name: MGNLBACKUP_TAGS_RELEASE
          value: {{ .Env.DEPLOYMENT }}
        #
        # Choose backup location based on cloud provider of the cluster
        #
        # Backup to S3
        - name: MGNLBACKUP_S3_ENDPOINT
          value: "s3.eu-central-1.amazonaws.com"
        - name: MGNLBACKUP_S3_REGION
          value: "eu-central-1"
        - name: MGNLBACKUP_S3_ACCESSKEY
          valueFrom:
            secretKeyRef:
              name: s3-backup-key
              key: accesskey
        - name: MGNLBACKUP_S3_SECRETKEY
          valueFrom:
            secretKeyRef:
              name: s3-backup-key
              key: secretkey
        # Backup to Azure storage
#        - name: MGNLBACKUP_AZ_ACCOUNT_NAME
#          valueFrom:
#            secretKeyRef:
#              name: az-backup-key
#              key: AccountName
#        - name: MGNLBACKUP_AZ_ACCOUNT_KEY
#          valueFrom:
#            secretKeyRef:
#              name: az-backup-key
#              key: AccountKey

magnoliaPublic:
  enabled: true
  replicas: 1
  restartPolicy: Always
  bootstrap:
    password: superuser!
  activation:
    useExistingSecret: False
  contextPath: /
  #
  # run author and public in different contexts and use the same domain name
  # only one of these base_url values may be active
  #
#  base_url: https://{{ .Env.DEPLOYMENT }}.paastraining.magnolia-platform.io/
  #
  # run author and public in ROOT context and use different domain names
  # only one of these base_url values may be active
  #
  base_url: https://{{ .Env.DEPLOYMENT }}.public.paastraining.magnolia-platform.io/
  sameSiteCookies: strict
  webarchive:
    repository: {{ .Env.CI_REGISTRY_IMAGE }}/magnolia-webapp
    tag: {{ .Env.GIT_TAG | quote }}
  env:
    - name: instance
      value: "public"
    - name: deployment
      value: {{ .Env.DEPLOYMENT }}
    - name: magnolia.superuser.enabled
      value: "true"
    - name: magnolia.superuser.password
      value: "superuser!"
    - name: magnolia.bootstrap.license.owner
      value: "[replace with email]"
    - name: magnolia.bootstrap.license.key
      value: "[replace with key]"
  setenv:
    memory:
      maxPercentage: 80
  resources:
    requests:
      memory: 4Gi
    limits:
      memory: 4Gi
  livenessProbe:
    enabled: true
    path: "/.rest/status"
  db:
    tag: 15-alpine
    persistence:
      size: "10Gi"
    contentsync:
      enabled: true
    restore:
      enabled: False
    backup:
      enabled: True
      env:
        - name: MGNLBACKUP_USE_PG_WAL
          value: "true"
        - name: MGNLBACKUP_SYNC_DIR
          value: "/archive"
        - name: MGNLBACKUP_NO_STDOUT
          value: "true"
        - name: MGNLBACKUP_LOGLEVEL
          value: "debug"
        - name: MGNLBACKUP_BUCKET
          value: "paastraining-backup-bucket"
        - name: MGNLBACKUP_PREFIX
          value: "{{ .Env.DEPLOYMENT }}/public"
        - name: MGNLBACKUP_CRON
          value: "0 3 * * *"
        - name: MGNLBACKUP_KEEPDAYS
          value: "30"
        - name: MGNLBACKUP_TAGS_RELEASE
          value: {{ .Env.DEPLOYMENT }}
        #
        # Choose backup location based on cloud provider of the cluster
        #
        # Backup to S3
        - name: MGNLBACKUP_S3_ENDPOINT
          value: "s3.eu-central-1.amazonaws.com"
        - name: MGNLBACKUP_S3_REGION
          value: "eu-central-1"
        - name: MGNLBACKUP_S3_ACCESSKEY
          valueFrom:
            secretKeyRef:
              name: s3-backup-key
              key: accesskey
        - name: MGNLBACKUP_S3_SECRETKEY
          valueFrom:
            secretKeyRef:
              name: s3-backup-key
              key: secretkey
        # Backup to Azure storage
#        - name: MGNLBACKUP_AZ_ACCOUNT_NAME
#          valueFrom:
#            secretKeyRef:
#              name: az-backup-key
#              key: AccountName
#        - name: MGNLBACKUP_AZ_ACCOUNT_KEY
#          valueFrom:
#            secretKeyRef:
#              name: az-backup-key
#              key: AccountKey


# Additional jars which should be loaded into tomcat can be specified here.
jars:
  - name: jmx-exporter
    repository: registry.gitlab.com/mironet/magnolia-jar
    tag: jmx_prometheus_javaagent-0.13.0
    env:
      - name: INIT_DEST
        value: /extraLibs/
    initScript: /init.sh