Custom ngrok Annotations
The following custom annotations can be used with the ngrok Kubernetes operator to extend the functionality of various resources.
k8s.ngrok.com/traffic-policy
Allows you to supply an NgrokTrafficPolicy
to an Ingress
or Gateway
resource.
For more information about using traffic policies with Ingresses
and Gateway API, see the using Ingresses page and the using Gateway API page.
Usable On: Ingress
/Gateway
Example:
Loading…
k8s.ngrok.com/mapping-strategy
Allows you to control the way that the operator translates Ingress
, Gateway
and LoadBalancer
type Services
into ngrok custom resources.
By default, these resources will be translated into CloudEndpoint
and AgentEndpoint
custom resources, but you can opt to use the deprecated translation into HTTPSEdge
resources
before those are removed.
For more information about how the operator translates resources, see the using Ingresses page and the using Gateway API page.
Usable On: Ingress
/Gateway
Allowed Values: "endpoints"
/"edges"
Loading…
k8s.ngrok.com/pooling-enabled
Allows you to configure whether pooling should be enabled/disabled when the operator translates Ingress
and Gateway
resources into CloudEndpoints
.
By default, translated CloudEndpoint
resources will have poolingEnabled
set to false
, but this annotation allows you to enable it.
For more information about endpoint pooling, see the pooling page
Usable On: Ingress
/Gateway
Allowed Values: "true"
/"false"
Example:
Loading…
Due to how Kubernetes handles annotation values, the value of k8s.ngrok.com/pooling-enabled must be a string ("true"). Setting the value to true without surrounding it with quotes will not work.
k8s.ngrok.com/bindings
Allows you to specify the binding that should be used when the operator translates Ingress
and Gateway
resources into CloudEndpoints
.
By default, a binding of "public"
will be used, but this annotation allows you to create internal or Kubernetes bound CloudEndpoints
instead.
For more information about bindings, see the bindings page
Usable On: Ingress
/Gateway
Allowed Values: "internal"
/"public"
/"kubernetes"
Example:
Loading…
k8s.ngrok.com/app-protocols
Allows you to specify the protocol of ports on your service. Accepts a value that is a json string which maps the name of the
ports on your Service
to http
or https
. This annotation is optional, and when not used or a named port is not included in the annotation's value
then the ngrok Kubernetes operator will default to using http
for that port.
Usable On: Service
Example:
The following example will mark the following service as having one port that is https
and one port that is http
.
Loading…