# Default values for umap.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
  repository: umap/umap
  pullPolicy: IfNotPresent
  # Overrides the image tag whose default is the chart appVersion.
  tag: ""

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
  # Specifies whether a service account should be created
  create: true
  # Automatically mount a ServiceAccount's API credentials?
  automount: true
  # Annotations to add to the service account
  annotations: {}
  # The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name: ""

podAnnotations: {}
podLabels: {}

podSecurityContext:
  runAsUser: 1000
  runAsGroup: 1000
  fsGroup: 1000

securityContext:
  capabilities:
    drop:
    - ALL
  readOnlyRootFilesystem: true
  runAsNonRoot: true
  runAsUser: 1000

service:
  type: ClusterIP
  port: 8000

ingress:
  enabled: false
  className: ""
  annotations: {}
  hosts:
    - example.org

resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  # limits:
  #   cpu: 100m
  #   memory: 128Mi
  # requests:
  #   cpu: 100m
  #   memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

umap:
  # Set environment variables supported by umap here
  # see: https://docs.umap-project.org/en/stable/config/settings/
  environment:
    SECRET_KEY: CHANGE_ME
    STATIC_ROOT: /srv/umap/static
    MEDIA_ROOT: /srv/umap/uploads
  # Configure environment variables using an existing secret in the same namespace.
  # In this case the values above are not used
  envFromSecret: null

  # You can also provide umap.conf content here:
  config: |
    from umap.settings.base import *

    # See: https://github.com/umap-project/umap/blob/master/umap/settings/local.py.sample
  # Configure config file using an existing secret in the same namespace.
  # In this case the values above are not used
  configFromSecret: null

persistence:
  enabled: true
  accessModes:
    - ReadWriteOnce
  annotations: {}
  existingClaim: ""
  storageClassName: ""
  resources:
    requests:
      storage: 1Gi

# Configure Cloudnative-pg operator for Postgis database
# Alternatively, you can disable CNPG and provide your own
# Postgis database by setting the `umap.environment.DATABASE_URL`
cnpg:
  enabled: true
  replicaCount: 2
  image:
    repository: ghcr.io/cloudnative-pg/postgis
    tag: 14
  persistence:
    storageClass: ""
    size: 1Gi
  clusterExtraSpec:
    bootstrap:
      initdb:
        postInitTemplateSQL:
          - CREATE EXTENSION postgis;
          - CREATE EXTENSION postgis_topology;
          - CREATE EXTENSION fuzzystrmatch;
          - CREATE EXTENSION postgis_tiger_geocoder;

  # See available values here: https://artifacthub.io/packages/helm/enix/cnpg-cluster?modal=values