edgexfoundry / edgex-examples

Apache License 2.0
51 stars 52 forks source link

helm deployment: Make hostPort binding optional #160

Closed bnevis-i closed 1 year ago

bnevis-i commented 1 year ago

🚀 Feature Request

Relevant Package [REQUIRED]

helm chart

Description [REQUIRED]

A most of the deployments in the helm chart contain a stanza like the following (where the pod either has a InternalBind (127.0.0.1) or an ExternalBind (0.0.0.0):

        ports:
        - containerPort: {{.Values.edgex.port.consul}}
          hostPort: {{.Values.edgex.port.consul}}
          hostIP: {{.Values.edgex.hostPortExternalBind}}

This was added for compatibility with the docker-compose deployment and was appropriate when the helm chart only worked on a single-node cluster. Now that the helm chart works on multi-node clusters, this is no longer an appropriate choice. Instead, services should be exposed as NodePort, or LoadBalancer, or Ingress, as appropriate.

Describe the solution you'd like

Implement a values.yaml setting to enable or disable the hostPort bindings on a global basis. Default it to disabled (don't bind hostPort).