v1alpha1

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

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

Index

Constants

View Source
const (
	ProviderSpecificWeight  = "weight"
	ProviderSpecificGeoCode = "geo-code"
)
View Source
const (
	// SecretTypeKuadrantAWS contains data needed for aws(route53) authentication and configuration.
	//
	// Required fields:
	// - Secret.Data["AWS_ACCESS_KEY_ID"] - aws access key id
	// - Secret.Data["AWS_SECRET_ACCESS_KEY"] - aws secret access key
	SecretTypeKuadrantAWS corev1.SecretType = "kuadrant.io/aws"

	// AWSAccessKeyIDKey is the key of the required AWS access key id for SecretTypeKuadrantAWS provider secrets
	AWSAccessKeyIDKey = "AWS_ACCESS_KEY_ID"
	// AWSSecretAccessKeyKey is the key of the required AWS secret access key for SecretTypeKuadrantAWS provider secrets
	AWSSecretAccessKeyKey = "AWS_SECRET_ACCESS_KEY"
	// AWSRegionKey is the key of the optional region for SecretTypeKuadrantAWS provider secrets
	AWSRegionKey = "AWS_REGION"

	// SecretTypeKuadrantGCP contains data needed for gcp(google cloud dns) authentication and configuration.
	//
	// Required fields:
	// - Secret.Data["GOOGLE"] - json formatted google credentials string
	// - Secret.Data["PROJECT_ID"] - google project id
	SecretTypeKuadrantGCP corev1.SecretType = "kuadrant.io/gcp"

	// GoogleJsonKey is the key of the required json formatted credentials string for SecretTypeKuadrantGCP provider secrets
	GoogleJsonKey = "GOOGLE"
	// GoogleProjectIDKey is the key of the required project id for SecretTypeKuadrantGCP provider secrets
	GoogleProjectIDKey = "PROJECT_ID"

	// SecretTypeKuadrantAzure contains data needed for azure authentication and configuration.
	//
	// Required fields:
	// - Secret.Data["azure.json"] - json formatted azure credentials string
	SecretTypeKuadrantAzure corev1.SecretType = "kuadrant.io/azure"

	// AzureJsonKey is the key of the required data for SecretTypeDockerConfigJson provider secrets
	AzureJsonKey = "azure.json"

	// SecretTypeKuadrantInmemory contains data needed for inmemory configuration.
	SecretTypeKuadrantInmemory corev1.SecretType = "kuadrant.io/inmemory"

	// InmemInitZonesKey is the key of the optional comma separated list of zone names to initialise in the SecretTypeKuadrantInmemory provider secrets
	InmemInitZonesKey = "INMEM_INIT_ZONES"
)
View Source
const WildcardPrefix = "*."

Variables

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

type AdditionalHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (*AdditionalHeader) DeepCopy

func (in *AdditionalHeader) DeepCopy() *AdditionalHeader

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

func (*AdditionalHeader) DeepCopyInto

func (in *AdditionalHeader) DeepCopyInto(out *AdditionalHeader)

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

type AdditionalHeaders

type AdditionalHeaders []AdditionalHeader

func (AdditionalHeaders) DeepCopy

func (in AdditionalHeaders) DeepCopy() AdditionalHeaders

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

func (AdditionalHeaders) DeepCopyInto

func (in AdditionalHeaders) DeepCopyInto(out *AdditionalHeaders)

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

type AdditionalHeadersRef

type AdditionalHeadersRef struct {
	Name string `json:"name"`
}

func (*AdditionalHeadersRef) DeepCopy

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

func (*AdditionalHeadersRef) DeepCopyInto

func (in *AdditionalHeadersRef) DeepCopyInto(out *AdditionalHeadersRef)

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

type ConditionReason added in v0.2.0

