## 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, imagePullSecrets and storageClass
##
# global:
#   imageRegistry: myRegistryName
#   imagePullSecrets:
#     - myRegistryKeySecretName
#   storageClass: myStorageClass

## Bitnami Grafana image version
## ref: https://hub.docker.com/r/bitnami/grafana/tags/
##
image:
  registry: docker.io
  repository: bitnami/grafana
  tag: 7.2.1-debian-10-r0
  ## 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

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

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

## Kubernetes Cluster Domain
##
clusterDomain: cluster.local

## Admin credentials configuration
##
admin:
  ## Admin username
  ##
  user: "admin"
  ## Admin password
  ## If a password is not provided a random password will be generated
  ##
  # password:
  ## Name of the existing secret containing admin password
  ##
  # existingSecret:
  ## Password key on the existing secret
  ##
  existingSecretPasswordKey: password

## SMTP configuration
##
smtp:
  enabled: false
  ## SMTP credentials
  ##
  user: user
  password: password
  ## Name of existing secret containing SMTP credentials (user and password)
  ##
  # existingSecret:
  ## User and password key on the existing secret
  ##
  existingSecretUserKey: user
  existingSecretPasswordKey: password

## Grafana plugins that will be installed
## Specify plugins as a list separated by commas ( you will need to scape them when specifying from command line )
## Example:
## plugins: grafana-kubernetes-app,grafana-example-app
##
# plugins:

## Ldap configuration for Grafana
##
ldap:
  enabled: false
  allowSignUp: false
  ## configMap with LDAP configuration file (ldap.toml)
  # configMapName:

## An array to add extra env vars
## For example:
## extraEnvVars:
##  - name: GF_DEFAULT_INSTANCE_NAME
##    value: my-instance
##
extraEnvVars: {}

## An array to add extra configmaps:
## For example:
## extraConfigmaps:
##   - name: myconfigmap
##     mountPath: /opt/bitnami/desired-path
##     subPath: file-name.extension (optional)
##     readOnly: true
##
extraConfigmaps: {}

## Parameters to override the default grafana.ini file.
## It is needed to create a configmap or a secret containing the grafana.ini file.
##
config:
  useGrafanaIniFile: false
  grafanaIniConfigMap:
  grafanaIniSecret:

## Create dasboard provider to load dashboards, a default one is created to load
## dashboards from "/opt/bitnami/grafana/dashboards"
##
dashboardsProvider:
  enabled: false
  ## ConfigMap with a custom provider file.
  ## Important to set the Path to "/opt/bitnami/grafana/dashboards"
  ## Evaluated as a template.
  configMapName:

## Create dashboards from a custom configMap that contains the file.
## They will be mounted by the default dashboard provider if it is enabled
## Use an array with the configMap names.
## Example:
## dashboardsConfigMaps:
##   - configMapName: mydashboard
##     fileName: mydashboard.json
##   - configMapName: myotherdashboard
##     fileName: myotherdashboard.json
##
dashboardsConfigMaps: []

## Create datasources from a custom secret
## The secret must contain the files
##
datasources:
  secretName:

## Number of grafana Pod replicas
##
replicaCount: 1

## Set up update strategy for Grafana installation. Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to makesure the pods is destroyed first.
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
## Example:
## updateStrategy:
##  type: RollingUpdate
##  rollingUpdate:
##    maxSurge: 25%
##    maxUnavailable: 25%
##
updateStrategy:
  type: RollingUpdate

## Use an alternate scheduler, e.g. "stork".
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
# schedulerName:

serviceAccount:
  ## Specifies whether a ServiceAccount should be created
  ##
  create: true
  ## The name of the ServiceAccount to use.
  ## If not set and create is true, a name is generated using the fullname template
  ##
  # name:
  ## Annotations to add to the ServiceAccount Metadata
  annotations: {}

## Pod annotations
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}

## 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: []

## Affinity for pod assignment
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
##
affinity: {}

## SecurityContext configuration
##
securityContext:
  enabled: true
  runAsUser: 1001
  fsGroup: 1001
  runAsNonRoot: true

## Grafana 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: 500m
  #   memory: 1Gi
  requests: {}
  #   cpu: 250m
  #   memory: 256Mi

