v1alpha2

package
v0.0.0-...-ca213ee Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

API schema definitions for the Kuadrant v1alpha2 API group +kubebuilder:object:generate=true +groupName=kuadrant.io

Index

Constants

View Source
const GroupName = "kuadrant.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	DNSPolicyKind       = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: "DNSPolicy"}
	DNSPoliciesResource = SchemeGroupVersion.WithResource("dnspolicies")
)
View Source
var (
	TLSPolicyKind       = schema.GroupKind{Group: SchemeGroupVersion.Group, Kind: "TLSPolicy"}
	TLSPoliciesResource = SchemeGroupVersion.WithResource("tlspolicies")
)
View Source
var AddToScheme = SchemeBuilder.AddToScheme

AddToScheme adds the types in this group-version to the given scheme.

View Source
var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}

GroupVersion specifies the group and the version used to register the objects.

SchemeBuilder is used to add go types to the GroupVersionKind scheme

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type CertificateSpec

type CertificateSpec struct {
	// IssuerRef is a reference to the issuer for this certificate.
	// If the `kind` field is not set, or set to `Issuer`, an Issuer resource
	// with the given name in the same namespace as the Certificate will be used.
	// If the `kind` field is set to `ClusterIssuer`, a ClusterIssuer with the
	// provided name will be used.
	// The `name` field in this stanza is required at all times.
	IssuerRef certmanmetav1.ObjectReference `json:"issuerRef"`

	// CommonName is a common name to be used on the Certificate.
	// The CommonName should have a length of 64 characters or fewer to avoid
	// generating invalid CSRs.
	// This value is ignored by TLS clients when any subject alt name is set.
	// This is x509 behaviour: https://tools.ietf.org/html/rfc6125#section-6.4.4
	// +optional
	CommonName string `json:"commonName,omitempty"`

	// The requested 'duration' (i.e. lifetime) of the Certificate. This option
	// may be ignored/overridden by some issuer types. If unset this defaults to
	// 90 days. Certificate will be renewed either 2/3 through its duration or
	// `renewBefore` period before its expiry, whichever is later. Minimum
	// accepted duration is 1 hour. Value must be in units accepted by Go
	// time.ParseDuration https://golang.org/pkg/time/#ParseDuration
	// +optional
	Duration *metav1.Duration `json:"duration,omitempty"`

	// How long before the currently issued certificate's expiry
	// cert-manager should renew the certificate. The default is 2/3 of the
	// issued certificate's duration. Minimum accepted value is 5 minutes.
	// Value must be in units accepted by Go time.ParseDuration
	// https://golang.org/pkg/time/#ParseDuration
	// +optional
	RenewBefore *metav1.Duration `json:"renewBefore,omitempty"`

	// Usages is the set of x509 usages that are requested for the certificate.
	// Defaults to `digital signature` and `key encipherment` if not specified.
	// +optional
	Usages []certmanv1.KeyUsage `json:"usages,omitempty"`

	// RevisionHistoryLimit is the maximum number of CertificateRequest revisions
	// that are maintained in the Certificate's history. Each revision represents
	// a single `CertificateRequest` created by this Certificate, either when it
	// was created, renewed, or Spec was changed. Revisions will be removed by
	// oldest first if the number of revisions exceeds this number. If set,
	// revisionHistoryLimit must be a value of `1` or greater. If unset (`nil`),
	// revisions will not be garbage collected. Default value is `nil`.
	// +kubebuilder:validation:ExclusiveMaximum=false
	// +optional
	RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"`

	// Options to control private keys used for the Certificate.
	// +optional
	PrivateKey *certmanv1.CertificatePrivateKey `json:"privateKey,omitempty"`
}

CertificateSpec defines the certificate manager certificate spec that can be set via the TLSPolicy. Rather than allowing the whole certmanv1.CertificateSpec to be inlined we are only including the same fields that are currently supported by the annotation approach to securing gateways as outlined here https://cert-manager.io/docs/usage/gateway/#supported-annotations

