v1alpha1

package
v0.0.0-...-05c4727 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the cdn v1alpha1 API group +kubebuilder:object:generate=true +groupName=cdn.redcoat.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "cdn.redcoat.dev", 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 ClusterDistributionClass

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

	Spec DistributionClassSpec `json:"spec,omitempty"`
}

A DistributionClass represents a cluster-scoped configuration for a third party Content Delivery Network / Edge Cache (eg CloudFront). This holds generic configuration about a CDN integration, such as access tokens, or other CDN-specific configurations.

+kubebuilder:object:root=true +kubebuilder:resource:scope=Cluster +kubebuilder:subresource:status

func (*ClusterDistributionClass) DeepCopy

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

func (*ClusterDistributionClass) DeepCopyInto

func (in *ClusterDistributionClass) DeepCopyInto(out *ClusterDistributionClass)

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

func (*ClusterDistributionClass) DeepCopyObject

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

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

type ClusterDistributionClassList

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

ClusterDistributionClassList contains a list of ClusterDistributionClass +kubebuilder:object:root=true

func (*ClusterDistributionClassList) DeepCopy

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

func (*ClusterDistributionClassList) DeepCopyInto

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

func (*ClusterDistributionClassList) DeepCopyObject

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

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

type Distribution

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

	Spec DistributionSpec `json:"spec"`

	// +optional
	Status DistributionStatus `json:"status"`
}

A distribution resource should be created to ensure an up to date Distribution is setup. If targetted at a service or ingress, the Distribution will be kept up to date with its external ingress address. The Distribution will also keep up to date with any changes or renewals made the TLS certificate secret it is given.

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:JSONPath=".status.ready",name=Ready,type=boolean +kubebuilder:printcolumn:JSONPath=".status.endpoints[0].host",name=Endpoint,type=string

func (*Distribution) DeepCopy

func (in *Distribution) DeepCopy() *Distribution

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

func (*Distribution) DeepCopyInto

func (in *Distribution) DeepCopyInto(out *Distribution)

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

func (*Distribution) DeepCopyObject

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

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

type DistributionClass

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

	Spec DistributionClassSpec `json:"spec,omitempty"`
}

A DistributionClass represents a namespaced-scoped configuration for a third party Content Delivery Network / Edge Cache (eg CloudFront). This holds generic configuration about a CDN integration, such as access tokens, or other CDN-specific configurations.

+kubebuilder:object:root=true +kubebuilder:subresource:status

func (*DistributionClass) DeepCopy

func (in *DistributionClass) DeepCopy() *DistributionClass

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

func (*DistributionClass) DeepCopyInto

func (in *DistributionClass) DeepCopyInto(out *DistributionClass)

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

func (*DistributionClass) DeepCopyObject

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

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

type DistributionClassList

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

DistributionClassList contains a list of DistributionClasses +kubebuilder:object:root=true

func (*DistributionClassList) DeepCopy

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

func (*DistributionClassList) DeepCopyInto

func (in *DistributionClassList) DeepCopyInto(out *DistributionClassList)

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

func (*DistributionClassList) DeepCopyObject

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

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

type DistributionClassSpec

type DistributionClassSpec struct {
	Providers ProviderList `json:"providers"`
}

Configuration for the DistributionClass or ClusterDistributionClass resource

func (*DistributionClassSpec) DeepCopy

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

func (*DistributionClassSpec) DeepCopyInto

func (in *DistributionClassSpec) DeepCopyInto(out *DistributionClassSpec)

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

type DistributionList

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

DistributionList contains a list of Distributions +kubebuilder:object:root=true

func (*DistributionList) DeepCopy

func (in *DistributionList) DeepCopy() *DistributionList

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

func (*DistributionList) DeepCopyInto

func (in *DistributionList) DeepCopyInto(out *DistributionList)

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

func (*DistributionList) DeepCopyObject

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

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

type DistributionSpec

type DistributionSpec struct {
	// Reference to the Distribution Class provider to use for this
	// distribution
	DistributionClassRef ObjectReference `json:"distributionClass"`

	// Information about the "Origin" for the distribution, ie where the CDN
	// should be setup to point to. We would normally expect this to be this
	// kubernetes cluster, although it does not have to be.
	Origin Origin `json:"origin"`

	// The list of host names that this distribition is for, following the
	// same rules as the host field of an IngressRule, namely that it is a
	// fully qualified domain name, as defined by RFC 3986 with two
	// exceptions: 1. IP address are not allowed. Content Delivery
	// Networks and edge caches manage their own IP addresses, and
	// listening on these specifically neither makes sense, or is allowed
	// by providers. 2. The `:` delimeter is not allowed. Most CDNs always
	// use port 80 for HTTP and 443 for HTTPS and these are not
	// configurable. If you are using TLS, each of these host names _must_
	// exist within the given certificate. Warning: If you are using
	// CloudFront, you must also specify a TLS certificate if you give a
	// list of hosts.
	Hosts []string `json:"hosts"`

	// The TLS configuration for this distribution (eg the secret name for
	// the TLS certificate, and how to handle insecure requests).
	// +optional
	TLS *TLSSpec `json:"tls"`
}

The desired state of the Distribution

func (*DistributionSpec) DeepCopy

func (in *DistributionSpec) DeepCopy() *DistributionSpec

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

