Endpoints are in a beta state and may not be available on your Apollo Hub. Contact your Palantir representative to learn more.
This extension of the specification defines how a service should declare endpoints for:
A product must declare 1 or more endpoints in the configuration.yml
file under the top level key endpoints
.
The endpoints
block consists of the following keys:
sls-status-endpoint
: String value that declares a specific endpoint from the definitions
block as the SLS status endpoint. This key can be omitted if there is only 1 endpoint in the definitions block.definitions
: A map of endpoint names to endpoint objects. The endpoint name is a kebab-cased string satisfying the character set [a-z0-9] and must be unique within a service. All endpoint objects assume the protocol is TCP.The endpoint object has the following fields:
/
. If absent, this value defaults to /
.A product may have multiple endpoints with the same port, as long as they have different paths.
Services can access their endpoints using the substitution language's support for referencing endpoint definitions.
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
endpoints: sls-status-endpoint: service-endpoint // (optional) specifies an endpoint in the definitions block that // serves SLS status checks, can // be omitted if definitions only have 1 endpoint definitions: // (required) defines a map of endpoints for // the service, must have at least 1 version-endpoint: // (required) names are unique across a service desired-port: 9000 // (required) port number path: /version // (optional) context path if applicable, defaults to / ping-endpoint: desired-port: 9001 upgrade-endpoint: desired-port: 90001 path: /upgrade service-endpoint: desired-port: 8080 path: /my-app
The following optional fields are added to the extensions
block of the manifest:
configuration.yml
's endpoints
block.public-tcp-endpoints
and public-proxy-endpoints
.configuration.yml
's endpoints
block.public-tcp-endpoints
and public-proxy-endpoints
.public-udp-endpoints
and public-tcp-endpoints
if the endpoint would like to receive UDP/TCP traffic to the same external-port
.public-udp-endpoints
and public-proxy-endpoints
.public-udp-endpoints
and public-tcp-endpoints
if the endpoint would like to receive UDP/TCP traffic to the same external-port
.The following manifest.yml
and configuration.yml
illustrates how a service would use the above fields.
Copied!1 2 3 4 5 6 7 8
# manifest.yml extensions: public-proxy-endpoints: - service-endpoint public-tcp-endpoints: - tcp-service-endpoint public-udp-endpoints: - udp-service-endpoint
Copied!1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
# configuration.yml endpoints: definitions: service-endpoint: desired-port: 8080 path: /my-service-endpoint-path tcp-service-endpoint: desired-port: 4567 external-port: 22 udp-service-endpoint: desired-port: 5678 external-port: 1234 default_conf: server: my-service: port: '{{ endpoints.definitions.service-endpoint.port}}' path: '{{ endpoints.definitions.service-endpoint.path }}' my-tcp: port: '{{ endpoints.definitions.tcp-service-endpoint.port}}' my-udp: port: '{{ endpoints.definitions.udp-service-endpoint.port}}'
With the definition above, SLS liveness and readiness checks will hit port 8080 of the service.
Since public-proxy-endpoints
lists the service-endpoint
, the service endpoint will be exposed outside of the cluster at the path /my-service-endpoint-path
.