func (*CertificateSpec) DeepCopy

func (in *CertificateSpec) DeepCopy() *CertificateSpec

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

func (*CertificateSpec) DeepCopyInto

func (in *CertificateSpec) DeepCopyInto(out *CertificateSpec)

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

type CustomWeight

type CustomWeight struct {
	// Label selector to match resource storing custom weight attribute values e.g. kuadrant.io/lb-attribute-custom-weight: AWS.
	Selector *metav1.LabelSelector `json:"selector"`

	// The weight value to apply when the selector matches.
	Weight Weight `json:"weight"`
}

func (*CustomWeight) DeepCopy

func (in *CustomWeight) DeepCopy() *CustomWeight

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

func (*CustomWeight) DeepCopyInto

func (in *CustomWeight) DeepCopyInto(out *CustomWeight)

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

type DNSPolicy

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

	Spec   DNSPolicySpec   `json:"spec,omitempty"`
	Status DNSPolicyStatus `json:"status,omitempty"`
}

DNSPolicy enables automatic cloud DNS configuration for Gateway API objects.

func (*DNSPolicy) DeepCopy

func (in *DNSPolicy) DeepCopy() *DNSPolicy

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

func (*DNSPolicy) DeepCopyInto

func (in *DNSPolicy) DeepCopyInto(out *DNSPolicy)

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

func (*DNSPolicy) DeepCopyObject

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

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

func (*DNSPolicy) Empty

func (p *DNSPolicy) Empty() bool

func (*DNSPolicy) GetLocator

func (p *DNSPolicy) GetLocator() string

func (*DNSPolicy) GetMergeStrategy

func (p *DNSPolicy) GetMergeStrategy() machinery.MergeStrategy

func (*DNSPolicy) GetName

func (p *DNSPolicy) GetName() string

func (*DNSPolicy) GetNamespace

func (p *DNSPolicy) GetNamespace() string

func (*DNSPolicy) GetTargetRefs

func (p *DNSPolicy) GetTargetRefs() []machinery.PolicyTargetReference

func (*DNSPolicy) Merge

func (p *DNSPolicy) Merge(other machinery.Policy) machinery.Policy

func (*DNSPolicy) Rules

func (p *DNSPolicy) Rules() map[string]any

func (*DNSPolicy) SetRules

func (p *DNSPolicy) SetRules(_ map[string]any)

type DNSPolicyList

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

DNSPolicyList contains a list of DNSPolicy

func (*DNSPolicyList) DeepCopy

func (in *DNSPolicyList) DeepCopy() *DNSPolicyList

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

func (*DNSPolicyList) DeepCopyInto

func (in *DNSPolicyList) DeepCopyInto(out *DNSPolicyList)

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

func (*DNSPolicyList) DeepCopyObject

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

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

type DNSPolicySpec

type DNSPolicySpec struct {
	// Reference to the object to which this policy applies.
	// +kubebuilder:validation:XValidation:rule="self.group == 'gateway.networking.k8s.io'",message="Invalid targetRef.group. The only supported value is 'gateway.networking.k8s.io'"
	// +kubebuilder:validation:XValidation:rule="self.kind == 'Gateway'",message="Invalid targetRef.kind. The only supported values are 'Gateway'"
	TargetRef gwapiv1alpha2.LocalPolicyTargetReferenceWithSectionName `json:"targetRef"`

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

	// +optional
	LoadBalancing *LoadBalancingSpec `json:"loadBalancing,omitempty"`

	// +kubebuilder:validation:Enum=simple;loadbalanced
	// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="RoutingStrategy is immutable"
	// +kubebuilder:default=loadbalanced
	RoutingStrategy RoutingStrategy `json:"routingStrategy"`
}

