Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect: enable proxy.expose configuration #7323

Merged
merged 3 commits into from
Mar 31, 2020
Merged

Commits on Mar 31, 2020

  1. client: use consistent name for struct receiver parameter

    This helps reduce the number of squiggly lines in Goland.
    shoenig committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    69f19cc View commit details
    Browse the repository at this point in the history
  2. connect: enable proxy.passthrough configuration

    Enable configuration of HTTP and gRPC endpoints which should be exposed by
    the Connect sidecar proxy. This changeset is the first "non-magical" pass
    that lays the groundwork for enabling Consul service checks for tasks
    running in a network namespace because they are Connect-enabled. The changes
    here provide for full configuration of the
    
      connect {
        sidecar_service {
          proxy {
            expose {
              paths = [{
    		path = <exposed endpoint>
                    protocol = <http or grpc>
                    local_path_port = <local endpoint port>
                    listener_port = <inbound mesh port>
    	  }, ... ]
           }
        }
      }
    
    stanza. Everything from `expose` and below is new, and partially implements
    the precedent set by Consul:
      https://www.consul.io/docs/connect/registration/service-registration.html#expose-paths-configuration-reference
    
    Combined with a task-group level network port-mapping in the form:
    
      port "exposeExample" { to = -1 }
    
    it is now possible to "punch a hole" through the network namespace
    to a specific HTTP or gRPC path, with the anticipated use case of creating
    Consul checks on Connect enabled services.
    
    A future PR may introduce more automagic behavior, where we can do things like
    
    1) auto-fill the 'expose.path.local_path_port' with the default value of the
       'service.port' value for task-group level connect-enabled services.
    
    2) automatically generate a port-mapping
    
    3) enable an 'expose.checks' flag which automatically creates exposed endpoints
       for every compatible consul service check (http/grpc checks on connect
       enabled services).
    shoenig committed Mar 31, 2020
    Configuration menu
    Copy the full SHA
    2a9749c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee3b43e View commit details
    Browse the repository at this point in the history