# 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
## @param global.defaultStorageClass Global default StorageClass for Persistent Volume(s)
##
global:
  imageRegistry: ""
  ## e.g:
  ## imagePullSecrets:
  ##   - myRegistryKeySecretName
  ##
  imagePullSecrets: []
  defaultStorageClass: ""
  ## 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: auto
    ## @param global.compatibility.omitEmptySeLinuxOptions If set to true, removes the seLinuxOptions from the securityContexts when it is set to an empty object
    ##
    omitEmptySeLinuxOptions: false

## @section Common parameters
##
## @param resourceType Type of controller to use for deploying Grafana Alloy in the cluster.
## Must be one of 'daemonset', 'deployment', or 'statefulset'.
##
resourceType: 'daemonset'
## @param replicaCount Number of pods to deploy. Ignored when resourceType is 'daemonset'.
##
replicaCount: 1
## @param kubeVersion Override Kubernetes version
##
kubeVersion: ""
## @param apiVersions Override Kubernetes API versions reported by .Capabilities
##
apiVersions: []
## @param nameOverride String to partially override common.names.name
##
nameOverride: ""
## @param fullnameOverride String to fully override common.names.fullname
##
fullnameOverride: ""
## @param namespaceOverride String to fully override common.names.namespace
##
namespaceOverride: ""
## @param commonLabels Labels to add to all deployed objects
##
commonLabels: {}
## @param commonAnnotations Annotations to add to all deployed objects
##
commonAnnotations: {}
## @param clusterDomain Kubernetes cluster domain name
##
clusterDomain: cluster.local
## @param extraDeploy Array of extra objects to deploy with the release
##
extraDeploy: []
## Diagnostic mode
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
## @param diagnosticMode.command Command to override all containers in the chart release
## @param diagnosticMode.args Args to override all containers in the chart release
##
diagnosticMode:
  enabled: false
  command:
    - sleep
  args:
    - infinity

## Configure Pods Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
## @param podSecurityContext.enabled Enable Grafana Alloy pods' Security Context
## @param podSecurityContext.fsGroupChangePolicy Set filesystem group change policy for Grafana Alloy pods
## @param podSecurityContext.sysctls Set kernel settings using the sysctl interface for Grafana Alloy pods
## @param podSecurityContext.supplementalGroups Set filesystem extra groups for Grafana Alloy pods
## @param podSecurityContext.fsGroup Set fsGroup in Grafana Alloy pods' Security Context
##
podSecurityContext:
  enabled: true
  fsGroupChangePolicy: Always
  sysctls: []
  supplementalGroups: []
  fsGroup: 1001
## @param hostAliases Grafana Alloy pods host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## @param controllerAnnotations Annotations for Grafana Alloy controller
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
controllerAnnotations: {}
## @param podLabels Extra labels for Grafana Alloy pods
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
##
podLabels: {}
## @param podAnnotations Annotations for Grafana Alloy pods
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations: {}
## @param podAffinityPreset Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
##
podAffinityPreset: ""
## @param podAntiAffinityPreset Pod anti-affinity preset. Ignored if `affinity` is set. 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 nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
  ##
  type: ""
  ## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set
  ##
  key: ""
  ## @param nodeAffinityPreset.values Node label values to match. Ignored if `affinity` is set
  ## E.g.
  ## values:
  ##   - e2e-az1
  ##   - e2e-az2
  ##
  values: []
## @param affinity Affinity for Grafana Alloy pods 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 nodeSelector Node labels for Grafana Alloy pods assignment
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
##
nodeSelector: {}
## @param tolerations Tolerations for Grafana Alloy pods assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
##
tolerations: []
## ONLY FOR DAEMONSETS:
## @param updateStrategy.type Grafana Alloy daemonset strategy type
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/#updating-a-daemonset
## ONLY FOR DEPLOYMENTS:
## @param updateStrategy.type Grafana Alloy deployment strategy type
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
## ONLY FOR STATEFULSETS:
## @param updateStrategy.type Grafana Alloy statefulset strategy type
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
##
updateStrategy:
  ## ONLY FOR DAEMONSETS:
  ## Can be set to RollingUpdate or OnDelete
  ## ONLY FOR DEPLOYMENTS:
  ## Can be set to RollingUpdate or Recreate
  ## ONLY FOR STATEFULSETS:
  ## Can be set to RollingUpdate or OnDelete
  ##
  type: RollingUpdate
