# helm upgrade --kube-context shoot--staging--625003c8 -n tidb1373933076658061430 -i -f ./examples/dedicated-shoot-metric-statefulset.yaml vector-cluster-metric ./

# env -- Set environment variables in Vector containers
## The examples below leverage examples from secrets.generic and assume no name overrides with a Release name of "vector"
env:
  - name: TENANT_ID
    value: "1369847559691427383"
  - name: PROJECT_ID
    value: "1369847559691427496"
  - name: CLUSTER_ID
    value: "1373933076658061430"

# customConfig -- Override Vector's default configs, if used **all** options need to be specified
## This section supports using helm templates to populate dynamic values
## Ref: https://vector.dev/docs/reference/configuration/
customConfig:
  data_dir: /vector-data-dir
  api:
    enabled: true
    address: 0.0.0.0:8686
    playground: false
  sources:
    tidb_metrics:
      type: prometheus_remote_write
      address: 0.0.0.0:9090
    internal_metrics:
      type: internal_metrics
  sinks:
    remote_prometheus:
      type: prometheus_remote_write
      inputs:
        - tidb_metrics
      endpoint: http://vpce-006c5529a08d69fb2-i9x0ubnf.vpce-svc-0a44b494234617d54.us-west-2.vpce.amazonaws.com:9090/api/v1/write
      buffer:
        type: disk
        max_size: 2000000000 # 2GB
      request:
        retry_attempts: 10

# resources -- Set Vector resource requests and limits.
resources:
# requests:
#   cpu: 200m
#   memory: 256Mi
# limits:
#   cpu: 200m
#   memory: 256Mi

role: "Aggregator"

# rollWorkload -- Add a checksum of the generated ConfigMap to workload annotations
rollWorkload: true

## Define the Vector image to use
image:
  # image.repository -- Override default registry + name for Vector
  repository: timberio/vector
  # image.pullPolicy -- Vector image pullPolicy
  pullPolicy: IfNotPresent
  tag: 0.22.X-debian

## Configure a HorizontalPodAutoscaler for Vector
## Valid for Aggregator and Stateless-Aggregator roles
autoscaling:
  # autoscaling.enabled -- Enabled autoscaling for the Aggregator and Stateless-Aggregator
  enabled: false
  # autoscaling.minReplicas -- Minimum replicas for Vector's HPA

podDisruptionBudget:
  # podDisruptionBudget.enabled -- Enable a PodDisruptionBudget for Vector
  enabled: false

rbac:
  # rbac.create -- If true, create and use RBAC resources. Only valid for the Agent role
  create: true

psp:
  # psp.create -- If true, create a PodSecurityPolicy resource. PodSecurityPolicy is deprecated as of Kubernetes v1.21, and will be removed in v1.25
  ## Intended for use with the Agent role
  create: false

serviceAccount:
  # serviceAccount.create -- If true, create ServiceAccount
  create: true
  # serviceAccount.automountToken -- Automount API credentials for the Vector ServiceAccount
  automountToken: true

# livenessProbe -- Override default liveness probe settings, if customConfig is used requires customConfig.api.enabled true
## Requires Vector's API to be enabled
livenessProbe:
  httpGet:
    path: /health
    port: api

# readinessProbe -- Override default readiness probe settings, if customConfig is used requires customConfig.api.enabled true
## Requires Vector's API to be enabled
readinessProbe:
  httpGet:
    path: /health
    port: api

## Configure a PodMonitor for Vector
## Requires the PodMonitor CRD to be installed
podMonitor:
  # podMonitor.enabled -- If true, create a PodMonitor for Vector
  enabled: false

## Optional built-in HAProxy load balancer
haproxy:
  # haproxy.enabled -- If true, create a HAProxy load balancer
  enabled: false

# replicas -- Set the number of Pods to create
## Valid for Aggregator and Stateless-Aggregator
replicas: 1

# podManagementPolicy -- Specify the podManagementPolicy for the Aggregator role
## Valid for Aggregator role
podManagementPolicy: OrderedReady

# terminationGracePeriodSeconds -- Override Vector's terminationGracePeriodSeconds
terminationGracePeriodSeconds: 60

## Configuration for Vector's Service
service:
  # service.enabled -- If true, create and use a Service resource
  enabled: true
  # service.type -- Set type of Vector's Service
  type: "ClusterIP"
  # service.ports -- Manually set Service ports, overrides automated generation of Service ports
  ports: [ ]

## Configuration for Vector's Ingress
ingress:
  # ingress.enabled -- If true, create and use an Ingress resource
  enabled: false

## Configuration for Vector's data persistence
persistence:
  # persistence.enabled -- If true, create and use PersistentVolumeClaims
  enabled: true
  # persistence.storageClassName -- Specifies the storageClassName for PersistentVolumeClaims
  ## Valid for Aggregator role
  storageClassName: auditlog
  # persistence.accessModes -- Specifies the accessModes for PersistentVolumeClaims
  ## Valid for Aggregator role
  accessModes:
    - ReadWriteOnce
  # persistence.size -- Specifies the size of PersistentVolumeClaims
  ## Valid for Aggregator role
  size: 2Gi
  # persistence.finalizers -- Specifies the finalizers of PersistentVolumeClaims
  ## Valid for Aggregator role
  finalizers:
    - kubernetes.io/pvc-protection


