vectordotdev / helm-charts

Helm charts for Vector.
https://vector.dev
Mozilla Public License 2.0
103 stars 89 forks source link

Chart is running a single pod for role Agent #296

Closed sondrelg closed 1 year ago

sondrelg commented 1 year ago

Hi!

I'm running the vector helm chart v0.21 (latest) using role: "Agent". The helm chart successfully deploys a DaemonSet, and each of the DaemonSet pods run successfully.

What confuses me slightly, and what I think seems like a bug, is that the helm chart also deploys a StatefulSet and a single pod.

image

I tried setting replicas: 0, but that did not help. I have no other relevant chart configuration deviating from the defaults.

sondrelg commented 1 year ago

Looks like it's related to the headless service which I can't get rid of despite adding:

serviceHeadless:
  enabled: false
sondrelg commented 1 year ago

This is my full values.yaml-file, from which at least the service-account option, role option, and customConfig is loaded correctly:

role: "Agent"

service:
  enabled: false

serviceHeadless:
  enabled: false

resources:
  requests:
    cpu: 50m
    memory: 64Mi
  limits:
    cpu: 6000m
    memory: 1024Mi

envFrom:
  - secretRef:
      name: logtail-token-secret

customConfig:
  data_dir: /vector-data-dir
  api:
    enabled: false
    address: 127.0.0.1:8686
    playground: false
  sources:
    logtail_kubernetes_logs:
      type: kubernetes_logs
      self_node_name: "'$${VECTOR_SELF_NODE_NAME}'"
    host_metrics:
      type: host_metrics
  transforms:
    logtail_kubernetes_parser:
      type: remap
      inputs: [logtail_kubernetes_logs]
      source: >
        # this section is 200 loc, so I've cut it
  sinks:
    logtail_http_sink:
      type: http
      method: post
      uri: https://in.logtail.com/
      inputs: [logtail_kubernetes_parser]
      encoding:
        codec: json
      auth:
        strategy: "bearer"
        token: "'$${LOGTAIL_TOKEN}'"
spencergilbert commented 1 year ago

It looks like the values provided only generate a resource for the DaemonSet. Especially given the older age of the StatefulSet it looks like it was deployed separately.

Can you share the metadata.labels for both the DaemonSet and the StatefulSet?

sondrelg commented 1 year ago

Thanks for the prompt @spencergilbert. Found this label on the statefulset argocd.argoproj.io/instance: vector and after looking into it I found that we were essentially double-deploying our chart. Once with helm via terraform, with correct values, and another time via ArgoCD, with default values 👍 The universe makes sense again 😌