## ONLY FOR STATEFULSETS:
## @param podManagementPolicy Pod management policy for Grafana Alloy statefulset
## Ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies
##
podManagementPolicy: OrderedReady
## @param priorityClassName Grafana Alloy pods' priorityClassName
##
priorityClassName: ""
## @param topologySpreadConstraints Topology Spread Constraints for Grafana Alloy pod assignment spread across your cluster among failure-domains
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
##
topologySpreadConstraints: []
## @param schedulerName Name of the k8s scheduler (other than default) for Grafana Alloy pods
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
schedulerName: ""
## @param terminationGracePeriodSeconds Seconds Grafana Alloy pods need to terminate gracefully
## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods
##
terminationGracePeriodSeconds: ""
## @param sidecars Add additional sidecar containers to the Grafana Alloy pods
## e.g:
## sidecars:
##   - name: your-image-name
##     image: your-image
##     imagePullPolicy: Always
##     ports:
##       - name: portname
##         containerPort: 1234
##
sidecars: []
## @param initContainers Add additional init containers to the Grafana Alloy pods
## ref: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
## e.g:
## initContainers:
##  - name: your-image-name
##    image: your-image
##    imagePullPolicy: Always
##    command: ['sh', '-c', 'echo "hello world"']
##
initContainers: []
## @param extraVolumes Optionally specify extra list of additional volumes for the Grafana Alloy pods
##
extraVolumes: []
## Pod Disruption Budget configuration
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
## @param pdb.create Enable/disable a Pod Disruption Budget creation
## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty.
##
pdb:
  create: true
  minAvailable: ""
  maxUnavailable: ""
## Autoscaling configuration
## ref: https://kubernetes.io/docs/concepts/workloads/autoscaling/
##
autoscaling:
  ## @param autoscaling.vpa.enabled Enable VPA for Grafana Alloy pods
  ## @param autoscaling.vpa.annotations Annotations for VPA resource
  ## @param autoscaling.vpa.controlledResources VPA List of resources that the vertical pod autoscaler can control. Defaults to cpu and memory
  ## @param autoscaling.vpa.maxAllowed VPA Max allowed resources for the pod
  ## @param autoscaling.vpa.minAllowed VPA Min allowed resources for the pod
  ##
  vpa:
    enabled: false
    annotations: {}
    controlledResources: []
    maxAllowed: {}
    minAllowed: {}
    ## @param autoscaling.vpa.updatePolicy.updateMode Autoscaling update policy
    ## Specifies whether recommended updates are applied when a Pod is started and whether recommended updates are applied during the life of a Pod
    ## Possible values are "Off", "Initial", "Recreate", and "Auto".
    ##
    updatePolicy:
      updateMode: Auto
  ## @param autoscaling.hpa.enabled Enable HPA for Grafana Alloy pods
  ## @param autoscaling.hpa.minReplicas Minimum number of replicas
  ## @param autoscaling.hpa.maxReplicas Maximum number of replicas
  ## @param autoscaling.hpa.targetCPU Target CPU utilization percentage
  ## @param autoscaling.hpa.targetMemory Target Memory utilization percentage
  ##
  hpa:
    enabled: false
    minReplicas: ""
    maxReplicas: ""
    targetCPU: ""
    targetMemory: ""

## @section Grafana Alloy parameters

