## Global Docker image parameters
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
## Current available global Docker image parameters: imageRegistry and imagePullSecrets
##
# global:
#   imageRegistry: myRegistryName
#   imagePullSecrets:
#     - myRegistryKeySecretName
#   storageClass: myStorageClass

## Bitnami Airflow image version
## ref: https://hub.docker.com/r/bitnami/airflow/tags/
##
image:
  registry: docker.io
  repository: bitnami/airflow
  tag: 1.10.12-debian-10-r11
  ## Specify a imagePullPolicy
  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

  ## Set to true if you would like to see extra information on logs
  ## It turns BASH and NAMI debugging in minideb
  ## ref:  https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
  debug: false

## Bitnami Airflow Scheduler image version
## ref: https://hub.docker.com/r/bitnami/airflow-scheduler/tags/
##
schedulerImage:
  registry: docker.io
  repository: bitnami/airflow-scheduler
  tag: 1.10.12-debian-10-r23
  ## Specify a imagePullPolicy
  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

  ## Set to true if you would like to see extra information on logs
  ## It turns BASH and NAMI debugging in minideb
  ## ref:  https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
  debug: false

## Bitnami Airflow Worker image version
## ref: https://hub.docker.com/r/bitnami/airflow-worker/tags/
##
workerImage:
  registry: docker.io
  repository: bitnami/airflow-worker
  tag: 1.10.12-debian-10-r20
  ## Specify a imagePullPolicy
  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
  ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
  ##
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

  ## Set to true if you would like to see extra information on logs
  ## It turns BASH and NAMI debugging in minideb
  ## ref:  https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
  debug: false

## Bitnami git image version
## ref: https://hub.docker.com/r/bitnami/git/tags/
##
git:
  registry: docker.io
  repository: bitnami/git
  tag: 2.28.0-debian-10-r42
  pullPolicy: IfNotPresent
  ## Optionally specify an array of imagePullSecrets.
  ## Secrets must be manually created in the namespace.
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
  ##
  # pullSecrets:
  #   - myRegistryKeySecretName

## String to partially override airflow.fullname template (will maintain the release name)
##
# nameOverride:

## String to fully override airflow.fullname template
##
# fullnameOverride:

## StatefulSet controller supports automated updates. There are two valid update strategies: RollingUpdate and OnDelete
## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#updating-statefulsets
##
updateStrategy: RollingUpdate

## Partition update strategy
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
##
# rollingUpdatePartition:

## Airflow Components configuration
##
airflow:
  ## Name of an existing config map containing the Airflow config file
  ##
  # configurationConfigMap:
  ## Name of an existing config map containing all the DAGs files you want to load in Airflow.
  ##
  ## dagsConfigMap:
  ## Airflow generic configuration
  ##
  loadExamples: false

  ## Interval to pull the git repository containing the plugins and/or DAG files
  #
  gitSyncInterval: 60
  ## Enable in order to download DAG files from git repository.
  ##
  ## Name for repositories can be anything unique and must follow same naming conventions as kubernetes.
  ## Kubernetes resources can have names up to 253 characters long. The characters allowed in names are:
  ## digits (0-9), lower case letters (a-z), -, and .
  cloneDagFilesFromGit:
    enabled: false
  #  repositories:
  #  - repository:
  #    name:
  #    branch:
  #    path:
  clonePluginsFromGit:
    enabled: false
    # repository:
    # branch:
    # path:
  ## URL used to access to airflow web ui
  ##
  baseUrl: http://airflow.local
  ## Airflow worker component configuration
  worker:
    port: 8793
    replicas: 3
    ## podManagementPolicy to manage scaling operation of worker pods
    ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
    ##
    # podManagementPolicy: Parallel

    ## Worker containers' resource requests and limits
    ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
    ##
    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: 200m
      #    memory: 1Gi
      requests: {}
      #    memory: 256Mi
      #    cpu: 250m
    podAnnotations:

  ## Airflow web specific configuration
  #
  web:
    ## Web container' resource requests and limits
    ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
    ##
    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: 200m
      #    memory: 1Gi
      requests: {}
      #    memory: 256Mi
      #    cpu: 250m

  ## Airflow scheduler specific configuration
  #
  scheduler:
    ## Scheduler containers' resource requests and limits
    ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
    ##
    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: 200m
      #    memory: 1Gi
      requests: {}
      #    memory: 256Mi
      #    cpu: 250m

  ## All the parameters from the configuration file can be overwritten by using environment variables with this format:
  ## AIRFLOW__{SECTION}__{KEY}. Note the double underscores. More info at https://airflow.readthedocs.io/en/stable/howto/set-config.html
  ##
  # extraEnvVars:
  #   - name: AIRFLOW__SMTP__SMTP_HOST
  #     value: "localhost"
  #   - name: AIRFLOW__SMTP__SMTP_PORT
  #     value: "25"
  #   - name: AIRFLOW__SMTP__USER
  #     value: ""

  auth:
    ## Option to force users to specify a password. That is required for 'helm upgrade' to work properly.
    ## If it is not forced, a random password will be generated.
    ##
    forcePassword: true
    ## Specify username to acccess web UI
    ##
    username: user
    ## Specify password to acccess web UI
    ##
    # password:
    ## Specify a fernet key to secure airflow connections
    ## Fernet key must be 32 url-safe base64-encoded bytes.
    ## More info at:
    ## - https://airflow.readthedocs.io/en/stable/howto/secure-connections.html
    ## - https://bcb.github.io/airflow/fernet-key
    ##
    # fernetKey:
    ## Use existing secret (ignores previous password and fernetKey)
    ##
    # existingSecret:

