I need to pass TCP connections to a ClusterIP Service, configured using a Helm values file.
Adding this in the values.yaml file
controller
service:
tcpPorts:
- name: coturn
port: 5349
targetPort: 5349
protocol: TCP
appears to direct connections on that port to the controller; running helm get manifest
outputs a file containing
apiVersion: v1
kind: Service
metadata:
spec:
type: LoadBalancer
ports:
- name: coturn
port: 5349
protocol: TCP
targetPort: 5349
...
kind: Deployment
spec:
template:
spec:
containers:
- ports
- name: coturn
containerPort: 5349
protocol: TCP
However, it’s not clear how to pass the connections on to the ClusterIP service. helm show values
indicates there’s a field
controller:
service:
## Additional tcp ports to expose
## This is especially useful for TCP services:
## https://github.com/haproxytech/kubernetes-ingress/blob/master/documentation/controller.md
# tcpPorts: []
# - name: http-alt
# port: 8080
# targetPort: http-alt
# nodePort: 32080
However, including tcpPorts
with even an empty array causes helm to throw the error:
Error: UPGRADE FAILED: cannot patch “haproxy-controller-kubernetes-ingress” with kind ConfigMap: “” is invalid
Even if this was acceptable, there doesn’t appear to be a field to identify the internal service to pass the connections to.
There is documentation on adding a ConfigMap or TCP resource after HAProxy is installed, but isn’t there a way to do that with the helm values file?