v1alpha1

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group +kubebuilder:object:generate=true +groupName=operator.projectcontour.io

Index

Constants

View Source
const (
	// OwningContourNameLabel is the owner reference label used for a Contour
	// created by the operator. The value should be the name of the contour.
	OwningContourNameLabel = "contour.operator.projectcontour.io/owning-contour-name"

	// OwningContourNsLabel is the owner reference label used for a Contour
	// created by the operator. The value should be the namespace of the contour.
	OwningContourNsLabel = "contour.operator.projectcontour.io/owning-contour-namespace"

	// ContourFinalizer is the name of the finalizer used for a Contour.
	ContourFinalizer = "contour.operator.projectcontour.io/finalizer"
)
View Source
const (
	// GatewayClassControllerRef identifies contour operator as the managing controller
	// of a GatewayClass.
	GatewayClassControllerRef = "projectcontour.io/contour-operator"

	// GatewayClassParamsRefGroup identifies contour operator as the group name of a
	// GatewayClass.
	GatewayClassParamsRefGroup = "operator.projectcontour.io"

	// GatewayClassParamsRefKind identifies Contour as the kind name of a GatewayClass.
	GatewayClassParamsRefKind = "Contour"

	// GatewayFinalizer is the name of the finalizer used for a Gateway.
	GatewayFinalizer = "gateway.networking.x-k8s.io/finalizer"

	// OwningGatewayNameLabel is the owner reference label used for a Gateway
	// managed by the operator. The value should be the name of the Gateway.
	OwningGatewayNameLabel = "contour.operator.projectcontour.io/owning-gateway-name"

	// OwningGatewayNsLabel is the owner reference label used for a Gateway
	// managed by the operator. The value should be the namespace of the Gateway.
	OwningGatewayNsLabel = "contour.operator.projectcontour.io/owning-gateway-namespace"
)
View Source
const (
	// Available indicates that the contour is running and available.
	ContourAvailableConditionType = "Available"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "operator.projectcontour.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ContainerPort added in v1.12.0

type ContainerPort struct {
	// Name is an IANA_SVC_NAME within the pod.
	//
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	Name string `json:"name"`

	// PortNumber is the network port number to expose on the envoy pod.
	// The number must be greater than 0 and less than 65536.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	PortNumber int32 `json:"portNumber"`
}

ContainerPort is the schema to specify a network port for a container. A container port gives the system additional information about network connections a container uses, but is primarily informational.

func (*ContainerPort) DeepCopy added in v1.12.0

func (in *ContainerPort) DeepCopy() *ContainerPort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerPort.

func (*ContainerPort) DeepCopyInto added in v1.12.0

func (in *ContainerPort) DeepCopyInto(out *ContainerPort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Contour

type Contour struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of Contour.
	Spec ContourSpec `json:"spec,omitempty"`
	// Status defines the observed state of Contour.
	Status ContourStatus `json:"status,omitempty"`
}

Contour is the Schema for the contours API. +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Available")].status` +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=="Available")].reason`

func (*Contour) DeepCopy

func (in *Contour) DeepCopy() *Contour

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Contour.

func (*Contour) DeepCopyInto

func (in *Contour) DeepCopyInto(out *Contour)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Contour) DeepCopyObject

func (in *Contour) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Contour) GatewayClassSet added in v1.13.0

func (c *Contour) GatewayClassSet() bool

GatewayClassSet returns true if gatewayClassRef is set for Contour.

func (*Contour) IsFinalized added in v1.13.0

func (c *Contour) IsFinalized() bool

IsFinalized returns true if Contour is finalized.

type ContourList

type ContourList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Contour `json:"items"`
}

ContourList contains a list of Contour.

func (*ContourList) DeepCopy

func (in *ContourList) DeepCopy() *ContourList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContourList.

func (*ContourList) DeepCopyInto

func (in *ContourList) DeepCopyInto(out *ContourList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ContourList) DeepCopyObject