## Grafana containers' liveness and readiness probes
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
livenessProbe:
  enabled: true
  initialDelaySeconds: 120
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 6
  successThreshold: 1
readinessProbe:
  enabled: true
  initialDelaySeconds: 30
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 6
  successThreshold: 1

## Enable persistence using Persistent Volume Claims
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
##
persistence:
  enabled: true
  ## Grafana 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: "-"
  ##
  ## If you want to reuse an existing claim, you can pass the name of the PVC using
  ## the existingClaim variable
  # existingClaim: your-claim
  accessMode: ReadWriteOnce
  size: 10Gi

## Add extra sidecars to the Grafana pod
## Example:
## sidecars:
##   - name: your-image-name
##     image: your-image
##     imagePullPolicy: Always
##     ports:
##       - name: portname
##         containerPort: 1234
##
sidecars: {}

## Add extra volumes to the Grafana pod
## Example:
## extraVolumes:
##   - name: my-volume
##     emptyDir: {}
extraVolumes: []

## Add extra volume mounts to the grafana pod
## Example:
## extraVolumeMounts:
##   - name: my-volume
##     mountPath: /opt/bitnami/grafana/my-stuff
extraVolumeMounts: []

## Service parameters
##
service:
  ## K8s service type
  ##
  type: ClusterIP
  ## Grafana service port
  ##
  port: 3000
  ## Specify the nodePort value for the LoadBalancer and NodePort service types.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
  ##
  # nodePort:
  ## loadBalancerIP for the Grafana Service (optional, cloud specific)
  ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
  ##
  # loadBalancerIP:
  ## loadBalancerSourceRanges for the Grafana Service (optional, cloud specific)
  ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
  ##
  # loadBalancerSourceRanges:
  #   - 10.10.10.0/24
  ## Provide any additional annotations which may be required. This can be used to
  ## set the LoadBalancer service type to internal only.
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
  ##
  annotations: {}

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

  ## 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: grafana.local
      paths: ["/"]

      ## Extra paths to prepend to every host configuration. This is useful when working with annotation based services.
      extraPaths: []
      # - path: /*
      #   backend:
      #     serviceName: ssl-redirect
      #     servicePort: use-annotation

      ## 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.grafana.local
      # - grafana.local

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

## Prometheus metrics
##
metrics:
  enabled: false

  ## Prometheus Operator ServiceMonitor configuration
  ##
  service:
    annotations:
      prometheus.io/scrape: "true"
      prometheus.io/port: "3000"
      prometheus.io/path: "/metrics"

  serviceMonitor:
    enabled: false
    ## Namespace in which Prometheus is running
    ##
    # namespace: monitoring

    ## Interval at which metrics should be scraped.
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ##
    # interval: 10s

    ## Timeout after which the scrape is ended
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ##
    # scrapeTimeout: 10s

    ## ServiceMonitor selector labels
    ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
    ##
    # selector:
    #   prometheus: my-prometheus

imageRenderer:
  enabled: false
  ## Bitnami Grafana Image Renderer image
  ## ref: https://hub.docker.com/r/bitnami/grafana-image-renderer/tags/
  ##
  image:
    registry: docker.io
    repository: bitnami/grafana-image-renderer
    tag: 2.0.0-debian-10-r98
    ## 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/
    ## Example:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
  ## Number of Grafana Image Renderer Pod replicas
  ##
  replicaCount: 1
  ## Pod annotations
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}
  ## 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: []
  ## Affinity for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}
  ## SecurityContext configuration
  ##
  securityContext:
    enabled: true
    runAsUser: 1001
    fsGroup: 1001
    runAsNonRoot: true
  service:
    ## Grafana Image Renderer metrics port
    ##
    port: 8080
  ## Enable Prometheus metrics endpoint
  ##
  metrics:
    enabled: false
    ## Prometheus annotations
    ##
    annotations:
      prometheus.io/scrape: "true"
      prometheus.io/port: "8080"
      prometheus.io/path: "/metrics"
    ## Prometheus Operator ServiceMonitor configuration
    ##
    serviceMonitor:
      enabled: false
      ## Namespace in which Prometheus is running
      ##
      # namespace: monitoring
      ## Interval at which metrics should be scraped.
      ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
      ##
      # interval: 10s
      ## Timeout after which the scrape is ended
      ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
      ##
      # scrapeTimeout: 10s