alloy:
## Bitnami Grafana Alloy image version
## ref: https://hub.docker.com/r/bitnami/grafana-alloy/tags/
## @param alloy.image.registry [default: REGISTRY_NAME] Grafana Alloy image registry
## @param alloy.image.repository [default: REPOSITORY_NAME/grafana-alloy] Grafana Alloy image repository
## @skip alloy.image.tag Grafana Alloy image tag (immutable tags are recommended)
## @param alloy.image.pullPolicy Grafana Alloy image pull policy
## @param alloy.image.pullSecrets Grafana Alloy image pull secrets
##
  image:
    registry: docker.io
    repository: bitnami/grafana-alloy
    tag: 1.10.2-debian-12-r0
    ## Specify a imagePullPolicy
    ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
    ## 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 alloy.containerPorts.http Grafana Alloy HTTP container port
  ##
  containerPorts:
    http: 8080
  ## @param alloy.extraContainerPorts Optionally specify extra list of additional ports for Grafana Alloy containers
  ## e.g:
  ## extraContainerPorts:
  ##   - name: myservice
  ##     containerPort: 9090
  ##
  extraContainerPorts: []
  ## @param alloy.existingSecret The name of an existing Secret with your custom configuration for Grafana Alloy
  ##
  existingSecret: ""
  ## @param alloy.configuration Specify content for Grafana Alloy config file. Omitted if alloy.existingSecret is provided.
  ## e.g:
  ## configuration: |-
  ##   ...
  ##
  configuration: ""
  ## @param alloy.extraConfig Append extra configuration to the default config file
  ##
  extraConfig: ""
  ## @param alloy.clustering.enabled Deploy Grafana Alloy in a cluster to allow for load distribution.
  ## @param alloy.clustering.name Name for the Grafana Alloy cluster. Used for differentiating between clusters.
  ## @param alloy.clustering.portName Name for the port used for clustering, useful if running inside an Istio Mesh
  ##
  clustering:
    enabled: false
    name: ""
    portName: http

  ## @param alloy.stabilityLevel Minimum stability level of components and behavior to enable. Must be
  ##  one of "experimental", "public-preview", or "generally-available".
  stabilityLevel: "generally-available"

  ## @param alloy.listenAddr Address to listen for traffic on. 0.0.0.0 exposes the UI to other containers.
  listenAddr: 0.0.0.0

  ## @param alloy.uiPathPrefix Base path where the UI is exposed.
  uiPathPrefix: /

  ## @param alloy.storagePath Path to where Grafana Alloy stores data (for example, the Write-Ahead Log).
  storagePath: /tmp/alloy

  ## @param alloy.enableReporting Enables sending Grafana Labs anonymous usage stats to help improve Grafana Alloy.
  enableReporting: true

  ## @param alloy.command Override default Grafana Alloy container command (useful when using custom images)
  ##
  command: []
  ## @param alloy.args Override default Grafana Alloy container args (useful when using custom images)
  ##
  args: []
  ## @param alloy.mounts.varlog Mount /var/log from the host into the container for log collection.
  ## @param alloy.mounts.dockercontainers Mount /var/lib/docker/containers from the host into the container for log
  ##
  mounts:
    varlog: true
    dockercontainers: true
  ## Configure extra options for Grafana Alloy containers' startup, liveness and readiness probes
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
  ## @param alloy.startupProbe.enabled Enable startupProbe on Grafana Alloy containers
  ## @param alloy.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  ## @param alloy.startupProbe.periodSeconds Period seconds for startupProbe
  ## @param alloy.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  ## @param alloy.startupProbe.failureThreshold Failure threshold for startupProbe
  ## @param alloy.startupProbe.successThreshold Success threshold for startupProbe
  ##
  startupProbe:
    enabled: false
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 2
    failureThreshold: 3
    successThreshold: 1
  ## @param alloy.livenessProbe.enabled Enable livenessProbe on Grafana Alloy containers
  ## @param alloy.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  ## @param alloy.livenessProbe.periodSeconds Period seconds for livenessProbe
  ## @param alloy.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  ## @param alloy.livenessProbe.failureThreshold Failure threshold for livenessProbe
  ## @param alloy.livenessProbe.successThreshold Success threshold for livenessProbe
  ##
  livenessProbe:
    enabled: true
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 2
    failureThreshold: 3
    successThreshold: 1
  ## @param alloy.readinessProbe.enabled Enable readinessProbe on Grafana Alloy containers
  ## @param alloy.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  ## @param alloy.readinessProbe.periodSeconds Period seconds for readinessProbe
  ## @param alloy.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  ## @param alloy.readinessProbe.failureThreshold Failure threshold for readinessProbe
  ## @param alloy.readinessProbe.successThreshold Success threshold for readinessProbe
  ##
  readinessProbe:
    enabled: true
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 2
    failureThreshold: 3
    successThreshold: 1
  ## @param alloy.customLivenessProbe Custom livenessProbe that overrides the default one
  ##
  customLivenessProbe: {}
  ## @param alloy.customReadinessProbe Custom readinessProbe that overrides the default one
  ##
  customReadinessProbe: {}
  ## @param alloy.customStartupProbe Custom startupProbe that overrides the default one
  ##
  customStartupProbe: {}
  ## Grafana Alloy resource requests and limits
  ## ref: http://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  ## @param alloy.resourcesPreset Set Grafana Alloy container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if alloy.resources is set (alloy.resources is recommended for production).
  ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
  ##
  resourcesPreset: "nano"
  ## @param alloy.resources Set Grafana Alloy 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: {}
  ## Configure Container Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param alloy.containerSecurityContext.enabled Enabled Grafana Alloy container's Security Context
  ## @param alloy.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in Grafana Alloy container
  ## @param alloy.containerSecurityContext.runAsUser Set runAsUser in Grafana Alloy container's Security Context
  ## @param alloy.containerSecurityContext.runAsGroup Group ID for Grafana Alloy's containers
  ## @param alloy.containerSecurityContext.runAsNonRoot Set runAsNonRoot in Grafana Alloy container's Security Context
  ## @param alloy.containerSecurityContext.readOnlyRootFilesystem Set readOnlyRootFilesystem in Grafana Alloy container's Security Context
  ## @param alloy.containerSecurityContext.privileged Set privileged in Grafana Alloy container's Security Context
  ## @param alloy.containerSecurityContext.allowPrivilegeEscalation Set allowPrivilegeEscalation in Grafana Alloy container's Security Context
  ## @param alloy.containerSecurityContext.capabilities.drop List of capabilities to be dropped in Grafana Alloy container
  ## @param alloy.containerSecurityContext.seccompProfile.type Set seccomp profile in Grafana Alloy container
  ##
  containerSecurityContext:
    enabled: true
    seLinuxOptions: {}
    runAsUser: 1001
    runAsGroup: 1001
    runAsNonRoot: true
    readOnlyRootFilesystem: true
    privileged: false
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
    seccompProfile:
      type: "RuntimeDefault"
  ## @param alloy.lifecycleHooks for Grafana Alloy containers to automate configuration before or after startup
  ##
  lifecycleHooks: {}
  ## @param alloy.extraEnvVars Array with extra environment variables to add to Grafana Alloy containers
  ## e.g:
  ## extraEnvVars:
  ##   - name: FOO
  ##     value: "bar"
  ##
  extraEnvVars: []
  ## @param alloy.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Grafana Alloy containers
  ##
  extraEnvVarsCM: ""
  ## @param alloy.extraEnvVarsSecret Name of existing Secret containing extra env vars for Grafana Alloy containers
  ##
  extraEnvVarsSecret: ""
  ## @param alloy.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Grafana Alloy containers
  ##
  extraVolumeMounts: []