func (in *ContourList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ContourSpec

type ContourSpec struct {
	// Replicas is the desired number of Contour replicas. If unset,
	// defaults to 2.
	//
	// +kubebuilder:default=2
	// +kubebuilder:validation:Minimum=0
	Replicas int32 `json:"replicas,omitempty"`

	// Namespace defines the schema of a Contour namespace. See each field for
	// additional details. Namespace name should be the same namespace as the
	// Gateway when GatewayClassRef is set.
	//
	// TODO [danehans]: Ignore Namespace when GatewayClassRef is set.
	// xref: https://github.com/projectcontour/contour-operator/issues/212
	//
	// +kubebuilder:default={name: "projectcontour", removeOnDeletion: false}
	Namespace NamespaceSpec `json:"namespace,omitempty"`

	// NetworkPublishing defines the schema for publishing Contour to a network.
	//
	// See each field for additional details.
	//
	// +kubebuilder:default={envoy: {type: LoadBalancerService, containerPorts: {{name: http, portNumber: 8080}, {name: https, portNumber: 8443}}}}
	NetworkPublishing NetworkPublishing `json:"networkPublishing,omitempty"`

	// GatewayClassRef is a reference to a GatewayClass name used for
	// managing a Contour.
	//
	// +kubebuilder:validation:MaxLength=253
	// +optional
	GatewayClassRef *string `json:"gatewayClassRef,omitempty"`

	// IngressClassName is the name of the IngressClass used by Contour. If unset,
	// Contour will process all ingress objects without an ingress class annotation
	// or ingress objects with an annotation matching ingress-class=contour. When
	// specified, Contour will only process ingress objects that match the provided
	// class.
	//
	// For additional IngressClass details, refer to:
	//   https://projectcontour.io/docs/main/config/annotations/#ingress-class
	//
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	// +optional
	IngressClassName *string `json:"ingressClassName,omitempty"`
}

ContourSpec defines the desired state of Contour.

func (*ContourSpec) DeepCopy

func (in *ContourSpec) DeepCopy() *ContourSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContourSpec.

func (*ContourSpec) DeepCopyInto

func (in *ContourSpec) DeepCopyInto(out *ContourSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContourStatus

type ContourStatus struct {
	// AvailableContours is the number of observed available replicas
	// according to the Contour deployment. The deployment and its pods
	// will reside in the namespace specified by spec.namespace.name of
	// the contour.
	AvailableContours int32 `json:"availableContours"`

	// AvailableEnvoys is the number of observed available pods from
	// the Envoy daemonset. The daemonset and its pods will reside in the
	// namespace specified by spec.namespace.name of the contour.
	AvailableEnvoys int32 `json:"availableEnvoys"`

	// Conditions represent the observations of a contour's current state.
	// Known condition types are "Available". Reference the condition type
	// for additional details.
	//
	// TODO [danehans]: Add support for "Progressing" and "Degraded"
	// condition types.
	//
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

ContourStatus defines the observed state of Contour.

func (*ContourStatus) DeepCopy

func (in *ContourStatus) DeepCopy() *ContourStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContourStatus.

func (*ContourStatus) DeepCopyInto

func (in *ContourStatus) DeepCopyInto(out *ContourStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EnvoyNetworkPublishing added in v1.12.0

type EnvoyNetworkPublishing struct {
	// Type is the type of publishing strategy to use. Valid values are:
	//
	// * LoadBalancerService
	//
	// In this configuration, network endpoints for Envoy use container networking.
	// A Kubernetes LoadBalancer Service is created to publish Envoy network
	// endpoints. The Service uses port 80 to publish Envoy's HTTP network endpoint
	// and port 443 to publish Envoy's HTTPS network endpoint.
	//
	// See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
	//
	// * NodePortService
	//
	// Publishes Envoy network endpoints using a Kubernetes NodePort Service.
	//
	// In this configuration, Envoy network endpoints use container networking. A Kubernetes
	// NodePort Service is created to publish the network endpoints.
	//
	// See: https://kubernetes.io/docs/concepts/services-networking/service/#nodeport
	//
	// * ClusterIPService
	//
	// Publishes Envoy network endpoints using a Kubernetes ClusterIP Service.
	//
	// In this configuration, Envoy network endpoints use container networking. A Kubernetes
	// ClusterIP Service is created to publish the network endpoints.
	//
	// See: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
	//
	// +unionDiscriminator
	// +kubebuilder:default=LoadBalancerService
	Type NetworkPublishingType `json:"type,omitempty"`

	// loadBalancer holds parameters for the load balancer. Present only if type is
	// LoadBalancerService.
	//
	// If unspecified, defaults to an external Classic AWS ELB.
	//
	// +kubebuilder:default={scope: External, providerParameters: {type: AWS}}
	LoadBalancer LoadBalancerStrategy `json:"loadBalancer,omitempty"`

	// NodePorts is a list of network ports to expose on each node's IP at a static
	// port number using a NodePort Service. Present only if type is NodePortService.
	// A ClusterIP Service, which the NodePort Service routes to, is automatically
	// created. You'll be able to contact the NodePort Service, from outside the
	// cluster, by requesting <NodeIP>:<NodePort>.
	//
	// If type is NodePortService and nodePorts is unspecified, two nodeports will be
	// created, one named "http" and the other named "https", with port numbers auto
	// assigned by Kubernetes API server. For additional information on the NodePort
	// Service, see:
	//
	//  https://kubernetes.io/docs/concepts/services-networking/service/#nodeport
	//
	// Names and port numbers must be unique in the list. Two ports must be specified,
	// one named "http" for Envoy's insecure service and one named "https" for Envoy's
	// secure service.
	//
	// +kubebuilder:validation:MinItems=2
	// +kubebuilder:validation:MaxItems=2
	// +optional
	NodePorts []NodePort `json:"nodePorts,omitempty"`

	// ContainerPorts is a list of container ports to expose from the Envoy container(s).
	// Exposing a port here gives the system additional information about the network
	// connections the Envoy container uses, but is primarily informational. Not specifying
	// a port here DOES NOT prevent that port from being exposed by Envoy. Any port which is
	// listening on the default "0.0.0.0" address inside the Envoy container will be accessible
	// from the network. Names and port numbers must be unique in the list container ports. Two
	// ports must be specified, one named "http" for Envoy's insecure service and one named
	// "https" for Envoy's secure service.
	//
	// TODO [danehans]: Update minItems to 1, requiring only https when the following issue
	// is fixed: https://github.com/projectcontour/contour/issues/2577.
	//
	// TODO [danehans]: Increase maxItems when https://github.com/projectcontour/contour/pull/3263
	// is implemented.
	//
	// +kubebuilder:validation:MinItems=2
	// +kubebuilder:validation:MaxItems=2
	// +kubebuilder:default={{name: http, portNumber: 8080}, {name: https, portNumber: 8443}}
	ContainerPorts []ContainerPort `json:"containerPorts,omitempty"`
}

EnvoyNetworkPublishing defines the schema to publish Envoy to a network. +union

func (*EnvoyNetworkPublishing) DeepCopy added in v1.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyNetworkPublishing.

func (*EnvoyNetworkPublishing) DeepCopyInto added in v1.12.0

func (in *EnvoyNetworkPublishing) DeepCopyInto(out *EnvoyNetworkPublishing)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadBalancerProviderType added in v1.12.0

type LoadBalancerProviderType string

LoadBalancerProviderType is the underlying infrastructure provider for the load balancer. Allowed values are "AWS", "Azure", and "GCP".

+kubebuilder:validation:Enum=AWS;Azure;GCP

const (
	AWSLoadBalancerProvider   LoadBalancerProviderType = "AWS"
	AzureLoadBalancerProvider LoadBalancerProviderType = "Azure"
	GCPLoadBalancerProvider   LoadBalancerProviderType = "GCP"
)

type LoadBalancerScope added in v1.12.0

type LoadBalancerScope string

LoadBalancerScope is the scope at which a load balancer is exposed. +kubebuilder:validation:Enum=Internal;External

var (
	// InternalLoadBalancer is a load balancer that is exposed only on the
	// cluster's private network.
	InternalLoadBalancer LoadBalancerScope = "Internal"

	// ExternalLoadBalancer is a load balancer that is exposed on the
	// cluster's public network (which is typically on the Internet).
	ExternalLoadBalancer LoadBalancerScope = "External"
)

type LoadBalancerStrategy added in v1.12.0

type LoadBalancerStrategy struct {
	// Scope indicates the scope at which the load balancer is exposed.
	// Possible values are "External" and "Internal".
	//
	// +kubebuilder:default=External
	Scope LoadBalancerScope `json:"scope,omitempty"`

	// providerParameters contains load balancer information specific to
	// the underlying infrastructure provider.
	//
	// +kubebuilder:default={type: "AWS"}
	ProviderParameters ProviderLoadBalancerParameters `json:"providerParameters,omitempty"`
}

LoadBalancerStrategy holds parameters for a load balancer.

func (*LoadBalancerStrategy) DeepCopy added in v1.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStrategy.

func (*LoadBalancerStrategy) DeepCopyInto added in v1.12.0

func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NamespaceSpec

type NamespaceSpec struct {
	// Name is the name of the namespace to run Contour and dependent
	// resources. If unset, defaults to "projectcontour".
	//
	// +kubebuilder:default=projectcontour
	Name string `json:"name,omitempty"`

	// RemoveOnDeletion will remove the namespace when the Contour is
	// deleted. If set to True, deletion will not occur if any of the
	// following conditions exist:
	//
	// 1. The Contour namespace is "default", "kube-system" or the
	//    contour-operator's namespace.
	//
	// 2. Another Contour exists in the namespace.
	//
	// 3. The namespace does not contain the Contour owning label.
	//
	// +kubebuilder:default=false
	RemoveOnDeletion bool `json:"removeOnDeletion,omitempty"`
}

NamespaceSpec defines the schema of a Contour namespace.

func (*NamespaceSpec) DeepCopy

func (in *NamespaceSpec) DeepCopy() *NamespaceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSpec.

func (*NamespaceSpec) DeepCopyInto

func (in *NamespaceSpec) DeepCopyInto(out *NamespaceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkPublishing added in v1.12.0

type NetworkPublishing struct {
	// Envoy provides the schema for publishing the network endpoints of Envoy.
	//
	// If unset, defaults to:
	//   type: LoadBalancerService
	//   containerPorts:
	//   - name: http
	//     portNumber: 8080
	//   - name: https
	//     portNumber: 8443
	//
	// +kubebuilder:default={type: LoadBalancerService, loadBalancer: {scope: External, providerParameters: {type: AWS}}, containerPorts: {{name: http, portNumber: 8080}, {name: https, portNumber: 8443}}}
	Envoy EnvoyNetworkPublishing `json:"envoy,omitempty"`
}

NetworkPublishing defines the schema for publishing Contour to a network.

func (*NetworkPublishing) DeepCopy added in v1.12.0

func (in *NetworkPublishing) DeepCopy() *NetworkPublishing

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPublishing.

func (*NetworkPublishing) DeepCopyInto added in v1.12.0

func (in *NetworkPublishing) DeepCopyInto(out *NetworkPublishing)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type NetworkPublishingType added in v1.12.0

type NetworkPublishingType string

EndpointPublishingType is a way to publish network endpoints. +kubebuilder:validation:Enum=LoadBalancerService;NodePortService;ClusterIPService

const (
	// LoadBalancerService publishes a network endpoint using a Kubernetes LoadBalancer
	// Service.
	LoadBalancerServicePublishingType NetworkPublishingType = "LoadBalancerService"

	// NodePortService publishes a network endpoint using a Kubernetes NodePort Service.
	NodePortServicePublishingType NetworkPublishingType = "NodePortService"

	// ClusterIPServicePublishingType publishes a network endpoint using a Kubernetes
	// ClusterIP Service.
	ClusterIPServicePublishingType NetworkPublishingType = "ClusterIPService"
)

type NodePort added in v1.15.0

type NodePort struct {
	// Name is an IANA_SVC_NAME within the NodePort Service.
	//
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=253
	Name string `json:"name"`

	// PortNumber is the network port number to expose for the NodePort Service.
	// If unspecified, a port number will be assigned from the the cluster's
	// nodeport service range, i.e. --service-node-port-range flag
	// (default: 30000-32767).
	//
	// If specified, the number must:
	//
	// 1. Not be used by another NodePort Service.
	// 2. Be within the cluster's nodeport service range, i.e. --service-node-port-range
	//    flag (default: 30000-32767).
	// 3. Be a valid network port number, i.e. greater than 0 and less than 65536.
	//
	// +optional
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	PortNumber *int32 `json:"portNumber,omitempty"`
}

NodePort is the schema to specify a network port for a NodePort Service.

func (*NodePort) DeepCopy added in v1.15.0

func (in *NodePort) DeepCopy() *NodePort

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePort.

func (*NodePort) DeepCopyInto added in v1.15.0

func (in *NodePort) DeepCopyInto(out *NodePort)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProviderLoadBalancerParameters added in v1.12.0

type ProviderLoadBalancerParameters struct {
	// type is the underlying infrastructure provider for the load balancer.
	// Allowed values are "AWS", "Azure", and "GCP".
	//
	// +unionDiscriminator
	// +kubebuilder:default=AWS
	Type LoadBalancerProviderType `json:"type,omitempty"`
}

ProviderLoadBalancerParameters holds desired load balancer information specific to the underlying infrastructure provider.

+union

func (*ProviderLoadBalancerParameters) DeepCopy added in v1.12.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderLoadBalancerParameters.

func (*ProviderLoadBalancerParameters) DeepCopyInto added in v1.12.0

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL