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

## This is a unique name for the cluster (required)
## All metrics will receive a `cluster` tag with this value
##
clusterName: KUBERNETES_CLUSTER_NAME

## Wavefront URL (cluster) and API Token (required)
##
wavefront:
  url: https://YOUR_CLUSTER.wavefront.com
  token: YOUR_API_TOKEN
  ## Name of an existing secret containing the token
  ##
  existingSecret:

## Add labels to all the deployed resources
##
commonLabels: {}

## Add annotations to all the deployed resources
##
commonAnnotations: {}

## Extra objects to deploy (value evaluated as a template)
##
extraDeploy: []

## Wavefront Collector is responsible to get all Kubernetes metrics from your cluster.
## It will capture Kubernetes resources metrics available from the kubelets,
## as well as auto-discovery capabilities.
##
collector:
  enabled: true
  image:
    registry: docker.io
    repository: bitnami/wavefront-kubernetes-collector
    tag: 1.2.4-debian-10-r29
    ## 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

  ## If set to true, DaemonSet will be used for the collector.
  ## If set to false, Deployment will be used for the collector.
  ## Setting this to true is strongly recommended
  ##
  useDaemonset: true

  ## max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores)
  ##
  # maxProcs: 0

  ## log level one of: info, debug, or trace. (default info)
  ##
  # logLevel: info

  ## The resolution at which the collector will retain metrics. (default 60s)
  ##
  # interval: 60s

  ## How often collected data is flushed (default 10s)
  ##
  # flushInterval: 10s

  ## Timeout for exporting data (default 20s)
  ##
  # sinkDelay: 20s

  ## If set to true, will use the unauthenticated real only port for the kubelet
  ## If set to false, will use the encrypted full access port for the kubelet (default false)
  ##
  # useReadOnlyPort: false

  ## If set to true, metrics will be sent to Wavefront via a Wavefront Proxy.
  ## When true you must either specify a value for `collector.proxyAddress` or set `proxy.enabled` to true
  ## If set to false, metrics will be sent to Wavefront via the Direct Ingestion API
  ##
  useProxy: true

  ## Can be used to specify a specific address for the Wavefront Proxy
  ## The proxy can be anywhere network reachable including outside of the cluster
  ## Required if `collector.useProxy` is true and `proxy.enabled` is false
  ##
  # proxyAddress: wavefront-proxy:2878

  ## If set to true, metrics about Kubernetes State will be generated by the collector
  ## These metrics are more efficient than kube-state-metrics
  ##
  kubernetesState: true

  ## If set to true Kubernetes API Server will also be scraped for metrics (default false)
  ##
  # apiServerMetrics: false

  ## Map of tags to apply to all metrics collected by the collector (default empty)
  ## sample tags to include (env, region)
  ##
  # tags:
  #   env: production
  #   region: us-west-2

  ## Events can also be collected and sent to Wavefront.
  ## Requires Wavefront Proxy 6.0 or greater.
  ## Events should be filtered before being enabled, see event filtering documentation for details
  ## Ref: https://github.com/wavefrontHQ/wavefront-collector-for-kubernetes/blob/master/docs/filtering.md
  ##
  events:
    enabled: false
  #   filters:
  #     tagWhilelistSets:
  #     - kind:
  #       - "Deployment"
  #     - reason:
  #       - "ScalingReplicaSet"
  #       - "ReplicaSetCreateError"
  #     - kind:
  #       - "HorizontalPodAutoscaler"
  #       reason:
  #       - "Failed*"

  ## Rules based discovery configuration
  ## Ref: https://github.com/wavefrontHQ/wavefront-kubernetes-collector/blob/master/docs/discovery.md
  ##
  discovery:
    enabled: true
  ## When specified, this replaces `prometheus.io` as the prefix for annotations used to
  ## auto-discover Prometheus endpoints
  ##
  #   annotationPrefix: "wavefront.com"
  ## Whether to enable runtime discovery configurations
  ## Ref: https://github.com/wavefrontHQ/wavefront-collector-for-kubernetes/blob/master/docs/discovery.md#runtime-configurations
  ##
  #   enableRuntimeConfigs: false
  ## Can be used to add additional discovery rules
  ##
  #   config:
  # # auto-discover a sample prometheus application
  #   - name: prom-example
  #     type: prometheus
  #     selectors:
  #       labels:
  #         k8s-app:
  #         - prom-example
  #     port: 8080
  #     path: /metrics
  #     prefix: kube.prom-example.
  #     tags:
  #       alt_name: sample-app
  # # auto-discover mongodb pods (replace USER:PASSWORD)
  #   - name: mongodb
  #     type: telegraf/mongodb
  #     selectors:
  #       images:
  #       - '*mongodb:*'
  #     port: 27017
  #     conf: |
  #       servers = ["mongodb://USER:PASSWORD${host}:${port}"]
  #       gather_perdb_stats = true
  #     filters:
  #       metricBlacklist:
  #       - 'mongodb.member.status'
  #       - 'mongodb.state'
  #       - 'mongodb.db.stats.type'
  # # auto-discover rabbitmq pods (replace USER and PASSWORD)
  #   - name: rabbitmq
  #     type: telegraf/rabbitmq
  #     selectors:
  #       images:
  #       - '*rabbitmq:*'
  #     port: 15672
  #     conf: |
  #       url = "http://${host}:${port}"
  #       username = "USER"
  #       password = "PASSWORD"

  ## ConfigMap with Collector Configuration
  ##
  # existingConfigmap:

  ## Command and args for running the container (set to default if not set). Use array form
  ##
  command: []
  args: []

  ## Wavefront Collector resource requests and limits
  ## ref: http://kubernetes.io/docs/user-guide/compute-resources/
  ##
  resources:
    # We usually recommend not to specify default resources and to leave this as a conscious
    # choice for the user. This also increases chances charts run on environments with little
    # resources, such as Minikube. If you do want to specify resources, uncomment the following
    # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
    limits: {}
    #   cpu: 200m
    #   memory: 256Mi
    requests: {}
    #   cpu: 200m
    #   memory: 10Mi

  ## SecurityContext configuration
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  containerSecurityContext:
    enabled: true
    runAsUser: 1001
    runAsNonRoot: true

  podSecurityContext:
    enabled: true
    fsGroup: 1001

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

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Pod extra labels
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}

  ## Annotations for server pods.
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Wavefront Collector pods' priority.
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## lifecycleHooks for the Wavefront Collector container to automate configuration before or after startup.
  ##
  lifecycleHooks: {}

  ## Custom Liveness probes for Wavefront Collector
  ##
  customLivenessProbe: {}

  ## Custom Rediness probes Wavefront Collector
  ##
  customReadinessProbe: {}

  ## Update strategy - only really applicable for deployments with RWO PVs attached
  ## If replicas = 1, an update can get "stuck", as the previous pod remains attached to the
  ## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will
  ## terminate the single previous pod, so that the new, incoming pod can attach to the PV
  ##
  updateStrategy:
    type: RollingUpdate

  ## An array to add extra env vars
  ## For example:
  ##
  extraEnvVars: []
  #  - name: BEARER_AUTH
  #    value: true

  ## ConfigMap with extra environment variables
  ##
  extraEnvVarsCM:

  ## Secret with extra environment variables
  ##
  extraEnvVarsSecret:

  ## Extra volumes to add to the deployment
  ##
  extraVolumes: []

  ## Extra volume mounts to add to the container
  ##
  extraVolumeMounts: []

  ## Add init containers to the Wavefront proxy pods.
  ## Example:
  ## initContainers:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  initContainers: {}

  ## Add sidecars to the Wavefront proxy pods.
  ## Example:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: {}