## @section ConfigMap Reload parameters

configReloader:
  ## @param configReloader.enabled Enables automatically reloading when the Grafana Alloy config changes.
  enabled: true
  ## Bitnami ConfigMap Reload image version
  ## ref: https://hub.docker.com/r/bitnami/configmap-reload/tags/
  ## @param configReloader.image.registry [default: REGISTRY_NAME] ConfigMap Reload image registry
  ## @param configReloader.image.repository [default: REPOSITORY_NAME/grafana-configmap-reload] ConfigMap Reload image repository
  ## @skip configReloader.image.tag ConfigMap Reload image tag (immutable tags are recommended)
  ## @param configReloader.image.pullPolicy ConfigMap Reload image pull policy
  ## @param configReloader.image.pullSecrets ConfigMap Reload image pull secrets
  ##
  image:
    registry: docker.io
    repository: bitnami/configmap-reload
    tag: 0.15.0-debian-12-r12
    ## Specify a imagePullPolicy
    ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
    ## 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 configReloader.containerPorts.http ConfigMap Reload HTTP container port
  ##
  containerPorts:
    http: 9533
  ## @param configReloader.extraContainerPorts Optionally specify extra list of additional ports for ConfigMap Reload containers
  ## e.g:
  ## extraContainerPorts:
  ##   - name: myservice
  ##     containerPort: 9090
  ##
  extraContainerPorts: []

  ## Configure extra options for ConfigMap Reload containers' startup, liveness and readiness probes
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
  ## @param configReloader.startupProbe.enabled Enable startupProbe on ConfigMap Reload containers
  ## @param configReloader.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
  ## @param configReloader.startupProbe.periodSeconds Period seconds for startupProbe
  ## @param configReloader.startupProbe.timeoutSeconds Timeout seconds for startupProbe
  ## @param configReloader.startupProbe.failureThreshold Failure threshold for startupProbe
  ## @param configReloader.startupProbe.successThreshold Success threshold for startupProbe
  ##
  startupProbe:
    enabled: false
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 2
    failureThreshold: 3
    successThreshold: 1
  ## @param configReloader.livenessProbe.enabled Enable livenessProbe on ConfigMap Reload containers
  ## @param configReloader.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
  ## @param configReloader.livenessProbe.periodSeconds Period seconds for livenessProbe
  ## @param configReloader.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
  ## @param configReloader.livenessProbe.failureThreshold Failure threshold for livenessProbe
  ## @param configReloader.livenessProbe.successThreshold Success threshold for livenessProbe
  ##
  livenessProbe:
    enabled: true
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 2
    failureThreshold: 3
    successThreshold: 1
  ## @param configReloader.readinessProbe.enabled Enable readinessProbe on ConfigMap Reload containers
  ## @param configReloader.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
  ## @param configReloader.readinessProbe.periodSeconds Period seconds for readinessProbe
  ## @param configReloader.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
  ## @param configReloader.readinessProbe.failureThreshold Failure threshold for readinessProbe
  ## @param configReloader.readinessProbe.successThreshold Success threshold for readinessProbe
  ##
  readinessProbe:
    enabled: true
    initialDelaySeconds: 30
    periodSeconds: 30
    timeoutSeconds: 2
    failureThreshold: 3
    successThreshold: 1
  ## @param configReloader.customLivenessProbe Custom livenessProbe that overrides the default one
  ##
  customLivenessProbe: {}
  ## @param configReloader.customReadinessProbe Custom readinessProbe that overrides the default one
  ##
  customReadinessProbe: {}
  ## @param configReloader.customStartupProbe Custom startupProbe that overrides the default one
  ##
  customStartupProbe: {}
  ## Grafana ConfigMap Reload resource requests and limits
  ## ref: http://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
  ## @param configReloader.resourcesPreset Set ConfigMap Reload container resources according to one common preset (allowed values: none, nano, small, medium, large, xlarge, 2xlarge). This is ignored if configReloader.resources is set (configReloader.resources is recommended for production).
  ## More information: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15
  ##
  resourcesPreset: "nano"
  ## @param configReloader.resources Set ConfigMap Reload 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: {}
  ## Configure Container Security Context
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
  ## @param configReloader.containerSecurityContext.enabled Enabled ConfigMap Reload container's Security Context
  ## @param configReloader.containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in ConfigMap Reload container
  ## @param configReloader.containerSecurityContext.runAsUser Set runAsUser in ConfigMap Reload container's Security Context
  ## @param configReloader.containerSecurityContext.runAsGroup Group ID for ConfigMap Reload's containers
  ## @param configReloader.containerSecurityContext.runAsNonRoot Set runAsNonRoot in ConfigMap Reload container's Security Context
  ## @param configReloader.containerSecurityContext.readOnlyRootFilesystem Set readOnlyRootFilesystem in ConfigMap Reload container's Security Context
  ## @param configReloader.containerSecurityContext.privileged Set privileged inConfigMap Reload container's Security Context
  ## @param configReloader.containerSecurityContext.allowPrivilegeEscalation Set allowPrivilegeEscalation in ConfigMap Reload container's Security Context
  ## @param configReloader.containerSecurityContext.capabilities.drop List of capabilities to be dropped in ConfigMap Reload container
  ## @param configReloader.containerSecurityContext.seccompProfile.type Set seccomp profile in ConfigMap Reload container
  ##
  containerSecurityContext:
    enabled: true
    seLinuxOptions: {}
    runAsUser: 1001
    runAsGroup: 1001
    runAsNonRoot: true
    readOnlyRootFilesystem: true
    privileged: false
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
    seccompProfile:
      type: "RuntimeDefault"

  ## @param configReloader.command Override default ConfigMap Reload container command (useful when using custom images)
  ##
  command: []
  ## @param configReloader.args Override default ConfigMap Reload container args (useful when using custom images)
  ##
  args: []
  ## @param configReloader.lifecycleHooks for Grafana Alloy containers to automate configuration before or after startup
  ##
  lifecycleHooks: {}
  ## @param configReloader.extraEnvVars Array with extra environment variables to add to Grafana Alloy containers
  ## e.g:
  ## extraEnvVars:
  ##   - name: FOO
  ##     value: "bar"
  ##
  extraEnvVars: []
  ## @param configReloader.extraEnvVarsCM Name of existing ConfigMap containing extra env vars for ConfigMap Reload containers
  ##
  extraEnvVarsCM: ""
  ## @param configReloader.extraEnvVarsSecret Name of existing Secret containing extra env vars for ConfigMap Reload containers
  ##
  extraEnvVarsSecret: ""
  ## @param configReloader.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the ConfigMap Reload containers
  ##
  extraVolumeMounts: []


