Skip to content

Not able to add send-proxy option to a TCP service #598

Open
@Raj-prateek

Description

@Raj-prateek

Here is my TCP service configmap:

apiVersion: v1
kind: ConfigMap
metadata:
  name: smtp-config
  namespace: ingress-haproxy
  annotations:
    argocd.argoproj.io/sync-wave: "-1"
data:
  587:                    # Port where the frontend is going to listen to.
    my-namespace/my-service:587    # Kubernetes service in the format NS/ServiceName:ServicePort
  465:
    my-namespace/my-service:465:ssl # ssl option will enable ssl offloading for target service.
  2525:
    my-namespace/my-service:2525
  log-format-tcp: '{"client_ip":"%ci","client_port":"%cp","frontend_port":"%fp","date_time":"%t","backend_name":"%b","server_name":"%s","Tt":"%Tt","Tc":"%Tc","Tw":"%Tw","bytes_read":"%B"}'

I tried global config as well, it didn't work.

apiVersion: v1
kind: ConfigMap
metadata:
  name: ingress-haproxy-kubernetes-ingress
  namespace: ingress-haproxy
data:
   syslog-server: 'address:stdout, format: raw, facility:daemon'

Values.yaml

controller:
  image:
    tag: nightly
  allowPrivilegeEscalation: true
  logging:
    level: debug
  extraArgs:
    - --configmap=ingress-haproxy/ingress-haproxy-kubernetes-ingress
    - --configmap-tcp-services=ingress-haproxy/smtp-config
    - --default-ssl-certificate=ingress-haproxy/xyz-com-tls-secret
    - --watch-namespace my-namespace
    - --disable-ipv6
  autoscaling:
    enabled: true
    minReplicas: 5
    maxReplicas: 10
    targetCPUUtilizationPercentage: 80
  service:
    type: LoadBalancer
    loadBalancerIP: 127.0.0.1
    tcpPorts:
      - name: smtp-587
        port: 587
        targetPort: 587
      - name: smtp-465
        port: 465
        targetPort: 465
      - name: smtp-2525
        port: 2525
        targetPort: 2525

Can you please suggest a good way to setup send-proxy option in tcp service?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions