Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StatusPrefix is the prefix used in annotations used to record // debug information in the Ingress annotations. StatusPrefix = "ingress.kubernetes.io" // AllowHTTPKey tells the Ingress controller to allow/block HTTP access. // If either unset or set to true, the controller will create a // forwarding-rule for port 80, and any additional rules based on the TLS // section of the Ingress. If set to false, the controller will only create // rules for port 443 based on the TLS section. AllowHTTPKey = "kubernetes.io/ingress.allow-http" // StaticIPNameKey tells the Ingress controller to use a specific GCE // static ip for its forwarding rules. If specified, the Ingress controller // assigns the static ip by this name to the forwarding rules of the given // Ingress. The controller *does not* manage this ip, it is the users // responsibility to create/delete it. StaticIPNameKey = "kubernetes.io/ingress.global-static-ip-name" // certicate for the Ingress controller to use. The controller *does not* // manage this certificate, it is the users responsibility to create/delete it. // In GCP, the Ingress controller assigns the SSL certificate with this name // to the target proxies of the Ingress. PreSharedCertKey = "ingress.gcp.kubernetes.io/pre-shared-cert" // IngressClassKey picks a specific "class" for the Ingress. The controller // only processes Ingresses with this annotation either unset, or set // to either gceIngessClass or the empty string. IngressClassKey = "kubernetes.io/ingress.class" GceIngressClass = "gce" GceMultiIngressClass = "gce-multi-cluster" // Label key to denote which GCE zone a Kubernetes node is in. ZoneKey = "failure-domain.beta.kubernetes.io/zone" DefaultZone = "" // InstanceGroupsAnnotationKey is the annotation key used by controller to // specify the name and zone of instance groups created for the ingress. // This is read only for users. Controller will overrite any user updates. // This is only set for ingresses with ingressClass = "gce-multi-cluster" InstanceGroupsAnnotationKey = "ingress.gcp.kubernetes.io/instance-groups" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppProtocol ¶
type AppProtocol string
AppProtocol describes the service protocol.
const ( // ServiceApplicationProtocolKey is a stringified JSON map of port names to // protocol strings. Possible values are HTTP, HTTPS // Example: // '{"my-https-port":"HTTPS","my-http-port":"HTTP"}' ServiceApplicationProtocolKey = "service.alpha.kubernetes.io/app-protocols" // NetworkEndpointGroupAlphaAnnotation is the annotation key to enable GCE NEG feature for ingress backend services. // To enable this feature, the value of the annotation must be "true". // This annotation should be specified on services that are backing ingresses. // WARNING: The feature will NOT be effective in the following circumstances: // 1. NEG feature is not enabled in feature gate. // 2. Service is not referenced in any ingress. // 3. Adding this annotation on ingress. NetworkEndpointGroupAlphaAnnotation = "alpha.cloud.google.com/load-balancer-neg" // ProtocolHTTP protocol for a service ProtocolHTTP AppProtocol = "HTTP" // ProtocolHTTPS protocol for a service ProtocolHTTPS AppProtocol = "HTTPS" // ProtocolHTTP2 protocol for a service ProtocolHTTP2 AppProtocol = "HTTP2" )
type Ingress ¶
type Ingress struct {
// contains filtered or unexported fields
}
Ingress represents ingress annotations.
func FromIngress ¶
func FromIngress(ing *extensions.Ingress) *Ingress
FromIngress extracts the annotations from an Ingress definition.
func (*Ingress) IngressClass ¶
func (*Ingress) StaticIPName ¶
func (*Ingress) UseNamedTLS ¶
UseNamedTLS returns the name of the GCE SSL certificate. Empty by default.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents Service annotations.
func FromService ¶
FromService extracts the annotations from an Service definition.
func (Service) ApplicationProtocols ¶
func (svc Service) ApplicationProtocols() (map[string]AppProtocol, error)
ApplicationProtocols returns a map of port (name or number) to the protocol on the port.
func (Service) NEGEnabled ¶
NEGEnabled is true if the service uses NEGs.
Click to show internal directories.
Click to hide internal directories.