# Copyright Broadcom, Inc. All Rights Reserved.
# SPDX-License-Identifier: APACHE-2.0

## @section Global parameters
## 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
##

## @param global.imageRegistry Global Docker image registry
## @param global.imagePullSecrets Global Docker registry secret names as an array
##
global:
  imageRegistry: ""
  ## E.g.
  ## imagePullSecrets:
  ##   - myRegistryKeySecretName
  ##
  imagePullSecrets: []
  ## Security parameters
  ##
  security:
    ## @param global.security.allowInsecureImages Allows skipping image verification
    allowInsecureImages: false
  ## Compatibility adaptations for Kubernetes platforms
  ##
  compatibility:
    ## Compatibility adaptations for Openshift
    ##
    openshift:
      ## @param global.compatibility.openshift.adaptSecurityContext Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation)
      ##
      adaptSecurityContext: disabled
## @section Common parameters
##

## @param kubeVersion Force target Kubernetes version (using Helm capabilities if not set)
##
kubeVersion: ""
## @param nameOverride String to partially override common.names.fullname template with a string (will prepend the release name)
##
nameOverride: ""
## @param fullnameOverride String to fully override common.names.fullname template with a string
##
fullnameOverride: ""
## @param namespaceOverride String to fully override common.names.namespace
##
namespaceOverride: ""
## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []
## @param commonLabels Common Labels which are applied to every resource deployed
##
commonLabels: {}
## @param commonAnnotations Common Annotations which are applied to every ressource deployed
##
commonAnnotations: {}
## @param clusterDomain Kubernetes cluster domain name
##
clusterDomain: cluster.local
## @section Grafana Operator parameters
##