DNSPolicySpec defines the desired state of DNSPolicy +kubebuilder:validation:XValidation:rule="!(self.routingStrategy == 'loadbalanced' && !has(self.loadBalancing))",message="spec.loadBalancing is a required field when spec.routingStrategy == 'loadbalanced'"

func (*DNSPolicySpec) DeepCopy

func (in *DNSPolicySpec) DeepCopy() *DNSPolicySpec

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

func (*DNSPolicySpec) DeepCopyInto

func (in *DNSPolicySpec) DeepCopyInto(out *DNSPolicySpec)

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

type DNSPolicyStatus

type DNSPolicyStatus struct {
	// ObservedGeneration reflects the generation of the most recently observed spec.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a foo's current state.
	// Known .status.conditions.type are: "Available"
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*DNSPolicyStatus) DeepCopy

func (in *DNSPolicyStatus) DeepCopy() *DNSPolicyStatus

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

func (*DNSPolicyStatus) DeepCopyInto

func (in *DNSPolicyStatus) DeepCopyInto(out *DNSPolicyStatus)

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

func (*DNSPolicyStatus) GetConditions

func (s *DNSPolicyStatus) GetConditions() []metav1.Condition

type HealthCheckSpec

type HealthCheckSpec struct {
	// Endpoint is the path to append to the host to reach the expected health check.
	// For example "/" or "/healthz" are common
	// +kubebuilder:example:=/
	Endpoint string `json:"endpoint"`
	// Port to connect to the host on
	// +kubebuilder:validation:Minimum:=1
	Port int `json:"port"`
	// Protocol to use when connecting to the host, valid values are "HTTP" or "HTTPS"
	// +kubebuilder:validation:Enum:=HTTP;HTTPS
	Protocol string `json:"protocol"`
	// FailureThreshold is a limit of consecutive failures that must occur for a host
	// to be considered unhealthy
	// +kubebuilder:validation:Minimum:=1
	FailureThreshold int `json:"failureThreshold"`
}

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

func (in *HealthCheckSpec) DeepCopy() *HealthCheckSpec

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

func (*HealthCheckSpec) DeepCopyInto

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

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

type LoadBalancingGeo

type LoadBalancingGeo struct {
	// defaultGeo is the country/continent/region code to use when no other can be determined for a dns target cluster.
	//
	// The values accepted are determined by the target dns provider, please refer to the appropriate docs below.
	//
	// Route53: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-geo.html
	// Google: https://cloud.google.com/compute/docs/regions-zones
	// +kubebuilder:validation:MinLength=2
	DefaultGeo string `json:"defaultGeo"`
}

func (*LoadBalancingGeo) DeepCopy

func (in *LoadBalancingGeo) DeepCopy() *LoadBalancingGeo

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

func (*LoadBalancingGeo) DeepCopyInto

func (in *LoadBalancingGeo) DeepCopyInto(out *LoadBalancingGeo)

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

type LoadBalancingSpec

type LoadBalancingSpec struct {
	Weighted LoadBalancingWeighted `json:"weighted"`

	Geo LoadBalancingGeo `json:"geo"`
}

func (*LoadBalancingSpec) DeepCopy

func (in *LoadBalancingSpec) DeepCopy() *LoadBalancingSpec

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

func (*LoadBalancingSpec) DeepCopyInto

func (in *LoadBalancingSpec) DeepCopyInto(out *LoadBalancingSpec)

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

type LoadBalancingWeighted

type LoadBalancingWeighted struct {
	// defaultWeight is the record weight to use when no other can be determined for a dns target cluster.
	//
	// The maximum value accepted is determined by the target dns provider, please refer to the appropriate docs below.
	//
	// Route53: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-weighted.html
	DefaultWeight Weight `json:"defaultWeight"`

	// custom list of custom weight selectors.
	// +optional
	Custom []*CustomWeight `json:"custom,omitempty"`
}

func (*LoadBalancingWeighted) DeepCopy

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