## @section Traffic Exposure Parameters
##

## Grafana Alloy service parameters
##
service:
  ## @param service.type Grafana Alloy service type
  ##
  type: ClusterIP
  ## @param service.ports.http Grafana Alloy service HTTP port
  ##
  ports:
    http: 80
  ## Node ports to expose
  ## @param service.nodePorts.http Node port for HTTP
  ## NOTE: choose port between <30000-32767>
  ##
  nodePorts:
    http: ""
  ## @param service.clusterIP Grafana Alloy service Cluster IP
  ## e.g.:
  ## clusterIP: None
  ##
  clusterIP: ""
  ## @param service.loadBalancerIP Grafana Alloy service Load Balancer IP
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-loadbalancer
  ##
  loadBalancerIP: ""
  ## @param service.loadBalancerSourceRanges Grafana Alloy service Load Balancer sources
  ## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
  ## e.g:
  ## loadBalancerSourceRanges:
  ##   - 10.10.10.0/24
  ##
  loadBalancerSourceRanges: []
  ## @param service.externalTrafficPolicy Grafana Alloy service external traffic policy
  ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
  ##
  externalTrafficPolicy: Cluster
  ## @param service.annotations Additional custom annotations for Grafana Alloy service
  ##
  annotations: {}
  ## @param service.extraPorts Extra ports to expose in Grafana Alloy service (normally used with the `sidecars` value)
  ##
  extraPorts: []
  ## @param service.sessionAffinity Control where client requests go, to the same pod or round-robin
  ## Values: ClientIP or None
  ## ref: https://kubernetes.io/docs/concepts/services-networking/service/
  ##
  sessionAffinity: None
  ## @param service.sessionAffinityConfig Additional settings for the sessionAffinity
  ## sessionAffinityConfig:
  ##   clientIP:
  ##     timeoutSeconds: 300
  ##
  sessionAffinityConfig: {}
## Network Policies
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##
networkPolicy:
  ## @param networkPolicy.enabled Specifies whether a NetworkPolicy should be created
  ##
  enabled: true
  ## @param 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 networkPolicy.allowExternalEgress Allow the pod to access any range of port and all destinations.
  ##
  allowExternalEgress: true
  ## @param networkPolicy.addExternalClientAccess Allow access from pods with client label set to "true". Ignored if `networkPolicy.allowExternal` is true.
  ##
  addExternalClientAccess: true
  ## @param 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 networkPolicy.extraEgress [array] Add extra ingress rules to the NetworkPolicy (ignored if allowExternalEgress=true)
  ## e.g:
  ## extraEgress:
  ##   - ports:
  ##       - port: 1234
  ##     to:
  ##       - podSelector:
  ##           - matchLabels:
  ##               - role: frontend
  ##       - podSelector:
  ##           - matchExpressions:
  ##               - key: role
  ##                 operator: In
  ##                 values:
  ##                   - frontend
  ##
  extraEgress: []
  ## @param networkPolicy.ingressPodMatchLabels [object] Labels to match to allow traffic from other pods. Ignored if `networkPolicy.allowExternal` is true.
  ## e.g:
  ## ingressPodMatchLabels:
  ##   my-client: "true"
  #
  ingressPodMatchLabels: {}
  ## @param networkPolicy.ingressNSMatchLabels [object] Labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true.
  ## @param networkPolicy.ingressNSPodMatchLabels [object] Pod labels to match to allow traffic from other namespaces. Ignored if `networkPolicy.allowExternal` is true.
  ##
  ingressNSMatchLabels: {}
  ingressNSPodMatchLabels: {}