## This contains all configuration options for the Grafana Operator.
## Ref: https://grafana.github.io/grafana-operator/docs/installation/helm/
## Constants it is using for creating instances:
## Ref: https://github.com/grafana/grafana-operator/blob/master/controllers/config/operator_constants.go
##
operator:
  ## @param operator.enabled Enable the deployment of the Grafana Operator
  ##
  enabled: true
  ## @param operator.command [array] Default container command (useful when using custom images)
  ##
  command: []
  ## @param operator.args [array] Default container args (useful when using custom images)
  ##
  args: []
  ## @param operator.schedulerName Alternative scheduler
  ##
  schedulerName: ""
  ## @param operator.lifecycleHooks for the grafana-operator container to automate configuration before or after startup
  ##
  lifecycleHooks: {}
  ## @param operator.replicaCount Number of grafana-operator Pod replicas
  ##
  replicaCount: 1
  ## @param operator.customLivenessProbe [object] Override default liveness probe
  ##
  customLivenessProbe: {}
  ## @param operator.customReadinessProbe [object] Override default readiness probe
  ##
  customReadinessProbe: {}
  ## @param operator.customStartupProbe [object] Override default startup probe
  ##
  customStartupProbe: {}
  ## @param operator.extraVolumes [array] Optionally specify extra list of additional volumes for Grafana Operator pods
  ##
  extraVolumes: []
  ## @param operator.extraVolumeMounts [array] Optionally specify extra list of additional volumeMounts for Grafana Operator container(s)
  ##
  extraVolumeMounts: []
  ## @param operator.initContainers [array] Add additional init containers to the Grafana Operator pods
  ## e.g:
  ## initContainers:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  initContainers: []
  ## Pod Disruption Budget configuration
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
  ## @param operator.pdb.create Enable/disable a Pod Disruption Budget creation
  ## @param operator.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
  ## @param operator.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `operator.pdb.minAvailable` and `operator.pdb.maxUnavailable` are empty.
  ##
  pdb:
    create: true
    minAvailable: ""
    maxUnavailable: ""
  ## @param operator.sidecars [array] Add additional sidecar containers to the Grafana Operator pods
  ## e.g:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: []
  ## @param operator.namespaceScope If the operator should run in namespace-scope mode or not,
  ## if true the operator will only be able to manage instances in the same namespace
  ##
  namespaceScope: false
  ## @param operator.watchNamespace Override the namespace to watch
  ##
  watchNamespace: ""
  ## @param operator.topologySpreadConstraints Topology Spread Constraints for pod assignment
  ## https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
  ## The value is evaluated as a template
  ##
  topologySpreadConstraints: []
  ## @param operator.priorityClassName %%MAIN_CONTAINER_NAME%% pods' priorityClassName
  ##
  priorityClassName: ""
  ## @param operator.terminationGracePeriodSeconds In seconds, time the given to the %%MAIN_CONTAINER_NAME%% pod needs to terminate gracefully
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
  ##
  terminationGracePeriodSeconds: ""
  ## @param operator.updateStrategy.type Set up update strategy for Grafana Operator installation.
  ## Set to Recreate if you use persistent volume that cannot be mounted by more than one pods to make sure 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: Recreate
  ## @param operator.image.registry [default: REGISTRY_NAME] Grafana Operator image registry
  ## @param operator.image.repository [default: REPOSITORY_NAME/grafana-operator] Grafana Operator image name
  ## @skip operator.image.tag Grafana Operator image tag
  ## @param operator.image.digest Grafana Operator image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
  ## @param operator.image.pullPolicy Grafana Operator image pull policy
  ## @param operator.image.pullSecrets Grafana Operator image pull secrets
  ##
  image:
    registry: docker.io
    repository: bitnami/grafana-operator
    tag: 5.19.4-debian-12-r2
    digest: ""
    ## Specify a imagePullPolicy
    ## Ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-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/
    ## e.g:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
  ## @param operator.leaderElect Enables or disables the operator leader Election.
  ## @param operator.zapDevel Enable zap development mode (changes defaults to console encoder, debug log level, disables sampling and stacktrace from 'warning' level)
  ## @param operator.zapEncoder Zap log encoding ('json' or 'console')
  ## @param operator.zapLevel Zap log level (one of 'debug', 'info', 'error' or any integer value > 0) (default info)
  ## @param operator.zapSample Enable zap log sampling. Sampling will be disabled for integer log levels > 1
  ## @param operator.zapStacktraceLevel Set the minimum log level that triggers stacktrace generation (default error)
  ## @param operator.zapTimeEncoding Sets the zap time format ('epoch', 'millis', 'nano', or 'iso8601') (default )
  ## @param operator.extraArgs Extra arguments for the grafana operator (Evaluated as a template)
  ##
  ## This enabled leader election for the operator and creates a Role for the leader election.
  ##
  leaderElect: true
  ## If one of these options is set a clusterRole and clusterRoleBinding is created to
  ## ensure that the operator is able to get data from other namespaces.
  ## The options are mutually exclusive.
  ##
  zapDevel: false
  zapEncoder: ""
  zapLevel: ""
  zapSample: ""
  zapStacktraceLevel: ""
  zapTimeEncoding: ""
  extraArgs: []
  ## @param operator.rbac.create Create specifies whether to install and use RBAC rules
  ##
  rbac:
    create: true
  serviceAccount:
    ## @param operator.serviceAccount.create Specifies whether a service account should be created
    ##
    create: true
    ## @param operator.serviceAccount.name The name of the service account to use. If not set and create is true, a name is generated using the fullname template
    ##
    name: ""
    ## @param operator.serviceAccount.annotations Add annotations
    ##
    annotations: {}
    ## @param operator.serviceAccount.automountServiceAccountToken Automount API credentials for a service account.
    ##
    automountServiceAccountToken: false
  ## Pod securityContext
  ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ## @param operator.podSecurityContext.enabled Enable pods security context
  ## @param operator.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
  ## @param operator.podSecurityContext.sysctls Set kernel settings using the sysctl interface
  ## @param operator.podSecurityContext.supplementalGroups Set filesystem extra groups
  ## @param operator.podSecurityContext.fsGroup Group ID for the pods
  ##
  podSecurityContext:
    enabled: true
    fsGroupChangePolicy: Always
    sysctls: []
    supplementalGroups: []
    fsGroup: 1001
  ## Container securityContext
  ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param operator.containerSecurityContext.enabled Enabled containers' Security Context
  ## @param operator.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
  ## @param operator.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
  ## @param operator.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
  ## @param operator.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
  ## @param operator.containerSecurityContext.privileged Set container's Security Context privileged
  ## @param operator.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
  ## @param operator.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
  ## @param operator.containerSecurityContext.capabilities.drop List of capabilities to be dropped
  ## @param operator.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
  ##
  containerSecurityContext:
    enabled: true
    seLinuxOptions: {}
    runAsUser: 1001
    runAsGroup: 1001
    runAsNonRoot: true
    privileged: false
    readOnlyRootFilesystem: true
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
    seccompProfile:
      type: "RuntimeDefault"
  ## @param operator.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if operator.resources is set (operator.resources is recommended for production).
  ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
  ##
  resourcesPreset: "nano"
  ## @param operator.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
  ## Example:
  ## resources:
  ##   requests:
  ##     cpu: 2
  ##     memory: 512Mi
  ##   limits:
  ##     cpu: 3
  ##     memory: 1024Mi
  ## 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
  ##
  resources: {}
  ## @param operator.containerPorts.metrics Grafana Operator container port (used for metrics)
  ## @param operator.containerPorts.health Grafana Operator container port (used for health probes)
  ##
  containerPorts:
    metrics: 8080
    health: 8081
  ## @param operator.automountServiceAccountToken Mount Service Account token in pod
  ##
  automountServiceAccountToken: true
  ## @param operator.hostAliases Add deployment host aliases
  ## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
  ##
  hostAliases: []
  ## @param operator.extraEnvVars Array with extra environment variables to add to RabbitMQ Cluster Operator nodes
  ## e.g:
  ## extraEnvVars:
  ##   - name: FOO
  ##     value: "bar"
  ##
  extraEnvVars: []
  ## @param operator.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for RabbitMQ Cluster Operator nodes
  ##
  extraEnvVarsCM: ""
  ## @param operator.extraEnvVarsSecret Name of existing Secret containing extra env vars for RabbitMQ Cluster Operator nodes
  ##
  extraEnvVarsSecret: ""
  ## @param operator.podAntiAffinityPreset Pod anti-affinity preset. Allowed values: `soft` or `hard`
  ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
  ##
  podAntiAffinityPreset: soft
  ## Node affinity preset
  ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
  ##
  nodeAffinityPreset:
    ## @param operator.nodeAffinityPreset.type Node affinity preset type. Allowed values: `soft` or `hard`
    ##
    type: ""
    ## @param operator.nodeAffinityPreset.key Set nodeAffinity preset key
    ## E.g.
    ## key: "kubernetes.io/e2e-az-name"
    ##
    key: ""
    ## @param operator.nodeAffinityPreset.values Set nodeAffinity preset values
    ## E.g.
    ## values:
    ##   - e2e-az1
    ##   - e2e-az2
    ##
    values: []
  ## @param operator.podAnnotations Pod annotations
  ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}
  ## @param operator.podLabels Additional pod labels
  ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}
  ## @param operator.nodeSelector Node labels for pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
  ##
  nodeSelector: {}
  ## @param operator.tolerations Tolerations for controller pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []
  ## @param operator.affinity Affinity for controller pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
  ##
  affinity: {}
  prometheus:
    ## Prometheus Operator service monitors
    ##
    serviceMonitor:
      ## @param operator.prometheus.serviceMonitor.enabled Specify if a ServiceMonitor will be deployed for prometheus-operator
      ##
      enabled: false
      ## @param operator.prometheus.serviceMonitor.namespace Namespace for the ServiceMonitor Resource (defaults to the Release Namespace)
      ##
      namespace: ""
      ## @param operator.prometheus.serviceMonitor.jobLabel Specify the jobLabel to use for the prometheus-operator
      ##
      jobLabel: app.kubernetes.io/name
      ## @param operator.prometheus.serviceMonitor.interval Scrape interval. If not set, the Prometheus default scrape interval is used
      ##
      interval: ""
      ## @param operator.prometheus.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
      ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
      ##
      scrapeTimeout: ""
      ## @param operator.prometheus.serviceMonitor.metricRelabelings Specify additional relabeling of metrics
      ##
      metricRelabelings: []
      ## @param operator.prometheus.serviceMonitor.relabelings Specify general relabeling
      ##
      relabelings: []
      ## @param operator.prometheus.serviceMonitor.selector ServiceMonitor selector labels
      ## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
      ##
      ## selector:
      ##   prometheus: my-prometheus
      ##
      selector: {}
      ## @param operator.prometheus.serviceMonitor.labels Extra labels for the ServiceMonitor
      ##
      labels: {}
      ## @param operator.prometheus.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
      ##
      honorLabels: false
  ## Liveness probe value
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
  ## @param operator.livenessProbe.enabled Enable livenessProbe
  ## @param operator.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  ## @param operator.livenessProbe.periodSeconds Period seconds for livenessProbe
  ## @param operator.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  ## @param operator.livenessProbe.failureThreshold Failure threshold for livenessProbe
  ## @param operator.livenessProbe.successThreshold Success threshold for livenessProbe
  ##
  livenessProbe:
    enabled: true
    failureThreshold: 3
    initialDelaySeconds: 10
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 1
  ## Readiness probe values
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
  ## @param operator.readinessProbe.enabled Enable readinessProbe
  ## @param operator.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  ## @param operator.readinessProbe.periodSeconds Period seconds for readinessProbe
  ## @param operator.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  ## @param operator.readinessProbe.failureThreshold Failure threshold for readinessProbe
  ## @param operator.readinessProbe.successThreshold Success threshold for readinessProbe
  ##
  readinessProbe:
    enabled: true
    failureThreshold: 3
    initialDelaySeconds: 10
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 1
  ## Startup probe values
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-startup-probes/#configure-probes
  ## @param operator.startupProbe.enabled Enable startupProbe
  ## @param operator.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  ## @param operator.startupProbe.periodSeconds Period seconds for startupProbe
  ## @param operator.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  ## @param operator.startupProbe.failureThreshold Failure threshold for startupProbe
  ## @param operator.startupProbe.successThreshold Success threshold for startupProbe
  ##
  startupProbe:
    enabled: true
    failureThreshold: 3
    initialDelaySeconds: 10
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 1
  ## Network Policies
  ## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
  ##
  networkPolicy:
    ## @param operator.networkPolicy.enabled Specifies whether a NetworkPolicy should be created
    ##
    enabled: true
    ## @param operator.networkPolicy.allowExternal Don't require server label for connections
    ## The Policy model to apply. When set to false, only pods with the correct
    ## server label will have network access to the ports server is listening
    ## on. When true, server will accept connections from any source
    ## (with the correct destination port).
    ##
    allowExternal: true
    ## @param operator.networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
    ##
    allowExternalEgress: true
    ## @param operator.networkPolicy.kubeAPIServerPorts [array] List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security)
    ##
    kubeAPIServerPorts: [443, 6443, 8443]
    ## @param operator.networkPolicy.extraIngress [array] Add extra ingress rules to the NetworkPolicy
    ## e.g:
    ## extraIngress:
    ##   - ports:
    ##       - port: 1234
    ##     from:
    ##       - podSelector:
    ##           - matchLabels:
    ##               - role: frontend
    ##       - podSelector:
    ##           - matchExpressions:
    ##               - key: role
    ##                 operator: In
    ##                 values:
    ##                   - frontend
    extraIngress: []
    ## @param operator.networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy
    ## e.g:
    ## extraEgress:
    ##   - ports:
    ##       - port: 1234
    ##     to:
    ##       - podSelector:
    ##           - matchLabels:
    ##               - role: frontend
    ##       - podSelector:
    ##           - matchExpressions:
    ##               - key: role
    ##                 operator: In
    ##                 values:
    ##                   - frontend
    ##
    extraEgress: []
    ## @param operator.networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces
    ## @param operator.networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces
    ##
    ingressNSMatchLabels: {}
    ingressNSPodMatchLabels: {}
