helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

Socket sinks should not create containerPorts

Open ribetm opened this issue 1 year ago • 2 comments

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

ribetm avatar Nov 27 '23 18:11 ribetm

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.

dsmith3197 avatar Dec 12 '23 22:12 dsmith3197

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

dani-CO-CN avatar May 13 '24 13:05 dani-CO-CN