type ConditionReason string
const ConditionReasonAwaitingValidation ConditionReason = "AwaitingValidation"
const ConditionReasonHealthy ConditionReason = "AllChecksPassed"
const ConditionReasonPartiallyHealthy ConditionReason = "SomeChecksPassed"
const ConditionReasonProviderSuccess ConditionReason = "ProviderSuccess"
const ConditionReasonUnhealthy ConditionReason = "HealthChecksFailed"

type ConditionType added in v0.2.0

type ConditionType string
const ConditionTypeHealthy ConditionType = "Healthy"
const ConditionTypeReady ConditionType = "Ready"

type DNSHealthCheckProbe

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

	Spec   DNSHealthCheckProbeSpec   `json:"spec,omitempty"`
	Status DNSHealthCheckProbeStatus `json:"status,omitempty"`
}

DNSHealthCheckProbe is the Schema for the dnshealthcheckprobes API

func (*DNSHealthCheckProbe) DeepCopy

func (in *DNSHealthCheckProbe) DeepCopy() *DNSHealthCheckProbe

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

func (*DNSHealthCheckProbe) DeepCopyInto

func (in *DNSHealthCheckProbe) DeepCopyInto(out *DNSHealthCheckProbe)

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

func (*DNSHealthCheckProbe) DeepCopyObject

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

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

func (*DNSHealthCheckProbe) Default

func (p *DNSHealthCheckProbe) Default()

func (*DNSHealthCheckProbe) ToString added in v0.7.0

func (p *DNSHealthCheckProbe) ToString() string

type DNSHealthCheckProbeList

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

DNSHealthCheckProbeList contains a list of DNSHealthCheckProbe

func (*DNSHealthCheckProbeList) DeepCopy

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

func (*DNSHealthCheckProbeList) DeepCopyInto

func (in *DNSHealthCheckProbeList) DeepCopyInto(out *DNSHealthCheckProbeList)

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

func (*DNSHealthCheckProbeList) DeepCopyObject

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

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

type DNSHealthCheckProbeSpec

type DNSHealthCheckProbeSpec struct {
	// Port to connect to the host on. Must be either 80, 443 or 1024-49151
	// +kubebuilder:validation:XValidation:rule="self in [80, 443] || (self >= 1024 && self <= 49151)",message="Only ports 80, 443, 1024-49151 are allowed"
	Port int `json:"port,omitempty"`

	// Hostname is the value sent in the host header, to route the request to the correct service
	// Represents a root host of the parent DNS Record.
	Hostname string `json:"hostname,omitempty"`

	// Address to connect to the host on (IP Address (A Record) or hostname (CNAME)).
	Address string `json:"address,omitempty"`

	// Path is the path to append to the host to reach the expected health check.
	// Must start with "?" or "/", contain only valid URL characters and end with alphanumeric char or "/". For example "/" or "/healthz" are common
	// +kubebuilder:validation:Pattern=`^(?:\?|\/)[\w\-.~:\/?#\[\]@!$&'()*+,;=]+(?:[a-zA-Z0-9]|\/){1}$`
	Path string `json:"path,omitempty"`

	// Protocol to use when connecting to the host, valid values are "HTTP" or "HTTPS"
	// +kubebuilder:validation:XValidation:rule="self in ['HTTP','HTTPS']",message="Only HTTP or HTTPS protocols are allowed"
	Protocol Protocol `json:"protocol,omitempty"`

	// Interval defines how frequently this probe should execute
	Interval *metav1.Duration `json:"interval,omitempty"`

	// AdditionalHeadersRef refers to a secret that contains extra headers to send in the probe request, this is primarily useful if an authentication
	// token is required by the endpoint.
	// +optional
	AdditionalHeadersRef *AdditionalHeadersRef `json:"additionalHeadersRef,omitempty"`

	// FailureThreshold is a limit of consecutive failures that must occur for a host to be considered unhealthy
	// +kubebuilder:validation:XValidation:rule="self > 0",message="Failure threshold must be greater than 0"
	FailureThreshold int `json:"failureThreshold,omitempty"`

	// AllowInsecureCertificate will instruct the health check probe to not fail on a self-signed or otherwise invalid SSL certificate
	// this is primarily used in development or testing environments and is set by the --insecure-health-checks flag
	AllowInsecureCertificate bool `json:"allowInsecureCertificate,omitempty"`
}