## @section Grafana parameters
##
grafana:
  ## @param grafana.enabled Enabled the deployment of the Grafana CRD object into the cluster
  ##
  enabled: true
  ## @param grafana.image.registry [default: REGISTRY_NAME] Grafana image registry
  ## @param grafana.image.repository [default: REPOSITORY_NAME/grafana] Grafana image name
  ## @skip grafana.image.tag Grafana image tag
  ## @param grafana.image.digest Grafana image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag
  ## @param grafana.image.pullPolicy Grafana image pull policy
  ## @param grafana.image.pullSecrets Grafana image pull secrets
  ##
  image:
    registry: docker.io
    repository: bitnami/grafana
    tag: 12.1.1-debian-12-r1
    digest: ""
    ## Specify a imagePullPolicy
    ## Ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-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/
    ## e.g:
    ## pullSecrets:
    ##   - myRegistryKeySecretName
    ##
    pullSecrets: []
  ## @param grafana.serviceAccount Additional service account configuration
  ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-serviceaccount
  ## e.g:
  ## serviceAccount:
  ##   annotations:
  ##     iam.gke.io/gcp-service-account: "grafana@preprodz.iam.gserviceaccount.com"
  ##
  serviceAccount: {}
  ## @param grafana.podLabels Additional pod labels to pods in the grafana deployment
  ## Ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}
  ## @param grafana.podAnnotations Additional pod annotations to pods in the grafana deployment
  ## Ref https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}
  ## Pod securityContext
  ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ## @param grafana.podSecurityContext.enabled Enable pods security context
  ## @param grafana.podSecurityContext.fsGroupChangePolicy Set filesystem group change policy
  ## @param grafana.podSecurityContext.sysctls Set kernel settings using the sysctl interface
  ## @param grafana.podSecurityContext.supplementalGroups Set filesystem extra groups
  ## @param grafana.podSecurityContext.fsGroup Group ID for the pods
  ##
  podSecurityContext:
    enabled: true
    fsGroupChangePolicy: Always
    sysctls: []
    supplementalGroups: []
    fsGroup: 1001
  ## Container securityContext
  ## Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param grafana.containerSecurityContext.enabled Enabled containers' Security Context
  ## @param grafana.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
  ## @param grafana.containerSecurityContext.runAsUser Set containers' Security Context runAsUser
  ## @param grafana.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
  ## @param grafana.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup
  ## @param grafana.containerSecurityContext.runAsNonRoot Set container's Security Context runAsNonRoot
  ## @param grafana.containerSecurityContext.privileged Set container's Security Context privileged
  ## @param grafana.containerSecurityContext.readOnlyRootFilesystem Set container's Security Context readOnlyRootFilesystem
  ## @param grafana.containerSecurityContext.allowPrivilegeEscalation Set container's Security Context allowPrivilegeEscalation
  ## @param grafana.containerSecurityContext.capabilities.drop List of capabilities to be dropped
  ## @param grafana.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile
  ##
  containerSecurityContext:
    enabled: true
    seLinuxOptions: {}
    runAsUser: 1001
    runAsGroup: 0
    runAsNonRoot: true
    privileged: false
    readOnlyRootFilesystem: false
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
    seccompProfile:
      type: "RuntimeDefault"
  ## Grafana containers' resource requests and limits
  ## ref: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  ## 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:'.
  ## @param grafana.resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if grafana.resources is set (grafana.resources is recommended for production).
  ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
  ##
  resourcesPreset: "none"
  ## @param grafana.resources Set container requests and limits for different resources like CPU or memory (essential for production workloads)
  ## Example:
  ## resources:
  ##   requests:
  ##     cpu: 2
  ##     memory: 512Mi
  ##   limits:
  ##     cpu: 3
  ##     memory: 1024Mi
  ##
  resources: {}
  ## @param grafana.replicaCount Specify the amount of replicas running
  ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-deployment
  ## NOTE: Number of replicas. If more than one is selected, a shared database should be configured.
  ##
  replicaCount: 1
  ## @param grafana.podAffinityPreset 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: ""
  ## @param grafana.podAntiAffinityPreset 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:
    ## @param grafana.nodeAffinityPreset.type Set nodeAffinity preset type
    ## Allowed values: soft, hard
    ##
    type: ""
    ## @param grafana.nodeAffinityPreset.key Set nodeAffinity preset key
    ## E.g.
    ## key: "kubernetes.io/e2e-az-name"
    ##
    key: ""
    ## @param grafana.nodeAffinityPreset.values Set nodeAffinity preset values
    ## E.g.
    ## values:
    ##   - e2e-az1
    ##   - e2e-az2
    ##
    values: []
  ## @param grafana.affinity Affinity for controller 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: {}
  ## @param grafana.nodeSelector Node labels for controller pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
  ##
  nodeSelector: {}
  ## @param grafana.tolerations Tolerations for controller pod assignment
  ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []
  ## Pod Disruption Budget configuration for the grafana instance
  ## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
  ## @param grafana.pdb.create Enable/disable a Pod Disruption Budget creation
  ## @param grafana.pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
  ## @param grafana.pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `grafana.pdb.minAvailable` and `grafana.pdb.maxUnavailable` are empty.
  ##
  pdb:
    create: false
    minAvailable: ""
    maxUnavailable: ""
  ## @param grafana.extraEnvVars Array containing extra env vars to configure Grafana
  ## For example:
  ## extraEnvVars:
  ##  - name: MY_ENV
  ##    value: my-env-value
  ##
  extraEnvVars: []
  ## @param grafana.envFrom Extra environment variable to pass to the running container
  ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-deployment
  ## e.g:
  ## envFrom:
  ## - configMapRef:
  ##     name: grafana-configmap
  ## - secretRef:
  ##     name: grafana-secrets
  ##
  envFrom: []
  ## The grafana-operator client-configuration for this grafana instance
  ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-grafana-api-access
  ## @param grafana.client.timeout The timeout in seconds for the Grafana Rest API on that instance
  ##
  client:
    timeout: 5
  ## @param grafana.labels Add additional labels to the grafana deployment, service and ingress resources
  ##
  labels: {}
  ## Configure the Service resource
  ## Ref: https://github.com/grafana-operator/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-service
  ##
  service:
    ## @param grafana.service.type Kubernetes Service type
    ##
    type: ClusterIP
    ## @param grafana.service.annotations Additional custom annotations for Grafana service
    ##
    annotations: {}
    ## @param grafana.service.extraPorts Extra ports to expose in the Grafana service
    ## extraPorts:
    ##   - name: grafana-proxy
    ##     port: 9091
    ##     protocol: TCP
    ##     targetPort: grafana-http
    extraPorts: []
  ##
  ## Configure the ingress resource that allows you to access the
  ## Grafana web. Set up the URL
  ## Ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
  ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-ingress-or-route
  ##
  ingress:
    ## @param grafana.ingress.enabled If an ingress or OpenShift Route should be created
    ##
    enabled: false
    ## @param grafana.ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
    ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster.
    ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
    ##
    ingressClassName: ""
    ## @param grafana.ingress.host The host under which the grafana instance should be reachable. If empty the parameter will not be set.
    ##
    host: grafana.local
    ## @param grafana.ingress.path The path for the ingress instance to forward to the grafana app
    ##
    path: /
    ## @param grafana.ingress.pathType The pathType for the ingress instance to forward to the grafana app
    ##
    pathType: ImplementationSpecific
    ## @param grafana.ingress.labels Additional Labels for the ingress resource
    ##
    labels: {}
    ## @param grafana.ingress.annotations Additional Annotations for the ingress resource
    ## For a full list of possible ingress annotations, please see
    ## Ref: https://github.com/kubernetes/ingress-nginx/blob/main/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
    ##
    annotations: {}
    ## @param grafana.ingress.tls This enables tls support for the ingress resource
    ##
    tls: false
    ## @param grafana.ingress.tlsSecret The name for the secret to use for the tls termination
    ##
    tlsSecret: grafana.local-tls
  ## Enable persistence using Persistent Volume Claims
  ## Ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
  ##
  persistence:
    ## @param grafana.persistence.enabled Enable persistent storage for the grafana deployment
    ## NOTE: In order to avoid deployment failure due to multi-attach of the same volume,
    ## you might also want to set `grafana.updateStrategy` to Recreate.
    ## More information can be found here: https://github.com/grafana-operator/grafana-operator/issues/453
    ##
    enabled: false
    ## @param grafana.persistence.storageClass Define the storageClass for the persistent storage if not defined default is used
    ## 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: ""
    ## @param grafana.persistence.existingVolume Define the existingVolume for the persistent storage provisioned outside this chart
    ## https://github.com/grafana-operator/grafana-operator/blob/master/deploy/examppersistentvolume/Grafana-existingVolume.yaml
    existingVolume: ""
    ## @param grafana.persistence.accessModes Define the accessModes for the persistent storage
    ##
    accessModes:
      - ReadWriteOnce
    ## @param grafana.persistence.annotations Add annotations to the persistent volume
    ##
    annotations: {}
    ## @param grafana.persistence.size Define the size of the PersistentVolumeClaim to request for
    ##
    size: 10Gi
  ## @param grafana.config [object] grafana.ini configuration for the instance for this to configure please look at upstream docs
  ## This is the configuration from the grafana pod itself. Every toml section is a root key
  ## Ref: https://grafana.com/docs/grafana/latest/administration/configuration/
  ##
  config:
    server:
      root_url: |-
        {{- if .Values.grafana.ingress.enabled }}
        {{ if .Values.grafana.ingress.tls }}https{{ else }}http{{ end }}://{{ include "common.tplvalues.render" (dict "value" .Values.grafana.ingress.host "context" $) }}
        {{- else }}
        http://localhost:3000
        {{- end }}
    log:
      mode: "console"
      level: "warn"
    database:
      wal: "true"
    analytics:
      reporting_enabled: "false"
      check_for_updates: "false"
    security:
      # ## Grafana Admin credentials, if omitted they will be admin:<random_pass>
      # admin_user:
      # admin_password:
      disable_gravatar: "false"

    # ## OIDC configuration (all auth sections should be under config, not security)
    # ##
    # auth:
    #   disable_login_form: "false"
    #   disable_signout_menu: "false"
    # auth.generic_oauth:
    #   enabled: "true"
    #   client_id: grafana
    #   client_secret: a391df94-dd1f-46d6-b3ab-60e90f23e8a2
    #   scopes: profile email
    #   auth_url: https://keycloak.example.com/auth/realms/master/protocol/openid-connect/auth
    #   token_url: https://keycloak.example.com/auth/realms/master/protocol/openid-connect/token
    #   api_url: https://keycloak.example.com/auth/realms/master/protocol/openid-connect/userinfo
    #   ## Automatic role handling with OIDC
    #   ##
    #   # role_attribute_path: contains(groups[*], 'platform-readonly') && 'Viewer' || contains(groups[*], 'platform-admin') && 'Admin' || contains(groups[*], 'platform-emergency') && 'Admin' || contains(groups[*], 'customer-poweruser') && 'Admin' || contains(groups[*], 'customer-collaborator') && 'Editor' || contains(groups[*], 'customer-readonly') && 'Viewer'
    #   # allowed_domains: example.com
    #   allow_sign_up: "True"

  ## @param grafana.jsonnetLibrarySelector [object] Configuring the read for jsonnetLibraries to pull in.
  ## Ref: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#jsonnet-library-discovery
  ##
  jsonnetLibrarySelector:
    matchLabels:
      app.kubernetes.io/instance: "{{ .Release.Name }}"
  ## Grafana containers' liveness probe
  ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ## @param grafana.livenessProbe.enabled Enable livenessProbe
  ## @param grafana.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  ## @param grafana.livenessProbe.periodSeconds Period seconds for livenessProbe
  ## @param grafana.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  ## @param grafana.livenessProbe.failureThreshold Failure threshold for livenessProbe
  ## @param grafana.livenessProbe.successThreshold Success threshold for livenessProbe
  ##
  livenessProbe:
    enabled: true
    initialDelaySeconds: 120
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 6
    successThreshold: 1
  ## Grafana containers' readiness probe
  ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ## @param grafana.readinessProbe.enabled Enable readinessProbe
  ## @param grafana.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  ## @param grafana.readinessProbe.periodSeconds Period seconds for readinessProbe
  ## @param grafana.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  ## @param grafana.readinessProbe.failureThreshold Failure threshold for readinessProbe
  ## @param grafana.readinessProbe.successThreshold Success threshold for readinessProbe
  ##
  readinessProbe:
    enabled: true
    initialDelaySeconds: 30
    periodSeconds: 10
    timeoutSeconds: 5
    failureThreshold: 6
    successThreshold: 1
  ## @param grafana.updateStrategy 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 make sure 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: {}
  ## @param grafana.extraVolumes Optionally specify extra list of additional volumes for the grafana pod(s)
  ##
  extraVolumes: []
  ## @param grafana.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the grafana container
  ##
  extraVolumeMounts: []
  ## @param grafana.secrets Optionally specify a list of secrets to be mounted to the grafana pod(s)
  ##
  secrets: []
  ## @param grafana.sidecars Add additional sidecar containers to the grafana pod(s)
  ## e.g:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: []
