vectordotdev / helm-charts

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

Socket sinks should not create containerPorts #348

Open ribetm opened 10 months ago

ribetm commented 10 months ago

I have an Aggregator v0.23 (chart 0.31.0) with the following customConfig:

sinks:
    some_output:
        type: socket
        inputs: []
        mode: tcp
        address: "example.com:1234"

which automatically adds a containerPort to my StatefulSet:

  # Source: vector/templates/statefulset.yaml
  apiVersion: apps/v1
  kind: StatefulSet
  spec:
    template:
      spec:
        containers:
          - name: vector
            ports:
              - name: some_output
                containerPort: 1234
                protocol: TCP

As far as I know this is not necessary. Am I missing something ? Is it possible to avoid this ?

Thank you

dsmith3197 commented 9 months ago

Hi @ribetm,

Thanks for bringing this to our attention. I've confirmed this behavior as well

helm install --dry-run --debug -f values.yaml vector vector/vector

with the following values.yaml file.

customConfig:
  sinks:
    some_output:
        type: socket
        inputs: []
        mode: tcp
        address: "example.com:1234"

As you've noted, 1234 should not be included as a container port.

As a workaround for now, you can manually specify the containerPorts in the values.yaml file to avoid exposing that port.

dani-CO-CN commented 4 months ago

AFAICT: this applies to all sinks that are not pull based, not just sockets