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 // QueueAdminPort specifies the port number for // health check and lifecycle hooks for queue-proxy. QueueAdminPort = 8022 // AutoscalingQueueMetricsPort specifies the port number for metrics emitted // by queue-proxy for autoscaler. AutoscalingQueueMetricsPort = 9090 // UserQueueMetricsPort specifies the port number for metrics emitted // by queue-proxy for end user. UserQueueMetricsPort = 9091 // 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 Ingress 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 Ingress it uses. Based on such // value a different reconciliation logic may be used (for examples, // Istio-based Ingress 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 Ingress triggered their creation. IngressLabelKey = GroupName + "/ingress" // 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, Private. 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" // CertificateClassAnnotationKey is the annotation for the // explicit class of Certificate that a particular resource has // opted into. For example, // // networking.knative.dev/certificate.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 Certificate it uses. Based on such // value a different reconciliation logic may be used (for examples, // Cert-Manager-based Certificate will reconcile into a Cert-Manager Certificate). CertificateClassAnnotationKey = "networking.knative.dev/certificate.class" // ActivatorServiceName is the name of the activator Kubernetes service. ActivatorServiceName = "activator-service" // DisableWildcardCertLabelKey is the label key attached to a namespace to indicate that // a wildcard certificate should be not created for it. DisableWildcardCertLabelKey = GroupName + "/disableWildcardCert" // WildcardCertDomainLabelKey is the label key attached to a certificate to indicate the // domain for which it was issued. WildcardCertDomainLabelKey = "networking.knative.dev/wildcardDomain" // KnativeIngressGateway is the name of the ingress gateway KnativeIngressGateway = "knative-ingress-gateway" // ClusterLocalGateway is the name of the local gateway ClusterLocalGateway = "cluster-local-gateway" )
Variables ¶
View Source
var (
// 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" )
Click to show internal directories.
Click to hide internal directories.