## LDAP configuration
##
ldap:
  # Enable LDAP authentication
  enabled: false
  # Server URI, eg. ldap://ldap_server:389
  uri: "ldap://ldap_server:389"
  # Base of the search, eg. ou=example,o=org
  base: "ou=example,o=org"
  # Bind DN
  binddn: "cn=user,ou=example,o=org"
  # Bind Password
  bindpw: ""
  # Field used for uid
  uidField: "uid"
  # SSL/TLS parameters for LDAP
  tls:
    # Enabled TLS/SSL for LDAP, you must include the CA file.
    enabled: false
    ## Allow to use self signed certificates
    allowSelfSigned: true
    ## Name of the existing secret containing the certificate CA file that will be used by ldap client.
    ## Cloud be create with: kubectl create secret generic airflow-secret --from-file=./ca.pem
    CAcertificateSecret: ""
    ## LDAP CA cert filename
    ## eg. ca.pem
    CAcertificateFilename: ""

## Kubernetes Security Context
## https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
  enabled: true
  fsGroup: 1001
  runAsUser: 1001

## Kubernetes configuration
## For minikube, set this to NodePort, elsewhere use LoadBalancer
##
service:
  type: ClusterIP
  port: 8080

  ## Specify the NodePort value for the LoadBalancer and NodePort service types.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  ##
  # nodePort:

  ## Use loadBalancerIP to request a specific static IP,
  # loadBalancerIP:

  ## Service annotations done as key:value pairs
  annotations:

## Configure the ingress resource that allows you to access the
## Airflow installation. Set up the URL
## ref: http://kubernetes.io/docs/user-guide/ingress/
##
ingress:
  ## Set to true to enable ingress record generation
  enabled: true

  ## Set this to true in order to add the corresponding annotations for cert-manager
  certManager: false

  ## Ingress annotations done as key:value pairs
  ## For a full list of possible ingress annotations, please see
  ## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
  ##
  ## If tls is set to true, annotation ingress.kubernetes.io/secure-backends: "true" will automatically be set
  ## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
  annotations:
  #  kubernetes.io/ingress.class: nginx

  ## The list of hostnames to be covered with this ingress record.
  ## Most likely this will be just one host, but in the event more hosts are needed, this is an array
  ##
  hosts:
    - name: airflow.local
      path: /
      ## Set this to true in order to enable TLS on the ingress record
      tls: false

      ## Optionally specify the TLS hosts for the ingress record
      ## Useful when the Ingress controller supports www-redirection
      ## If not specified, the above host name will be used
      # tlsHosts:
      # - www.airflow.local
      # - airflow.local

      ## If TLS is set to true, you must declare what secret will store the key/certificate for TLS
      tlsSecret: airflow.local-tls

  secrets:
  ## If you're providing your own certificates, please use this to add the certificates as secrets
  ## key and certificate should start with -----BEGIN CERTIFICATE----- or
  ## -----BEGIN RSA PRIVATE KEY-----
  ##
  ## name should line up with a tlsSecret set further up
  ## If you're using cert-manager, this is unneeded, as it will create the secret for you if it is not set
  ##
  ## It is also possible to create and manage the certificates outside of this helm chart
  ## Please see README.md for more information
  # - name: airflow.local-tls
  #   key:
  #   certificate:

