#
# MIT License
#
# Copyright (c) 2020-present Cloudogu GmbH and Contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#

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

image:
  # image.repository --  Name of SCM-Manager image
  repository: ${dockerRepository}
  # image.tag -- Tag of SCM-Manager image
  tag: ${dockerTag}
  # image.pullPolicy -- SCM-Manager image pull policy
  pullPolicy: IfNotPresent

# nameOverride -- Override the resource name prefix
nameOverride: ""
# fullnameOverride -- Override the full resource names
fullnameOverride: ""

service:
  # service.type -- k8s service type
  type: LoadBalancer
  # service.port -- k8s service port
  port: 80
  # service.nodePort -- k8s service node port
  #nodePort:

ingress:
  # ingress.enabled -- Enables ingress
  enabled: false
  # ingress.annotations -- Ingress annotations
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  # ingress.path -- Ingress path
  path: /
  # ingress.hosts -- Ingress hosts
  hosts:
    - scm-manager.local
  # ingress.tls -- Ingress TLS configuration
  tls: []
  #  - secretName: scm-manager-tls
  #    hosts:
  #      - scm-manager.local

ssh:
  # ssh.enabled -- Enables ssh access (requires installed ssh plugin)
  enabled: false
  # ssh.port -- Intenernal ssh port (must match plugin configuration)
  port: 2222
  service:
    # ssh.service.type -- k8s service type for ssh
    type: LoadBalancer
    # ssh.service.port -- k8s service port for ssh
    port: 2222
  # ssh.dns -- dns names for the ssh service (requires installed external dns)
  dns:
    - ssh.scm-manager.local

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
  # persistence.enabled -- Enable the use of a PVC for SCM-Manager home
  enabled: true
  ## ghost data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  # storageClass: "-"
  # persistence.accessMode -- The PVC access mode
  accessMode: ReadWriteOnce
  # persistence.size -- The size of the PVC
  size: 40Gi

# resources -- Resources allocation (Requests and Limits)
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: 2000m
  #  memory: 2048Mi
  #requests:
  #  cpu: 50m
  #  memory: 256Mi

# nodeSelector -- Node labels for pod assignment
nodeSelector: {}

# tolerations -- Toleration labels for pod assignment
tolerations: []

# affinity -- Affinity settings
affinity: {}

# lifecycleHooks for the container to automate configuration before or after startup,
# i.e. to create users or repos through REST API calls
lifecycleHooks: |
#    postStart:
#      exec:
#        command: ["/bin/bash", "-c", "echo lifecycleHook"]
# Other option: Insert scrip file via "helm install --set-file=postStartHookScript=\${pwd()}/postStartHook.sh"
#  lifecycleHooks: |-
#    postStart:
#      exec:
#        command:
#          - "/bin/bash"
#          - "-c"
#          - >
#    {{  tpl (required ".Values.postStartHookScript required!" .Values.postStartHookScript) . | indent 8  }}

# extraEnv -- Additional environment variables, parsed through tpl function
extraEnv: |
#  - name: TZ
#    value: "{{.Values.timezone}}"

# extraEnvFrom -- Additional environment variables mapped from Secret or ConfigMap, parsed through tpl function
extraEnvFrom: |
#  - secretRef:
#      name: "{{.Values.mail.credentials}}"

# extraVolumes -- Add additional volumes, parsed through tpl function
extraVolumes: |
#  - name: bucket-service-account
#    secret:
#      secretName: "{{.Values.bucket.secretName}}"
#      items:
#        - key: service_account.json
#          path: service_account.json

# extraVolumeMounts -- Add additional volumes mounts, parsed through tpl function
extraVolumeMounts: |
#  - name: bucket-service-account
#    mountPath: "{{.Values.bucket.mountPath}}"
#    readOnly: true
