# Default values for victoria-metrics.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
global:
  # -- Image pull secrets, that can be shared across multiple helm charts
  imagePullSecrets: []
  image:
    # -- Image registry, that can be shared across multiple helm charts
    registry: "registry.cn-shenzhen.aliyuncs.com/shuhui"
  # -- Openshift security context compatibility configuration
  compatibility:
    openshift:
      adaptSecurityContext: "auto"
  cluster:
    # -- K8s cluster domain suffix, uses for building storage pods' FQDN. Details are [here](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/)
    dnsDomain: cluster.local.

rbac:
  # -- Enables Role/RoleBinding creation
  create: true

  # -- If true and `rbac.enabled`, will deploy a Role/RoleBinding instead of a ClusterRole/ClusterRoleBinding
  namespaced: false

  # -- Role/RoleBinding labels
  extraLabels: {}

  # -- Role/RoleBinding annotations
  annotations: {}

# -- Override chart name
nameOverride: ""

# -- Print chart notes
printNotes: true

serviceAccount:
  # -- Create service account.
  create: true

  # -- The name of the service account to use.
  # If not set and create is true, a name is generated using the fullname template
  name:

  # -- ServiceAccount labels
  extraLabels: {}

  # -- ServiceAccount annotations
  annotations: {}

  # -- Mount API token to pod directly
  automountToken: true

# -- See `kubectl explain poddisruptionbudget.spec` for more. Details are [here](https://kubernetes.io/docs/tasks/run-application/configure-pdb/)
podDisruptionBudget:
  enabled: false
  # -- min number or percentage of pods that can be unavailable
  minAvailable: 0
  # -- max number or percentage of pods that can be unavailable
  maxUnavailable: 0
  # -- Defines criteria when unhealthy pods should be considered for eviction
  unhealthyPodEvictionPolicy:
  labels: {}