DNSHealthCheckProbeSpec defines the desired state of DNSHealthCheckProbe

func (*DNSHealthCheckProbeSpec) DeepCopy

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

func (*DNSHealthCheckProbeSpec) DeepCopyInto

func (in *DNSHealthCheckProbeSpec) DeepCopyInto(out *DNSHealthCheckProbeSpec)

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

type DNSHealthCheckProbeStatus

type DNSHealthCheckProbeStatus struct {
	LastCheckedAt       metav1.Time `json:"-"`
	ConsecutiveFailures int         `json:"consecutiveFailures,omitempty"`
	Reason              string      `json:"reason,omitempty"`
	Status              int         `json:"status,omitempty"`
	Healthy             *bool       `json:"healthy"`
	ObservedGeneration  int64       `json:"observedGeneration,omitempty"`
}

DNSHealthCheckProbeStatus defines the observed state of DNSHealthCheckProbe

func (*DNSHealthCheckProbeStatus) DeepCopy

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

func (*DNSHealthCheckProbeStatus) DeepCopyInto

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

type DNSRecord

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

	Spec   DNSRecordSpec   `json:"spec,omitempty"`
	Status DNSRecordStatus `json:"status,omitempty"`
}

DNSRecord is the Schema for the dnsrecords API

func (*DNSRecord) DeepCopy

func (in *DNSRecord) DeepCopy() *DNSRecord

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

func (*DNSRecord) DeepCopyInto

func (in *DNSRecord) DeepCopyInto(out *DNSRecord)

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

func (*DNSRecord) DeepCopyObject

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

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

func (*DNSRecord) GetProviderRef added in v0.5.0

func (s *DNSRecord) GetProviderRef() ProviderRef

func (*DNSRecord) GetUIDHash added in v0.4.1

func (s *DNSRecord) GetUIDHash() string

GetUIDHash returns a hash of the current records UID with a fixed length of 8.

func (*DNSRecord) HasDNSZoneAssigned added in v0.5.0

func (s *DNSRecord) HasDNSZoneAssigned() bool

func (*DNSRecord) HasOwnerIDAssigned added in v0.5.0

func (s *DNSRecord) HasOwnerIDAssigned() bool

func (*DNSRecord) Validate added in v0.2.0

func (s *DNSRecord) Validate() error

type DNSRecordList

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

DNSRecordList contains a list of DNSRecord

func (*DNSRecordList) DeepCopy

func (in *DNSRecordList) DeepCopy() *DNSRecordList

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

func (*DNSRecordList) DeepCopyInto

func (in *DNSRecordList) DeepCopyInto(out *DNSRecordList)

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

func (*DNSRecordList) DeepCopyObject

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

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

type DNSRecordSpec

type DNSRecordSpec struct {
	// ownerID is a unique string used to identify the owner of this record.
	// If unset or set to an empty string the record UID will be used.
	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="OwnerID is immutable"
	// +kubebuilder:validation:MinLength=6
	// +kubebuilder:validation:MaxLength=36
	OwnerID string `json:"ownerID,omitempty"`

	// rootHost is the single root for all endpoints in a DNSRecord.
	// it is expected all defined endpoints are children of or equal to this rootHost
	// Must contain at least two groups of valid URL characters separated by a "."
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="RootHost is immutable"
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=255
	// +kubebuilder:validation:Pattern=`^(?:[\w\-.~:\/?#[\]@!$&'()*+,;=]+)\.(?:[\w\-.~:\/?#[\]@!$&'()*+,;=]+)$`
	RootHost string `json:"rootHost"`

	// providerRef is a reference to a provider secret.
	ProviderRef ProviderRef `json:"providerRef"`

	// endpoints is a list of endpoints that will be published into the dns provider.
	// +kubebuilder:validation:MinItems=1
	// +optional
	Endpoints []*externaldns.Endpoint `json:"endpoints,omitempty"`

	// +optional
	HealthCheck *HealthCheckSpec `json:"healthCheck,omitempty"`
}