func (*DistributionSpec) DeepCopyInto

func (in *DistributionSpec) DeepCopyInto(out *DistributionSpec)

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

type DistributionStatus

type DistributionStatus struct {
	Ready bool `json:"ready"`

	// List of one or more "endpoints" for the deployed distribution.
	// These can be either hostnames for DNS CNAMING, or direct IP
	// addresses, depending on the provider.
	//+optional
	Endpoints []Endpoint `json:"endpoints"`

	// The external provider's Identifier for the distribution
	// +optional
	ExternalId string `json:"externalId"`

	// If a TLS certificate is associated with the distribution, this is
	// its identifier in the external provider
	// +optional
	ExternalCertificateId string `json:"externalCertificateId"`

	// A status message from the external provider
	// +optional
	ExternalStatus string `json:"externalStatus,omitempty"`
}

The current State of the Distribution

func (*DistributionStatus) DeepCopy

func (in *DistributionStatus) DeepCopy() *DistributionStatus

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

func (*DistributionStatus) DeepCopyInto

func (in *DistributionStatus) DeepCopyInto(out *DistributionStatus)

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

type Endpoint

type Endpoint struct {
	// A hostname that the distribution is available at. This is what you
	// would use in an DNS CNAME record. At least one of "Host" and "IP"
	// must be set for each Endpoint.
	// +optional
	Host string `json:"host,omitempty"`

	// An IP address that the distribution is available at. This is what
	// you would use in a DNS A or AAAA record. At least one of "Host" and
	// "IP" must be set for each Endpoint.
	// +optional
	IP string `json:"ip,omitempty"`
}

Information about a specific Endpoint

This must always contain a Provider identifier, as all endpoints are associated with one. It can then have a hostname, IP address, or both. If it has both, these should be the same resource, eg:

Acceptable:

  • ip: 1.2.3.4 host: lb-1-2-3-4.provider.example.com

Not Acceptable:

  • ip: 1.2.3.4 host: lb-4-5-6-7.provider.example.com

If there are two distinct endpoints, one with an ip and one with host, just specify these as seperate Endpoint items: - ip: 1.2.3.4 - host: lb-4-5-6-7.provider.example.com

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

type ObjectReference

type ObjectReference struct {
	// The kind of resource to target
	Kind string `json:"kind"`

	// The name of the resource to target. This must be in the same
	// namespace as the Distribution resource.
	Name string `json:"name"`
}

Used to reference another kubernetes resource in the same namespace

func (*ObjectReference) DeepCopy

func (in *ObjectReference) DeepCopy() *ObjectReference

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

func (*ObjectReference) DeepCopyInto

func (in *ObjectReference) DeepCopyInto(out *ObjectReference)

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

type Origin

type Origin struct {
	// If you specify this, this takes precendence over any detected
	// ingress load balancer hostnames. Use this to override the target's
	// hostname, or if you have not specified a kubernetes target.
	Host string `json:"host"`

	// The port to target for HTTP requests. If not given, this defaults
	// to 80.
	// +kubebuilder:default=80
	// +optional
	HTTPPort int32 `json:"httpPort"`

	// The port to target for HTTPS requests. If not given, this defaults
	// to 443.
	// +kubebuilder:default=443
	// +optional
	HTTPSPort int32 `json:"httpsPort"`
}

Options for the "origin" of the distribition - ie where the CDN points to.

func (*Origin) DeepCopy

func (in *Origin) DeepCopy() *Origin

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

func (*Origin) DeepCopyInto

func (in *Origin) DeepCopyInto(out *Origin)

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

type ProviderList

type ProviderList struct {
	// If this block exists, Distributions referencing this
	// DistributionClass will be setup in CloudFront. You can specify an
	// Access Key and Secret key in this block, or authorize the pod
	// directly by setting the AWS_ACCESS_KEY_ID / AWS_ACCESS_KEY_ID
	// environment variables, or using AWS' IAM Roles For Service Accounts
	// (IRSA) Controller.
	// +optional
	CloudFront *cfapi.CloudFrontSpec `json:"cloudfront,omitempty"`
}

func (*ProviderList) DeepCopy

func (in *ProviderList) DeepCopy() *ProviderList

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

func (*ProviderList) DeepCopyInto

func (in *ProviderList) DeepCopyInto(out *ProviderList)

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

type TLSSpec

type TLSSpec struct {
	// Sets how TLS is handled by the distribution:
	// Redirect (default) causes HTTP requests to be redirected to HTTPS,
	// Only causes HTTP requests to be dropped,
	// Both causes both HTTP and HTTPs requests to be respected.
	// NB: Different cloud providers may vary in the way they interpret
	// or respect this directive.
	// +kubebuilder:validation:Enum=redirect;only;both
	// +kubebuilder:default=redirect
	Mode string `json:"mode"`

	// The name of the kubernetes secret containing the TLS certificate
	// to be used by the distribution. This should be of type
	// kubernetes.io/tls and have the required fields (tls.crt and
	// tls.key). Other fields are ignored.
	SecretRef string `json:"secretName"`
}

Options to control the way TLS works within this distribution

func (*TLSSpec) DeepCopy

func (in *TLSSpec) DeepCopy() *TLSSpec

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

func (*TLSSpec) DeepCopyInto

func (in *TLSSpec) DeepCopyInto(out *TLSSpec)

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