server:
  # -- Enable deployment of server component. Deployed as StatefulSet
  enabled: true
  # -- Override default `app` label name
  name:
  image:
    # -- Image registry
    registry: ""
    # -- Image repository
    repository: victoria-metrics
    # -- Image tag
    tag: "" # rewrites Chart.AppVersion
    # Variant of the image tag to use.
    # e.g. enterprise.
    variant: ""
    # -- Image pull policy
    pullPolicy: IfNotPresent
  # -- Image pull secrets
  imagePullSecrets: []
  # -- Specify pod lifecycle
  lifecycle: {}
  # -- Number of victoriametrics single replicas
  replicaCount: 1
  # -- Name of Priority Class
  priorityClassName: ""
  # -- Overrides the full name of server component
  fullnameOverride:
  # -- Data retention period. Possible units character: h(ours), d(ays), w(eeks), y(ears), if no unit character specified - month. The minimum retention period is 24h. See these [docs](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention)
  retentionPeriod: 1
  # -- Extra command line arguments for container of component
  extraArgs:
    envflag.enable: true
    envflag.prefix: VM_
    loggerFormat: json
    httpListenAddr: :8428
    # Enable IPv6 support. Useful for running in IPv6-only Kubernetes clusters
    # enableTCP6: true

  # Additional hostPath mounts
  extraHostPathMounts:
    []
     #- name: certs-dir
     #  mountPath: /etc/kubernetes/certs
     #  subPath: ""
     #  hostPath: /etc/kubernetes/certs
     #  readOnly: true

  # Extra Volumes for the pod
  extraVolumes:
    []
    #- name: example
    #  configMap:
    #   name: example

  # -- Extra Volume Mounts for the container
  extraVolumeMounts:
    []
    # - name: example
    #   mountPath: /example

  # -- Extra containers to run in a pod with VM single
  extraContainers:
    []
    #- name: config-reloader
    #  image: reloader-image

  # -- Init containers for VM single pod
  initContainers:
    []
    # - name: vmrestore
    #   image: victoriametrics/vmrestore:latest
    #   volumeMounts:
    #   - mountPath: /storage
    #     name: vmstorage-volume
    #   - mountPath: /etc/vm/creds
    #     name: secret-remote-storage-keys
    #     readOnly: true
    #   args:
    #   - -storageDataPath=/storage
    #   - -src=s3://your_bucket/folder/latest
    #   - -credsFilePath=/etc/vm/creds/credentials

  # -- Node tolerations for server scheduling to nodes with taints. Details are [here](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
  tolerations:
    []
    # - key: "key"
    #   operator: "Equal|Exists"
    #   value: "value"
    #   effect: "NoSchedule|PreferNoSchedule"

  # -- Pod's node selector. Details are [here](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
  nodeSelector: {}

  # -- Pod affinity
  affinity: {}

  # -- Env variables
  # -- Additional environment variables (ex.: secret tokens, flags). Check [here](https://docs.victoriametrics.com/victoriametrics/#environment-variables) for more details
  env: []

  # -- Specify alternative source for env variables
  envFrom: []
    #- configMapRef:
    #    name: special-config

  # -- Container workdir
  containerWorkingDir: ""

  # -- Use an alternate scheduler, e.g. "stork". Check [here](https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/) for more details
  schedulerName: ""

  emptyDir: {}
  persistentVolume:
    # -- Create/use Persistent Volume Claim for server component. Empty dir if false
    enabled: true

    # -- Override Persistent Volume Claim name
    name: ""

    # -- Array of access modes. Must match those of existing PV or dynamic provisioner. Details are [here](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)
    accessModes:
      - ReadWriteOnce

    # -- VolumeClassAttribute to user for persistent volume 
    volumeAttributesClassName:

    # -- Persistent volume annotations
    annotations: {}

    # PVC extra labels
    extraLabels: {}

    # -- StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically
    storageClassName: ""

    # -- Existing Claim name. If defined, PVC must be created manually before volume will be bound
    existingClaim: ""

    # -- Bind Persistent Volume by labels. Must match all labels of targeted PV.
    matchLabels: {}

    # -- Mount path. Server data Persistent Volume mount root path.
    mountPath: /storage

    # -- Mount subpath
    subPath: ""

    # -- Size of the volume. Should be calculated based on the metrics you send and retention policy you set.
    size: 20Gi

  # -- Sts/Deploy additional labels
  extraLabels: {}
  # -- Pod's additional labels
  podLabels: {}
  # -- Pod's annotations
  podAnnotations: {}

  # -- Resource object. Details are [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
  resources:
    {}
    # limits:
    #   cpu: 500m
    #   memory: 512Mi
    # requests:
    #   cpu: 500m
    #   memory: 512Mi

  # -- Readiness & Liveness probes
  probe:
    # -- Indicates whether the Container is ready to service requests. If the readiness probe fails, the endpoints controller removes the Pod's IP address from the endpoints of all Services that match the Pod. The default state of readiness before the initial delay is Failure. If a Container does not provide a readiness probe, the default state is Success.
    readiness:
      httpGet: {}
      initialDelaySeconds: 5
      periodSeconds: 15
      timeoutSeconds: 5
      failureThreshold: 3

    # -- Indicates whether the Container is running. If the liveness probe fails, the kubelet kills the Container, and the Container is subjected to its restart policy. If a Container does not provide a liveness probe, the default state is Success.
    liveness:
      tcpSocket: {}
      initialDelaySeconds: 30
      periodSeconds: 30
      timeoutSeconds: 5
      failureThreshold: 10

    # -- Indicates whether the Container is done with potentially costly initialization. If set it is executed first. If it fails Container is restarted. If it succeeds liveness and readiness probes takes over.
    startup: {}
      #failureThreshold: 30
      #periodSeconds: 15
      #successThreshold: 1
      #timeoutSeconds: 5

  # -- Security context to be added to server pods
  securityContext:
    enabled: true
  # -- Pod's security context. Details are [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
  podSecurityContext:
    enabled: true
  ingress:
    # -- Enable deployment of ingress for server component
    enabled: false
    # -- Ingress annotations
    annotations: {}
    #   kubernetes.io/ingress.class: nginx
    #   kubernetes.io/tls-acme: 'true'

    # -- Ingress extra labels
    extraLabels: {}
    # -- Array of host objects
    hosts:
      - name: vmsingle.local
        path:
          - /
        port: http

    # -- Array of TLS objects
    tls: []
    #   - secretName: vmselect-ingress-tls
    #     hosts:
    #       - vmselect.local
    # For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
    # See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
    # ingressClassName: nginx
    pathType: Prefix

  route:
    # -- Enable deployment of HTTPRoute for single component
    enabled: false
    # -- HTTPRoute annotations
    annotations: {}
    # -- HTTPRoute extra labels
    extraLabels: {}
    # -- HTTPGateway objects refs
    parentRefs: [] 
    # -- Array of hostnames
    hostnames: []
    # -- Extra rules to prepend to route. This is useful when working with annotation based services.
    extraRules: []
    # -- Filters for a default rule in HTTPRoute
    filters: []
    # -- Matches for a default rule in HTTPRoute
    matches:
      - path:
          type: PathPrefix
          value: '{{ dig "extraArgs" "http.pathPrefix" "/" .Values.server }}'

  vmbackupmanager:
    # -- Enable automatic creation of backup via vmbackupmanager. vmbackupmanager is part of Enterprise packages
    enabled: false
    
    image:
      # -- VMBackupManager image registry
      registry: ""
      # -- VMBackupManager image repository
      repository: victoriametrics/vmbackupmanager
      # -- VMBackupManager image tag
      tag: ""
      # Variant of the image tag to use.
      # e.g. enterprise.
      variant: ""
    # -- Disable hourly backups
    disableHourly: false
    # -- Disable daily backups
    disableDaily: false
    # -- Disable weekly backups
    disableWeekly: false
    # -- Disable monthly backups
    disableMonthly: false
    # -- Backup destination at S3, GCS or local filesystem. Release name will be included to path!
    destination: ""
    # -- Backups' retention settings
    retention:
      # -- Keep last N hourly backups. 0 means delete all existing hourly backups. Specify -1 to turn off
      keepLastHourly: 2
      # -- Keep last N daily backups. 0 means delete all existing daily backups. Specify -1 to turn off
      keepLastDaily: 2
      # -- Keep last N weekly backups. 0 means delete all existing weekly backups. Specify -1 to turn off
      keepLastWeekly: 2
      # -- Keep last N monthly backups. 0 means delete all existing monthly backups. Specify -1 to turn off
      keepLastMonthly: 2
    # -- Extra command line arguments for container of component
    extraArgs:
      envflag.enable: true
      envflag.prefix: VM_
      loggerFormat: json

    # Extra Volume Mounts for the container
    extraVolumeMounts:
      []
      # - name: example
      #   mountPath: /example
    # -- Allows to enable restore options for pod.
    # Read more [here](https://docs.victoriametrics.com/victoriametrics/vmbackupmanager/#restore-commands)
    restore:
      onStart:
        enabled: false
    # -- Resource object. Details are [here](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/)
    resources: {}
    # -- Additional environment variables (ex.: secret tokens, flags). Check [here](https://docs.victoriametrics.com/victoriametrics/#environment-variables)
    env: []
    # -- Readiness & Liveness probes
    probe:
      # -- VMBackupManager readiness probe
      readiness:
        httpGet:
          port: manager-http
        initialDelaySeconds: 5
        periodSeconds: 15
        timeoutSeconds: 5
        failureThreshold: 3
      # -- VMBackupManager liveness probe
      liveness:
        tcpSocket:
          port: manager-http
        initialDelaySeconds: 30
        periodSeconds: 30
        timeoutSeconds: 5
        failureThreshold: 10
      # -- VMBackupManager startup probe
      startup:
        httpGet:
          port: manager-http
  service:
    # -- Service traffic distribution. Details are [here](https://kubernetes.io/docs/concepts/services-networking/service/#traffic-distribution)
    trafficDistribution: ""
    # -- Service annotations
    annotations: {}
    # -- Service labels
    labels: {}
    # -- Service ClusterIP
    clusterIP: "None"
    # -- Service external IPs. Details are [here](https://kubernetes.io/docs/concepts/services-networking/service/#external-ips)
    externalIPs: []
    # -- Service load balancer IP
    loadBalancerIP: ""
    # -- Load balancer source range
    loadBalancerSourceRanges: []
    # -- Service port
    servicePort: 8428
    # -- Target port
    targetPort: http
    # -- Node port
    # nodePort: 30000
    # -- Service type
    type: ClusterIP
    # -- Service external traffic policy. Check [here](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) for details
    externalTrafficPolicy: ""
    # -- Health check node port for a service. Check [here](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip) for details
    healthCheckNodePort: ""
    # -- Service IP family policy. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
    ipFamilyPolicy: ""
    # -- List of service IP families. Check [here](https://kubernetes.io/docs/concepts/services-networking/dual-stack/#services) for details.
    ipFamilies: []

  # -- VictoriaMetrics mode: deployment, statefulSet
  mode: statefulSet

  # -- [K8s Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) specific variables
  deployment:
    spec:
      strategy:
        # Must be "Recreate" when we have a persistent volume
        type: Recreate

  # -- [K8s StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) specific variables
  statefulSet:
    spec:
      # -- Deploy order policy for StatefulSet pods
      podManagementPolicy: OrderedReady
      # -- StatefulSet update strategy. Check [here](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies) for details.
      updateStrategy: {}
        # type: RollingUpdate

  # -- Pod's termination grace period in seconds
  terminationGracePeriodSeconds: 60
  serviceMonitor:
    # -- Enable deployment of Service Monitor for server component. This is Prometheus operator object
    enabled: false
    # -- Service Monitor labels
    extraLabels: {}
    # -- Service Monitor annotations
    annotations: {}
    # -- Basic auth params for Service Monitor
    basicAuth: {}
    # -- Commented. Prometheus scrape interval for server component
#    interval: 15s
    # -- Commented. Prometheus pre-scrape timeout for server component
#    scrapeTimeout: 5s
    # -- Commented. HTTP scheme to use for scraping.
#    scheme: https
    # -- Commented. TLS configuration to use when scraping the endpoint
#    tlsConfig:
#      insecureSkipVerify: true
    # -- Service Monitor relabelings
    relabelings: []
    # -- Service Monitor metricRelabelings
    metricRelabelings: []
    # -- Service Monitor target port
    targetPort: http

  # -- Global relabel configuration
  relabel:
    enabled: false
    config: []
    # -- Use existing configmap if specified
    # otherwise .config values will be used. Relabel config **should** reside under `relabel.yml` key
    configMap: ""

  # Scrape configuration for victoriametrics
  scrape:
    # -- If true scrapes targets, creates config map or use specified one with scrape targets
    enabled: false
    # -- Use existing configmap if specified
    # otherwise .config values will be used. Scrape config **should** reside under `scrape.yml` key
    configMap: ""
    # -- Scrape config
    config:
      global:
        scrape_interval: 15s

      # Scrape targets
      scrape_configs:
        # Scrape rule for scrape victoriametrics
        - job_name: victoriametrics
          static_configs:
            - targets: [ "localhost:8428" ]

          # COPY from Prometheus helm chart https://github.com/helm/charts/blob/master/stable/prometheus/values.yaml

          # Scrape config for API servers.
          #
          # Kubernetes exposes API servers as endpoints to the default/kubernetes
          # service so this uses `endpoints` role and uses relabelling to only keep
          # the endpoints associated with the default/kubernetes service using the
          # default named port `https`. This works for single API server deployments as
          # well as HA API server deployments.
        - job_name: "kubernetes-apiservers"
          kubernetes_sd_configs:
            - role: endpoints
          # Default to scraping over https. If required, just disable this or change to
          # `http`.
          scheme: https
          # This TLS & bearer token file config is used to connect to the actual scrape
          # endpoints for cluster components. This is separate to discovery auth
          # configuration because discovery & scraping are two separate concerns in
          # Prometheus. The discovery auth config is automatic if Prometheus runs inside
          # the cluster. Otherwise, more config options have to be provided within the
          # <kubernetes_sd_config>.
          tls_config:
            ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
            # If your node certificates are self-signed or use a different CA to the
            # master CA, then you need to disable certificate verification. Note that
            # certificate verification is an integral part of a secure infrastructure
            # so this should only be disabled in a controlled environment. You can
            # enable certificate verification by commenting the line below.
            #
            insecure_skip_verify: true
          bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
          # Keep only the default/kubernetes service endpoints for the https port. This
          # will add targets for each API server which Kubernetes adds an endpoint to
          # the default/kubernetes service.
          relabel_configs:
            - source_labels:
                [
                    __meta_kubernetes_namespace,
                    __meta_kubernetes_service_name,
                    __meta_kubernetes_endpoint_port_name,
                ]
              action: keep
              regex: default;kubernetes;https
          # Scrape rule using kubernetes service discovery for nodes
        - job_name: "kubernetes-nodes"
          # Default to scraping over https. If required, just disable this or change to
          # `http`.
          scheme: https
          # This TLS & bearer token file config is used to connect to the actual scrape
          # endpoints for cluster components. This is separate to discovery auth
          # configuration because discovery & scraping are two separate concerns in
          # Prometheus. The discovery auth config is automatic if Prometheus runs inside
          # the cluster. Otherwise, more config options have to be provided within the
          # <kubernetes_sd_config>.
          tls_config:
            ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
            # If your node certificates are self-signed or use a different CA to the
            # master CA, then you need to disable certificate verification. Note that
            # certificate verification is an integral part of a secure infrastructure
            # so this should only be disabled in a controlled environment. You can
            # enable certificate verification by commenting the line below.
            #
            insecure_skip_verify: true
          bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
          kubernetes_sd_configs:
            - role: node
          relabel_configs:
            - action: labelmap
              regex: __meta_kubernetes_node_label_(.+)
          # Scrape rule using kubernetes service discovery for cadvisor
        - job_name: "kubernetes-nodes-cadvisor"
          # Default to scraping over https. If required, just disable this or change to
          # `http`.
          scheme: https
          # This TLS & bearer token file config is used to connect to the actual scrape
          # endpoints for cluster components. This is separate to discovery auth
          # configuration because discovery & scraping are two separate concerns in
          # Prometheus. The discovery auth config is automatic if Prometheus runs inside
          # the cluster. Otherwise, more config options have to be provided within the
          # <kubernetes_sd_config>.
          tls_config:
            ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
            # If your node certificates are self-signed or use a different CA to the
            # master CA, then you need to disable certificate verification. Note that
            # certificate verification is an integral part of a secure infrastructure
            # so this should only be disabled in a controlled environment. You can
            # enable certificate verification by commenting the line below.
            #
            insecure_skip_verify: true
          bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
          kubernetes_sd_configs:
            - role: node
          metrics_path: /metrics/cadvisor
          relabel_configs:
            - action: labelmap
              regex: __meta_kubernetes_node_label_(.+)
            - source_labels: [__metrics_path__]
              target_label: metrics_path
          # ignore timestamps of cadvisor's metrics by default
          # more info here https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4697#issuecomment-1656540535
          honor_timestamps: false 
        # Scrape config for service endpoints.
        #
        # The relabeling allows the actual service scrape endpoint to be configured
        # via the following annotations:
        #
        # * `prometheus.io/scrape`: Only scrape services that have a value of `true`
        # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
        # to set this to `https` & most likely set the `tls_config` of the scrape config.
        # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
        # * `prometheus.io/port`: If the metrics are exposed on a different port to the
        # service then set this appropriately.
        #
        # Scrape rule using kubernetes service discovery for endpoints
        - job_name: "kubernetes-service-endpoints"
          kubernetes_sd_configs:
            - role: endpoints
          relabel_configs:
            - action: drop
              source_labels: [ __meta_kubernetes_pod_container_init ]
              regex: true
            - action: keep_if_equal
              source_labels: [ __meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number ]
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_scrape ]
              action: keep
              regex: true
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_scheme ]
              action: replace
              target_label: __scheme__
              regex: (https?)
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_path ]
              action: replace
              target_label: __metrics_path__
              regex: (.+)
            - source_labels:
                [
                    __address__,
                    __meta_kubernetes_service_annotation_prometheus_io_port,
                ]
              action: replace
              target_label: __address__
              regex: ([^:]+)(?::\d+)?;(\d+)
              replacement: $1:$2
            - action: labelmap
              regex: __meta_kubernetes_service_label_(.+)
            - source_labels: [ __meta_kubernetes_namespace ]
              action: replace
              target_label: namespace
            - source_labels: [ __meta_kubernetes_service_name ]
              action: replace
              target_label: service
            - source_labels: [ __meta_kubernetes_pod_node_name ]
              action: replace
              target_label: node
        # Scrape config for slow service endpoints; same as above, but with a larger
        # timeout and a larger interval
        #
        # The relabeling allows the actual service scrape endpoint to be configured
        # via the following annotations:
        #
        # * `prometheus.io/scrape-slow`: Only scrape services that have a value of `true`
        # * `prometheus.io/scheme`: If the metrics endpoint is secured then you will need
        # to set this to `https` & most likely set the `tls_config` of the scrape config.
        # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
        # * `prometheus.io/port`: If the metrics are exposed on a different port to the
        # service then set this appropriately.
        #
        - job_name: "kubernetes-service-endpoints-slow"
          scrape_interval: 5m
          scrape_timeout: 30s
          kubernetes_sd_configs:
            - role: endpoints
          relabel_configs:
            - action: drop
              source_labels: [ __meta_kubernetes_pod_container_init ]
              regex: true
            - action: keep_if_equal
              source_labels: [ __meta_kubernetes_service_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number ]
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_scrape_slow ]
              action: keep
              regex: true
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_scheme ]
              action: replace
              target_label: __scheme__
              regex: (https?)
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_path ]
              action: replace
              target_label: __metrics_path__
              regex: (.+)
            - source_labels:
                [
                    __address__,
                    __meta_kubernetes_service_annotation_prometheus_io_port,
                ]
              action: replace
              target_label: __address__
              regex: ([^:]+)(?::\d+)?;(\d+)
              replacement: $1:$2
            - action: labelmap
              regex: __meta_kubernetes_service_label_(.+)
            - source_labels: [ __meta_kubernetes_namespace ]
              action: replace
              target_label: namespace
            - source_labels: [ __meta_kubernetes_service_name ]
              action: replace
              target_label: service
            - source_labels: [ __meta_kubernetes_pod_node_name ]
              action: replace
              target_label: node
        # Example scrape config for probing services via the Blackbox Exporter.
        #
        # The relabeling allows the actual service scrape endpoint to be configured
        # via the following annotations:
        #
        # * `prometheus.io/probe`: Only probe services that have a value of `true`
        #
        - job_name: "kubernetes-services"
          metrics_path: /probe
          params:
            module: [ http_2xx ]
          kubernetes_sd_configs:
            - role: service
          relabel_configs:
            - source_labels:
                [ __meta_kubernetes_service_annotation_prometheus_io_probe ]
              action: keep
              regex: true
            - source_labels: [ __address__ ]
              target_label: __param_target
            - target_label: __address__
              replacement: blackbox
            - source_labels: [ __param_target ]
              target_label: instance
            - action: labelmap
              regex: __meta_kubernetes_service_label_(.+)
            - source_labels: [ __meta_kubernetes_namespace ]
              target_label: namespace
            - source_labels: [ __meta_kubernetes_service_name ]
              target_label: service
        # Example scrape config for pods
        #
        # The relabeling allows the actual pod scrape endpoint to be configured via the
        # following annotations:
        #
        # * `prometheus.io/scrape`: Only scrape pods that have a value of `true`
        # * `prometheus.io/path`: If the metrics path is not `/metrics` override this.
        # * `prometheus.io/port`: Scrape the pod on the indicated port instead of the default of `9102`.
        #
        - job_name: "kubernetes-pods"
          kubernetes_sd_configs:
            - role: pod
          relabel_configs:
            - action: drop
              source_labels: [ __meta_kubernetes_pod_container_init ]
              regex: true
            - action: keep_if_equal
              source_labels: [ __meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_container_port_number ]
            - source_labels: [ __meta_kubernetes_pod_annotation_prometheus_io_scrape ]
              action: keep
              regex: true
            - source_labels: [ __meta_kubernetes_pod_annotation_prometheus_io_path ]
              action: replace
              target_label: __metrics_path__
              regex: (.+)
            - source_labels:
                [ __address__, __meta_kubernetes_pod_annotation_prometheus_io_port ]
              action: replace
              regex: ([^:]+)(?::\d+)?;(\d+)
              replacement: $1:$2
              target_label: __address__
            - action: labelmap
              regex: __meta_kubernetes_pod_label_(.+)
            - source_labels: [ __meta_kubernetes_namespace ]
              action: replace
              target_label: namespace
            - source_labels: [ __meta_kubernetes_pod_name ]
              action: replace
              target_label: pod
          # End of COPY

    # -- Extra scrape configs that will be appended to `server.scrape.config`
    extraScrapeConfigs: []
    # - job_name: 'prometheus-blackbox-exporter'
    #   metrics_path: /probe
    #   params:
    #     module: [http_2xx]
    #   static_configs:
    #     - targets:
    #       - https://example.com
    #   relabel_configs:
    #     - source_labels: [__address__]
    #       target_label: __param_target
    #     - source_labels: [__param_target]
    #       target_label: instance
    #     - target_label: __address__
    #       replacement: prometheus-blackbox-exporter:9115

# -- Add extra specs dynamically to this chart
extraObjects: []

# -- Enterprise license key configuration for VictoriaMetrics enterprise.
# Required only for VictoriaMetrics enterprise. Check docs [here](https://docs.victoriametrics.com/victoriametrics/enterprise/),
# for more information, visit [site](https://victoriametrics.com/products/enterprise/).
# Request a trial license [here](https://victoriametrics.com/products/enterprise/trial/)
# Supported starting from VictoriaMetrics v1.94.0
license:
  # -- License key
  key: ""

  # -- Use existing secret with license key
  secret:
    # -- Existing secret name
    name: ""
    # -- Key in secret with license key
    key: ""