## Grafana Alloy ingress parameters
## ref: http://kubernetes.io/docs/concepts/services-networking/ingress/
##
ingress:
  ## @param ingress.enabled Enable ingress record generation for Grafana Alloy
  ##
  enabled: false
  ## @param ingress.pathType Ingress path type
  ##
  pathType: Prefix
  ## @param ingress.apiVersion Force Ingress API version (automatically detected if not set)
  ##
  apiVersion: ""
  ## @param ingress.hostname Default host for the ingress record
  ##
  hostname: alloy.local
  ## @param 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 ingress.path Default path for the ingress record
  ## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
  ##
  path: /
  ## @param ingress.annotations Additional annotations for the Ingress resource. To enable certificate autogeneration, place here your cert-manager annotations.
  ## Use this parameter to set the required annotations for cert-manager, see
  ## ref: https://cert-manager.io/docs/usage/ingress/#supported-annotations
  ## e.g:
  ## annotations:
  ##   kubernetes.io/ingress.class: nginx
  ##   cert-manager.io/cluster-issuer: cluster-issuer-name
  ##
  annotations: {}
  ## @param ingress.tls Enable TLS configuration for the host defined at `ingress.hostname` parameter
  ## TLS certificates will be retrieved from a TLS secret with name: `{{- printf "%s-tls" .Values.ingress.hostname }}`
  ## You can:
  ##   - Use the `ingress.secrets` parameter to create this TLS secret
  ##   - Rely on cert-manager to create it by setting the corresponding annotations
  ##   - Rely on Helm to create self-signed certificates by setting `ingress.selfSigned=true`
  ##
  tls: false
  ## @param ingress.selfSigned Create a TLS secret for this ingress record using self-signed certificates generated by Helm
  ##
  selfSigned: false
  ## @param ingress.extraHosts An array with additional hostname(s) to be covered with the ingress record
  ## e.g:
  ## extraHosts:
  ##   - name: alloy.local
  ##     path: /
  ##
  extraHosts: []
  ## @param ingress.extraPaths An array with additional arbitrary paths that may need to be added to the ingress under the main host
  ## e.g:
  ## extraPaths:
  ## - path: /*
  ##   backend:
  ##     serviceName: ssl-redirect
  ##     servicePort: use-annotation
  ##
  extraPaths: []
  ## @param ingress.extraTls TLS configuration for additional hostname(s) to be covered with this ingress record
  ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
  ## e.g:
  ## extraTls:
  ## - hosts:
  ##     - alloy.local
  ##   secretName: alloy.local-tls
  ##
  extraTls: []
  ## @param ingress.secrets Custom TLS certificates as secrets
  ## NOTE: 'key' and 'certificate' are expected in PEM format
  ## NOTE: 'name' should line up with a 'secretName' set further up
  ## If it is not set and you're using cert-manager, this is unneeded, as it will create a secret for you with valid certificates
  ## If it is not set and you're NOT using cert-manager either, self-signed certificates will be created valid for 365 days
  ## It is also possible to create and manage the certificates outside of this helm chart
  ## Please see README.md for more information
  ## e.g:
  ## secrets:
  ##   - name: alloy.local-tls
  ##     key: |-
  ##       -----BEGIN RSA PRIVATE KEY-----
  ##       ...
  ##       -----END RSA PRIVATE KEY-----
  ##     certificate: |-
  ##       -----BEGIN CERTIFICATE-----
  ##       ...
  ##       -----END CERTIFICATE-----
  ##
  secrets: []
  ## @param ingress.extraRules Additional rules to be covered with this ingress record
  ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
  ## e.g:
  ## extraRules:
  ## - host: example.local
  ##     http:
  ##       path: /
  ##       backend:
  ##         service:
  ##           name: example-svc
  ##           port:
  ##             name: http
  ##
  extraRules: []