DNSRecordSpec defines the desired state of DNSRecord +kubebuilder:validation:XValidation:rule="!has(oldSelf.ownerID) || has(self.ownerID)", message="OwnerID can't be unset if it was previously set" +kubebuilder:validation:XValidation:rule="has(oldSelf.ownerID) || !has(self.ownerID)", message="OwnerID can't be set if it was previously unset"

func (*DNSRecordSpec) DeepCopy

func (in *DNSRecordSpec) DeepCopy() *DNSRecordSpec

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

func (*DNSRecordSpec) DeepCopyInto

func (in *DNSRecordSpec) DeepCopyInto(out *DNSRecordSpec)

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

type DNSRecordStatus

type DNSRecordStatus struct {

	// conditions are any conditions associated with the record in the dns provider.
	//
	// If publishing the record fails, the "Failed" condition will be set with a
	// reason and message describing the cause of the failure.
	Conditions []metav1.Condition `json:"conditions,omitempty"`

	// observedGeneration is the most recently observed generation of the DNSRecord.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// QueuedAt is a time when DNS record was received for the reconciliation
	QueuedAt metav1.Time `json:"queuedAt,omitempty"`

	// ValidFor indicates duration since the last reconciliation we consider data in the record to be valid
	ValidFor string `json:"validFor,omitempty"`

	// WriteCounter represent a number of consecutive write attempts on the same generation of the record.
	// It is being reset to 0 when the generation changes or there are no changes to write.
	WriteCounter int64 `json:"writeCounter,omitempty"`

	// endpoints are the last endpoints that were successfully published to the provider zone
	Endpoints []*externaldns.Endpoint `json:"endpoints,omitempty"`

	// ZoneEndpoints are all the endpoints for the DNSRecordSpec.RootHost that are present in the provider
	ZoneEndpoints []*externaldns.Endpoint `json:"relatedEndpoints,omitempty"`

	HealthCheck *HealthCheckStatus `json:"healthCheck,omitempty"`

	// ownerID is a unique string used to identify the owner of this record.
	OwnerID string `json:"ownerID,omitempty"`

	// DomainOwners is a list of all the owners working against the root domain of this record
	DomainOwners []string `json:"domainOwners,omitempty"`

	// zoneID is the provider specific id to which this dns record is publishing endpoints
	ZoneID string `json:"zoneID,omitempty"`

	// zoneDomainName is the domain name of the zone that the dns record is publishing endpoints
	ZoneDomainName string `json:"zoneDomainName,omitempty"`
}

DNSRecordStatus defines the observed state of DNSRecord

func (*DNSRecordStatus) DeepCopy

func (in *DNSRecordStatus) DeepCopy() *DNSRecordStatus

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

func (*DNSRecordStatus) DeepCopyInto

func (in *DNSRecordStatus) DeepCopyInto(out *DNSRecordStatus)

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

type DNSRecordType

type DNSRecordType string

DNSRecordType is a DNS resource record type. +kubebuilder:validation:Enum=CNAME;A

const (
	// CNAMERecordType is an RFC 1035 CNAME record.
	CNAMERecordType DNSRecordType = "CNAME"

	// ARecordType is an RFC 1035 A record.
	ARecordType DNSRecordType = "A"

	// NSRecordType is a name server record.
	NSRecordType DNSRecordType = "NS"
)

type HealthCheckSpec added in v0.2.0