## Pod affinity preset
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAffinityPreset: ""

## Pod anti-affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
## Allowed values: soft, hard
##
podAntiAffinityPreset: soft

## Node affinity preset
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
## Allowed values: soft, hard
##
nodeAffinityPreset:
  ## Node affinity type
  ## Allowed values: soft, hard
  type: ""
  ## Node label key to match
  ## E.g.
  ## key: "kubernetes.io/e2e-az-name"
  ##
  key: ""
  ## Node label values to match
  ## E.g.
  ## values:
  ##   - e2e-az1
  ##   - e2e-az2
  ##
  values: []

## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
## Note: podAffinityPreset, podAntiAffinityPreset, and  nodeAffinityPreset will be ignored when it's set
##
affinity: {}

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}

## Tolerations for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## Configure extra options for liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes)
livenessProbe:
  enabled: true
  initialDelaySeconds: 180
  periodSeconds: 20
  timeoutSeconds: 5
  failureThreshold: 6
  successThreshold: 1

readinessProbe:
  enabled: true
  initialDelaySeconds: 30
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 6
  successThreshold: 1

##
## PostgreSQL chart configuration
##
## https://github.com/bitnami/charts/blob/master/bitnami/postgresql/values.yaml
##
postgresql:
  enabled: true
  postgresqlUsername: bn_airflow
  # postgresqlPassword:
  postgresqlDatabase: bitnami_airflow
  ## In case of postgresql.enabled = true, allow the usage of existing secrets for postgresql
  existingSecret: ""

externalDatabase:
  ## All of these values are only used when postgresql.enabled is set to false
  ## Database host
  host: localhost
  ## non-root Username for Airflow Database
  user: bn_airflow
  ## Database password
  password: ""
  ## Database name
  database: bitnami_airflow
  ## Database port number
  port: 5432
  ## Name of an existing secret resource containing the Postgres password in a 'postgresql-password' key
  existingSecret: ""

##
## Redis chart configuration
##
## https://github.com/bitnami/charts/blob/master/bitnami/redis/values.yaml
##
redis:
  enabled: true
  # password: ""
  ## In case of redis.enabled = true, allow the usage of existing secrets for redis
  existingSecret: ""

externalRedis:
  ## All of these values are only used when redis.enabled is set to false
  ## Redis host
  ##
  host: localhost
  ## Redis port number
  ##
  port: 6379
  ## Redis password
  ##
  password: ""
  ## Redis username
  ## Most Redis implementnations do not require a username to authenticate
  ## and it should be enough with the password
  ##
  # username: ""
  ## Name of an existing secret resource containing the Redis password in a 'redis-password' key
  existingSecret: ""

## Prometheus Exporter / Metrics
##
metrics:
  enabled: false

  image:
    registry: docker.io
    repository: bitnami/airflow-exporter
    tag: 0.20180711.0-debian-10-r220
    pullPolicy: IfNotPresent
    ## Optionally specify an array of imagePullSecrets.
    ## Secrets must be manually created in the namespace.
    ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
    ##
    # pullSecrets:
    #   - myRegistryKeySecretName

  ## Metrics exporter resource requests and limits
  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
  ##
  # resources: {}

  ## Metrics exporter labels and tolerations for pod assignment
  # nodeSelector: {"beta.kubernetes.io/arch": "amd64"}
  # tolerations: []

  ## Metrics exporter pod Annotation and Labels
  # podLabels: {}

  podAnnotations:
    prometheus.io/scrape: "true"
    prometheus.io/port: "9112"