func (*LoadBalancingWeighted) DeepCopyInto

func (in *LoadBalancingWeighted) DeepCopyInto(out *LoadBalancingWeighted)

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

type RoutingStrategy

type RoutingStrategy string

type TLSPolicy

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

	Spec   TLSPolicySpec   `json:"spec,omitempty"`
	Status TLSPolicyStatus `json:"status,omitempty"`
}

TLSPolicy enables automatic TLS configuration for Gateway API objects.

func (*TLSPolicy) DeepCopy

func (in *TLSPolicy) DeepCopy() *TLSPolicy

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

func (*TLSPolicy) DeepCopyInto

func (in *TLSPolicy) DeepCopyInto(out *TLSPolicy)

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

func (*TLSPolicy) DeepCopyObject

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

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

func (*TLSPolicy) Empty

func (p *TLSPolicy) Empty() bool

func (*TLSPolicy) GetLocator

func (p *TLSPolicy) GetLocator() string

func (*TLSPolicy) GetMergeStrategy

func (p *TLSPolicy) GetMergeStrategy() machinery.MergeStrategy

func (*TLSPolicy) GetName

func (p *TLSPolicy) GetName() string

func (*TLSPolicy) GetNamespace

func (p *TLSPolicy) GetNamespace() string

func (*TLSPolicy) GetTargetRefs

func (p *TLSPolicy) GetTargetRefs() []machinery.PolicyTargetReference

func (*TLSPolicy) Merge

func (p *TLSPolicy) Merge(other machinery.Policy) machinery.Policy

func (*TLSPolicy) Rules

func (p *TLSPolicy) Rules() map[string]any

func (*TLSPolicy) SetRules

func (p *TLSPolicy) SetRules(_ map[string]any)

type TLSPolicyList

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

TLSPolicyList contains a list of TLSPolicy

func (*TLSPolicyList) DeepCopy

func (in *TLSPolicyList) DeepCopy() *TLSPolicyList

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

func (*TLSPolicyList) DeepCopyInto

func (in *TLSPolicyList) DeepCopyInto(out *TLSPolicyList)

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

func (*TLSPolicyList) DeepCopyObject

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

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

type TLSPolicySpec

type TLSPolicySpec struct {
	// Reference to the object to which this policy applies.
	// +kubebuilder:validation:XValidation:rule="self.group == 'gateway.networking.k8s.io'",message="Invalid targetRef.group. The only supported value is 'gateway.networking.k8s.io'"
	// +kubebuilder:validation:XValidation:rule="self.kind == 'Gateway'",message="Invalid targetRef.kind. The only supported values are 'Gateway'"
	TargetRef gwapiv1alpha2.LocalPolicyTargetReferenceWithSectionName `json:"targetRef"`

	CertificateSpec `json:",inline"`
}

TLSPolicySpec defines the desired state of TLSPolicy

func (*TLSPolicySpec) DeepCopy

func (in *TLSPolicySpec) DeepCopy() *TLSPolicySpec

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

func (*TLSPolicySpec) DeepCopyInto

func (in *TLSPolicySpec) DeepCopyInto(out *TLSPolicySpec)

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

type TLSPolicyStatus

type TLSPolicyStatus struct {
	// ObservedGeneration reflects the generation of the most recently observed spec.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a foo's current state.
	// Known .status.conditions.type are: "Available"
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func (*TLSPolicyStatus) DeepCopy

func (in *TLSPolicyStatus) DeepCopy() *TLSPolicyStatus

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

func (*TLSPolicyStatus) DeepCopyInto

func (in *TLSPolicyStatus) DeepCopyInto(out *TLSPolicyStatus)

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

func (*TLSPolicyStatus) GetConditions

func (s *TLSPolicyStatus) GetConditions() []metav1.Condition

type Weight

type Weight int

+kubebuilder:validation:Minimum=0

Jump to

Keyboard shortcuts

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