## Wavefront Proxy is a metrics forwarder that is used to relay metrics to the Wavefront SaaS service.
## It can receive metrics from the Wavefront Collector as well as other metrics collection services
## within your cluster. The proxy also supports preprocessor rules to allow you to further filter
## and enhance your metric names, and tags. Should network connectivity fall between the proxy and
## Wavefront SaaS service, the proxy will buffer metrics, which will be flushed when connectivity resumes.
## Ref: https://docs.wavefront.com/proxies.html
##
proxy:
  enabled: true
  image:
    registry: docker.io
    repository: bitnami/wavefront-proxy
    tag: 9.3.0-debian-10-r46
    ## 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

  ## Wavefront Proxy 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: 100m
    #   memory: 4Gi
    requests: {}
    #   cpu: 100m
    #   memory: 1Gi

  ## SecurityContext configuration
  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
  ##
  containerSecurityContext:
    enabled: true
    runAsUser: 1001
    runAsNonRoot: true

  podSecurityContext:
    enabled: true
    fsGroup: 1001

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

  ## Node labels for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/user-guide/node-selection/
  ##
  nodeSelector: {}

  ## Tolerations for pod assignment. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
  ##
  tolerations: []

  ## Pod extra labels
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
  ##
  podLabels: {}

  ## Annotations for server pods.
  ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
  ##
  podAnnotations: {}

  ## Wavefront proxy pods' priority.
  ## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
  ##
  # priorityClassName: ""

  ## lifecycleHooks for the Wavefront proxy container to automate configuration before or after startup.
  ##
  lifecycleHooks: {}

  ## Wavefront Proxy liveness and readiness probes. Evaluated as a template.
  ## ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
  ##
  livenessProbe:
    enabled: true
    initialDelaySeconds: 10
    timeoutSeconds: 1
    periodSeconds: 20
    failureThreshold: 6
    successThreshold: 1
  readinessProbe:
    enabled: true
    initialDelaySeconds: 10
    timeoutSeconds: 1
    periodSeconds: 20
    failureThreshold: 6
    successThreshold: 1

  ## Custom Liveness probes for Wavefront Proxy
  ##
  customLivenessProbe: {}

  ## Custom Rediness probes Wavefront Proxy
  ##
  customReadinessProbe: {}

  ## Update strategy - only really applicable for deployments with RWO PVs attached
  ## If replicas = 1, an update can get "stuck", as the previous pod remains attached to the
  ## PV, and the "incoming" pod can never start. Changing the strategy to "Recreate" will
  ## terminate the single previous pod, so that the new, incoming pod can attach to the PV
  ##
  updateStrategy:
    type: RollingUpdate

  ## An array to add extra env vars
  ## For example:
  ##
  extraEnvVars: []
  #  - name: BEARER_AUTH
  #    value: true

  ## ConfigMap with extra environment variables
  ##
  extraEnvVarsCM:

  ## Secret with extra environment variables
  ##
  extraEnvVarsSecret:

  ## Extra volumes to add to the deployment
  ##
  extraVolumes: []

  ## Extra volume mounts to add to the container
  ##
  extraVolumeMounts: []

  ## Add init containers to the Wavefront proxy pods.
  ## Example:
  ## initContainers:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  initContainers: {}

  ## Add sidecars to the Wavefront proxy pods.
  ## Example:
  ## sidecars:
  ##   - name: your-image-name
  ##     image: your-image
  ##     imagePullPolicy: Always
  ##     ports:
  ##       - name: portname
  ##         containerPort: 1234
  ##
  sidecars: {}

  ## The number of pod replicas to run for the Wavefront Proxy deployment
  ##
  replicas: 1

  ## The port number the proxy will listen on for metrics in Wavefront data format.
  ##
  port: 2878

  ## The port number the proxy will listen on for tracing spans in Wavefront trace data format.
  ##
  # tracePort: 30000

  ## The port number the proxy will listen on for tracing spans in Jaeger data format.
  ##
  # jaegerPort: 30001

  ## TCP ports to receive Jaeger Thrift formatted data via HTTP. The data is then sent to Wavefront in Wavefront span format.
  ##
  # traceJaegerHttpListenerPort: 30080

  ## The port number the proxy will listen on for tracing spans in Zipkin data format.
  ##
  # zipkinPort: 9411

  ## Sampling rate to apply to tracing spans sent to the proxy.
  ## This rate is applied to all data formats the proxy is listening on.
  ## Value should be between 0.0 and 1.0
  ##
  # traceSamplingRate: 0.25

  ## When this is set to a value greater than 0,
  ## spans that are greater than or equal to this value will be sampled.
  ##
  # traceSamplingDuration: 500

  ## The port number the proxy will listen on for histogram distributions in Wavefront Distribution format.
  ##
  # histogramPort: 40000

  ## The port number the proxy will listen on for minute acculumated histograms in Wavefront Data format.
  ##
  # histogramMinutePort: 40001

  ## The port number the proxy will listen on for hour acculumated histograms in Wavefront Data format.
  ##
  # histogramHourPort: 40002

  ## The port number the proxy will listen on for day acculumated histograms in Wavefront Data format.
  ##
  # histogramDayPort: 40003

  ## The port number the proxy will listen on for minute acculumated delta counters in Wavefront Data format.
  ##
  # deltaCounterPort: 50000

  ## Any configuration property can be passed to the proxy via command line args in
  ## in the format: `--<property_name> <value>`. Multiple properties can be specified
  ## separated by whitespace.
  ## Ref: https://docs.wavefront.com/proxies_configuring.html
  ##
  # args:

  ## Proxy is a Java application. By default Java will consume upto 4G of heap memory.
  ## This can be used to override the default. Uses the `-Xmx` command line option for java
  ##
  # heap: 1024m

  ## ConfigMap with Proxy preprocessor Configuration
  ##
  # existingConfigmap:

  ## Preprocessor rules is a powerful way to apply filtering or to enhance metrics as they flow
  ## through the proxy. You can configure the rules here. By default a rule to drop Kubernetes
  ## generated labels is applied to remove unecessary and often noisy tags.
  ## Ref: https://docs.wavefront.com/proxies_preprocessor_rules.html
  ##
  # preprocessor:
  #   rules.yaml: |
  #     '2878':
  #     # fix %2F to be a / instead.  May be required on EKS.
  #     - rule    : fix-forward-slash
  #       action  : replaceRegex
  #       scope   : pointLine
  #       search  : "%2F"
  #       replace : "/"
  #     # replace bad characters ("&", "$", "!", "@") with underscores in the entire point line string
  #     - rule    : replace-badchars
  #       action  : replaceRegex
  #       scope   : pointLine
  #       search  : "[&\\$!@]"
  #       replace : "_"

## Specifies whether RBAC resources should be created
##
rbac:
  create: true

## Specifies whether a ServiceAccount should be created
##
serviceAccount:
  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:

## kube-state-metrics are used to get metrics about the state of the Kubernetes scheduler
## If enabled the kube-state-metrics chart will be installed as a subchart and the collector
## will be configured to capture metrics.
##
kube-state-metrics:
  enabled: false

## Required for Project Pacific Kubernetes clusters.
## If enabled, a role binding to handle pod security policy will be installed within the Kubernetes cluster.
##
projectPacific:
  enabled: false
