Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ServiceHTTPPort is the port that we setup our Serving and Activator K8s services for // HTTP/1 endpoints. ServiceHTTPPort = 80 // ServiceHTTP2Port is the port that we setup our Serving and Activator K8s services for // HTTP/2 endpoints. ServiceHTTP2Port = 81 // BackendHTTPPort is the backend, i.e. `targetPort` that we setup for HTTP services. BackendHTTPPort = 8012 // BackendHTTP2Port is the backend, i.e. `targetPort` that we setup for HTTP services. BackendHTTP2Port = 8013 // RequestQueueAdminPort specifies the port number for // health check and lifecyle hooks for queue-proxy. RequestQueueAdminPort = 8022 // RequestQueueMetricsPort specifies the port number for metrics emitted // by queue-proxy. RequestQueueMetricsPort = 9090 // ServicePortNameHTTP1 is the name of the external port of the service for HTTP/1.1 ServicePortNameHTTP1 = "http" // ServicePortNameH2C is the name of the external port of the service for HTTP/2 ServicePortNameH2C = "http2" )
The ports we setup on our services.
View Source
const ( // GroupName is the name for the networking API group. GroupName = "networking.internal.knative.dev" // IngressClassAnnotationKey is the annotation for the // explicit class of ClusterIngress that a particular resource has // opted into. For example, // // networking.knative.dev/ingress.class: some-network-impl // // This uses a different domain because unlike the resource, it is // user-facing. // // The parent resource may use its own annotations to choose the // annotation value for the ClusterIngress it uses. Based on such // value a different reconciliation logic may be used (for examples, // Istio-based ClusterIngress will reconcile into a VirtualService). IngressClassAnnotationKey = "networking.knative.dev/ingress.class" // IngressLabelKey is the label key attached to underlying network programming // resources to indicate which ClusterIngress triggered their creation. IngressLabelKey = GroupName + "/clusteringress" // SKSLabelKey is the label key that SKS Controller attaches to the // underlying resources it controls. SKSLabelKey = GroupName + "/serverlessservice" // ServiceTypeKey is the label key attached to a service specifying the type of service. // e.g. Public, Metrics ServiceTypeKey = GroupName + "/serviceType" // OriginSecretNameLabelKey is the label key attached to the TLS secret to indicate // the name of the origin secret that the TLS secret is copied from. OriginSecretNameLabelKey = GroupName + "/originSecretName" // OriginSecretNamespaceLabelKey is the label key attached to the TLS secret // to indicate the namespace of the origin secret that the TLS secret is copied from. OriginSecretNamespaceLabelKey = GroupName + "/originSecretNamespace" )
Variables ¶
View Source
var ( // DefaultTimeout will be set if timeout not specified. DefaultTimeout = 10 * time.Minute // DefaultRetryCount will be set if Attempts not specified. DefaultRetryCount = 3 )
Pseudo-constants
Functions ¶
func ServicePort ¶ added in v0.6.0
func ServicePort(proto ProtocolType) int
ServicePort chooses the service (load balancer) port for the public service.
func ServicePortName ¶ added in v0.6.0
func ServicePortName(proto ProtocolType) string
ServicePortName returns the port for the app level protocol.
Types ¶
type ProtocolType ¶ added in v0.5.0
type ProtocolType string
ProtocolType is an enumeration of the supported application-layer protocols See also: https://github.com/knative/serving/blob/master/docs/runtime-contract.md#protocols-and-ports
const ( // ProtocolHTTP1 maps to HTTP/1.1. ProtocolHTTP1 ProtocolType = "http1" // ProtocolH2C maps to HTTP/2 with Prior Knowledge. ProtocolH2C ProtocolType = "h2c" )
func (ProtocolType) Validate ¶ added in v0.5.0
func (p ProtocolType) Validate(context.Context) *apis.FieldError
Validate validates that ProtocolType has a correct enum value.
type ServiceType ¶ added in v0.6.0
type ServiceType string
ServiceType is the enumeration type for the Kubernetes services that we have in our system, classified by usage purpose.
const ( // ServiceTypePrivate is the label value for internal only services // for user applications. ServiceTypePrivate ServiceType = "Private" // ServiceTypePublic is the label value for externally reachable // services for user applications. ServiceTypePublic ServiceType = "Public" // ServiceTypeMetrics is the label value for Metrics services. Such services // are used for meric scraping. ServiceTypeMetrics ServiceType = "Metrics" )
Click to show internal directories.
Click to hide internal directories.