type HealthCheckSpec struct {
	// Port to connect to the host on. Must be either 80, 443 or 1024-49151
	// Defaults to port 443
	// +kubebuilder:validation:XValidation:rule="self in [80, 443] || (self >= 1024 && self <= 49151)",message="Only ports 80, 443, 1024-49151 are allowed"
	// +kubebuilder:default=443
	Port int `json:"port,omitempty"`

	// Path is the path to append to the host to reach the expected health check.
	// Must start with "?" or "/", contain only valid URL characters and end with alphanumeric char or "/". For example "/" or "/healthz" are common
	// +kubebuilder:validation:Pattern=`^(?:\?|\/)[\w\-.~:\/?#\[\]@!$&'()*+,;=]+(?:[a-zA-Z0-9]|\/){1}$`
	Path string `json:"path,omitempty"`

	// Protocol to use when connecting to the host, valid values are "HTTP" or "HTTPS"
	// Defaults to HTTPS
	// +kubebuilder:validation:XValidation:rule="self in ['HTTP','HTTPS']",message="Only HTTP or HTTPS protocols are allowed"
	// +kubebuilder:default=HTTPS
	Protocol Protocol `json:"protocol,omitempty"`

	// Interval defines how frequently this probe should execute
	// Defaults to 5 minutes
	// +kubebuilder:default="5m"
	Interval *metav1.Duration `json:"interval,omitempty"`

	// AdditionalHeadersRef refers to a secret that contains extra headers to send in the probe request, this is primarily useful if an authentication
	// token is required by the endpoint.
	// +optional
	AdditionalHeadersRef *AdditionalHeadersRef `json:"additionalHeadersRef,omitempty"`

	// FailureThreshold is a limit of consecutive failures that must occur for a host to be considered unhealthy
	// Defaults to 5
	// +kubebuilder:validation:XValidation:rule="self > 0",message="Failure threshold must be greater than 0"
	// +kubebuilder:default=5
	FailureThreshold int `json:"failureThreshold,omitempty"`
}

HealthCheckSpec configures health checks in the DNS provider. By default this health check will be applied to each unique DNS A Record for the listeners assigned to the target gateway

func (*HealthCheckSpec) DeepCopy added in v0.2.0

func (in *HealthCheckSpec) DeepCopy() *HealthCheckSpec

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

func (*HealthCheckSpec) DeepCopyInto added in v0.2.0

func (in *HealthCheckSpec) DeepCopyInto(out *HealthCheckSpec)

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

type HealthCheckStatus added in v0.2.0

type HealthCheckStatus struct {
	Conditions []metav1.Condition       `json:"conditions,omitempty"`
	Probes     []HealthCheckStatusProbe `json:"probes,omitempty"`
}

func (*HealthCheckStatus) DeepCopy added in v0.2.0

func (in *HealthCheckStatus) DeepCopy() *HealthCheckStatus

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

func (*HealthCheckStatus) DeepCopyInto added in v0.2.0

func (in *HealthCheckStatus) DeepCopyInto(out *HealthCheckStatus)

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

type HealthCheckStatusProbe added in v0.2.0

type HealthCheckStatusProbe struct {
	ID         string             `json:"id"`
	IPAddress  string             `json:"ipAddress"`
	Host       string             `json:"host"`
	Synced     bool               `json:"synced,omitempty"`
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

func (*HealthCheckStatusProbe) DeepCopy added in v0.2.0

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

func (*HealthCheckStatusProbe) DeepCopyInto added in v0.2.0

func (in *HealthCheckStatusProbe) DeepCopyInto(out *HealthCheckStatusProbe)

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

type Protocol added in v0.7.0

type Protocol string
const HttpProtocol Protocol = "HTTP"
const HttpsProtocol Protocol = "HTTPS"

type ProviderAccessor

type ProviderAccessor interface {
	GetNamespace() string
	GetProviderRef() ProviderRef
}

+kubebuilder:object:generate=false

type ProviderRef

type ProviderRef struct {
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
}

func (*ProviderRef) DeepCopy

func (in *ProviderRef) DeepCopy() *ProviderRef

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

func (*ProviderRef) DeepCopyInto

func (in *ProviderRef) DeepCopyInto(out *ProviderRef)

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