## @section Other Parameters
##

## RBAC configuration
##
rbac:
  ## @param rbac.create Specifies whether RBAC resources should be created
  ##
  create: true
  ## @param rbac.rules Custom RBAC rules to set
  ## e.g:
  ## rules:
  ##   - apiGroups:
  ##       - ""
  ##     resources:
  ##       - pods
  ##     verbs:
  ##       - get
  ##       - list
  ##
  rules: []

## ServiceAccount configuration
##
serviceAccount:
  ## @param serviceAccount.create Specifies whether a ServiceAccount should be created
  ##
  create: true
  ## @param serviceAccount.name The name of the ServiceAccount to use.
  ## If not set and create is true, a name is generated using the common.names.fullname template
  ##
  name: ""
  ## @param serviceAccount.annotations Additional Service Account annotations (evaluated as a template)
  ##
  annotations: {}
  ## @param serviceAccount.automountServiceAccountToken Automount service account token for the server service account
  ##
  automountServiceAccountToken: true

## Prometheus metrics
##
metrics:
  ## @param metrics.enabled Enable the export of Prometheus metrics
  ##
  enabled: false
  ## Prometheus Operator ServiceMonitor configuration
  ##
  serviceMonitor:
    ## @param metrics.serviceMonitor.enabled if `true`, creates a Prometheus Operator ServiceMonitor (also requires `metrics.enabled` to be `true`)
    ##
    enabled: false
    ## @param metrics.serviceMonitor.namespace Namespace in which Prometheus is running
    ##
    namespace: ""
    ## @param metrics.serviceMonitor.annotations Additional custom annotations for the ServiceMonitor
    ##
    annotations: {}
    ## @param metrics.serviceMonitor.labels Extra labels for the ServiceMonitor
    ##
    labels: {}
    ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in Prometheus
    ##
    jobLabel: ""
    ## @param metrics.serviceMonitor.honorLabels honorLabels chooses the metric's labels on collisions with target labels
    ##
    honorLabels: false
    ## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped.
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ## e.g:
    ## interval: 10s
    ##
    interval: ""
    ## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
    ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
    ## e.g:
    ## scrapeTimeout: 10s
    ##
    scrapeTimeout: ""
    ## @param metrics.serviceMonitor.metricRelabelings Specify additional relabeling of metrics
    ##
    metricRelabelings: []
    ## @param metrics.serviceMonitor.relabelings Specify general relabeling
    ##
    relabelings: []
    ## @param metrics.serviceMonitor.selector Prometheus instance selector labels
    ## ref: https://github.com/bitnami/charts/tree/main/bitnami/prometheus-operator#prometheus-configuration
    ## selector:
    ##   prometheus: my-prometheus
    ##
    selector: {}
