Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the common v1alpha1 API group. +kubebuilder:object:generate=true
Index ¶
Constants ¶
const ( // ControlPlaneRefKonnectID is the type for the KonnectID ControlPlaneRef. // It is used to reference a Konnect Control Plane entity by its ID on the Konnect platform. ControlPlaneRefKonnectID = "konnectID" // ControlPlaneRefKonnectNamespacedRef is the type for the KonnectNamespacedRef ControlPlaneRef. // It is used to reference a Konnect Control Plane entity inside the cluster // using a namespaced reference. ControlPlaneRefKonnectNamespacedRef = "konnectNamespacedRef" // ControlPlaneRefKIC is the type for KIC ControlPlaneRef. // It is used to reference a KIC as Control Plane. ControlPlaneRefKIC = "kic" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdoptKonnectOptions ¶
type AdoptKonnectOptions struct {
// ID is the Konnect ID of the entity.
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=36
ID string `json:"id,omitempty"`
}
AdoptKonnectOptions specifies the options for adopting the entity from Konnect. +kubebuilder:object:generate=true +apireference:kgo:include
func (*AdoptKonnectOptions) DeepCopy ¶
func (in *AdoptKonnectOptions) DeepCopy() *AdoptKonnectOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdoptKonnectOptions.
func (*AdoptKonnectOptions) DeepCopyInto ¶
func (in *AdoptKonnectOptions) DeepCopyInto(out *AdoptKonnectOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdoptMode ¶
type AdoptMode string
AdoptMode is the strategy used when adopting an existing entity.
The set of supported modes may be extended in the future. At present the only value is "match", which requires exact (semantically equivalent) alignment between the CR spec and the remote entity before adoption. No mutations are performed against the remote system during adoption. If any relevant field differs, adoption fails and the operator will not take ownership until the spec is aligned.
const ( // AdoptModeMatch enforces read-only adoption: the operator will only adopt // the remote entity when the CR spec matches the remote configuration; no // write operations are issued to the remote system during adoption. AdoptModeMatch AdoptMode = "match" // AdoptModeOverride indicates that the operator will override the existing entity // with the spec of the Kubernetes object. If the configuration does not match, // the operator will update the remote entity in to match the spec of the Kubernetes object. AdoptModeOverride AdoptMode = "override" )
type AdoptOptions ¶
type AdoptOptions struct {
// From is the source of the entity to adopt from.
// Now 'konnect' is supported.
// +required
// +kubebuilder:validation:Enum=konnect
From AdoptSource `json:"from,omitempty"`
// Mode selects how the operator adopts an already-existing entity (for example,
// a Konnect resource) instead of creating a new one.
//
// Supported values:
// - "match": the operator retrieves the remote entity referenced by the
// corresponding Adopt* options (for example, adopt.konnect.id) and performs a
// field-by-field comparison against this CR's spec (ignoring server-assigned
// metadata). If the specification matches the remote state, the operator
// adopts the entity: it sets the status identifier and marks the resource as
// ready/programmed without issuing any write operation to the remote system.
// If the specification does not match the remote state, adoption fails: the
// operator does not modify the remote entity and surfaces a failure
// condition, allowing the user to align the spec with the existing entity if
// adoption is desired.
//
// - "override": the operator overrides the remote entity by the CR's spec.
// If the entity with the ID and type exists, and it is not managed
// by another CR (matching by the metadata.uid of the CR and the "k8s-uid"
// label or tag of the Konnect entity), the operator updates the remote entity
// by the CR's spec.
// +optional
// +kubebuilder:validation:Enum=match;override
Mode AdoptMode `json:"mode,omitempty"`
// Konnect is the options for adopting the entity from Konnect.
// Required when from == 'konnect'.
// +optional
Konnect *AdoptKonnectOptions `json:"konnect,omitempty"`
}
AdoptOptions is the options for CRDs to attach to an existing Kong entity.
+kubebuilder:object:generate=true +kubebuilder:validation:XValidation:rule="self.from == oldSelf.from",message="'from'(adopt source) is immutable" +kubebuilder:validation:XValidation:rule="self.from == 'konnect' ? has(self.konnect) : true",message="Must specify Konnect options when from='konnect'" +kubebuilder:validation:XValidation:rule="has(self.konnect) ? (self.konnect.id == oldSelf.konnect.id) : true",message="konnect.id is immutable" +apireference:kgo:include
func (*AdoptOptions) DeepCopy ¶
func (in *AdoptOptions) DeepCopy() *AdoptOptions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdoptOptions.
func (*AdoptOptions) DeepCopyInto ¶
func (in *AdoptOptions) DeepCopyInto(out *AdoptOptions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AdoptSource ¶
type AdoptSource string
AdoptSource is the type to define the source of the entity to adopt from.
const ( // AdoptSourceKonnect indicates that the entity is adopted from Konnect. AdoptSourceKonnect AdoptSource = "konnect" )
type ControlPlaneRef ¶
type ControlPlaneRef struct {
// Type indicates the type of the control plane being referenced. Allowed values:
// - konnectNamespacedRef
// - kic
//
// The default is kic, which implies that the Control Plane is KIC.
//
// +optional
// +kubebuilder:validation:Enum=konnectNamespacedRef;kic
// +kubebuilder:default:=kic
Type string `json:"type,omitempty"`
// KonnectNamespacedRef is a reference to a Konnect Control Plane entity inside the cluster.
// It contains the name of the Konnect Control Plane.
// This field is required when the Type is konnectNamespacedRef.
// +optional
KonnectNamespacedRef *KonnectNamespacedRef `json:"konnectNamespacedRef,omitempty"`
}
ControlPlaneRef is the schema for the ControlPlaneRef type. It is used to reference a Control Plane entity.
+kubebuilder:object:generate=true +kubebuilder:validation:XValidation:rule="(has(self.type) && self.type == 'konnectNamespacedRef') ? has(self.konnectNamespacedRef) : true", message="when type is konnectNamespacedRef, konnectNamespacedRef must be set" +kubebuilder:validation:XValidation:rule="(has(self.type) && self.type == 'kic') ? !has(self.konnectNamespacedRef) : true", message="when type is kic, konnectNamespacedRef must not be set" +kubebuilder:validation:XValidation:rule="!has(self.type) ? !has(self.konnectNamespacedRef) : true", message="when type is unset, konnectNamespacedRef must not be set" +apireference:kgo:include
func (*ControlPlaneRef) DeepCopy ¶
func (in *ControlPlaneRef) DeepCopy() *ControlPlaneRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneRef.
func (*ControlPlaneRef) DeepCopyInto ¶
func (in *ControlPlaneRef) DeepCopyInto(out *ControlPlaneRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ControlPlaneRef) String ¶
func (r ControlPlaneRef) String() string
String returns the string representation of the ControlPlaneRef.
type EntitySource ¶
type EntitySource string
EntitySource is the type for all the entity types.
const ( // EntitySourceOrigin is the type for Origin entities. // Origin entities are the source of truth for the data. EntitySourceOrigin EntitySource = "Origin" // EntitySourceMirror is the type for Mirror entities. // Mirror entities are local mirrors of the remote konnect resource. EntitySourceMirror EntitySource = "Mirror" )
type ExtensionRef ¶
type ExtensionRef struct {
// Group is the group of the extension resource.
//
// +optional
// +kubebuilder:default=gateway-operator.konghq.com
// +kubebuilder:validation:MaxLength=253
Group string `json:"group"`
// Kind is kind of the extension resource.
//
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Kind string `json:"kind,omitempty"`
// NamespacedRef is a reference to the extension resource.
NamespacedRef `json:",inline"`
}
ExtensionRef corresponds to another resource in the Kubernetes cluster which defines extended behavior for a resource (e.g. ControlPlane). +apireference:kgo:include
func (*ExtensionRef) DeepCopy ¶
func (in *ExtensionRef) DeepCopy() *ExtensionRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionRef.
func (*ExtensionRef) DeepCopyInto ¶
func (in *ExtensionRef) DeepCopyInto(out *ExtensionRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KonnectExtensionControlPlaneRef ¶
type KonnectExtensionControlPlaneRef struct {
// Type indicates the type of the control plane being referenced. Allowed values:
// - konnectNamespacedRef
//
// +optional
// +kubebuilder:validation:Enum=konnectNamespacedRef
// +kubebuilder:default:=konnectNamespacedRef
Type string `json:"type,omitempty"`
// KonnectNamespacedRef is a reference to a Konnect Control Plane entity inside the cluster.
// It contains the name of the Konnect Control Plane.
// This field is required when the Type is konnectNamespacedRef.
// +optional
KonnectNamespacedRef *KonnectNamespacedRef `json:"konnectNamespacedRef,omitempty"`
}
KonnectExtensionControlPlaneRef is the schema for the ControlPlaneRef type used by Konnect Extensions. It is used to reference a Control Plane entity.
+kubebuilder:object:generate=true +kubebuilder:validation:XValidation:rule="(has(self.type) && self.type == 'konnectNamespacedRef') ? has(self.konnectNamespacedRef) : true", message="when type is konnectNamespacedRef, konnectNamespacedRef must be set" +apireference:kgo:include
func (*KonnectExtensionControlPlaneRef) DeepCopy ¶
func (in *KonnectExtensionControlPlaneRef) DeepCopy() *KonnectExtensionControlPlaneRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectExtensionControlPlaneRef.
func (*KonnectExtensionControlPlaneRef) DeepCopyInto ¶
func (in *KonnectExtensionControlPlaneRef) DeepCopyInto(out *KonnectExtensionControlPlaneRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type KonnectIDType ¶
type KonnectIDType string
KonnectIDType is the schema for the KonnectID type.
+kubebuilder:validation:Pattern=`^[0-9a-f]{8}(?:\-[0-9a-f]{4}){3}-[0-9a-f]{12}$` +kubebuilder:validation:MaxLength=36
type KonnectNamespacedRef ¶
type KonnectNamespacedRef struct {
// Name is the name of the Konnect Control Plane.
//
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name,omitempty"`
// Namespace is the namespace where the Konnect Control Plane is in.
// Currently the following resources are allowed to set this:
// - cluster scoped resources (KongVault)
// - KongService
// - KongCertificate
// - KongCACertificate
// - KongConsumerGroup
// - KongUpstream
// - KongKeySet
// - KongDataPlaneClientCertificate
//
// +optional
// +kubebuilder:validation:MaxLength=253
Namespace string `json:"namespace,omitempty"`
}
KonnectNamespacedRef is the schema for the KonnectNamespacedRef type.
+kubebuilder:object:generate=true +apireference:kgo:include
func (*KonnectNamespacedRef) DeepCopy ¶
func (in *KonnectNamespacedRef) DeepCopy() *KonnectNamespacedRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectNamespacedRef.
func (*KonnectNamespacedRef) DeepCopyInto ¶
func (in *KonnectNamespacedRef) DeepCopyInto(out *KonnectNamespacedRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NameRef ¶
type NameRef struct {
// Name is the name of the entity.
//
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name,omitempty"`
}
NameRef is a reference to another object representing a Kong entity with deterministic type.
+apireference:kgo:include
func (*NameRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameRef.
func (*NameRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespacedRef ¶
type NamespacedRef struct {
// Name is the name of the referred resource.
//
// +required
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name,omitempty"`
// Namespace is the namespace of the referred resource.
//
// For namespace-scoped resources if no Namespace is provided then the
// namespace of the parent object MUST be used.
//
// This field MUST not be set when referring to cluster-scoped resources.
//
// +optional
// +kubebuilder:validation:MaxLength=253
Namespace *string `json:"namespace,omitempty"`
}
NamespacedRef is a reference to a namespaced resource.
+apireference:kgo:include
func (*NamespacedRef) DeepCopy ¶
func (in *NamespacedRef) DeepCopy() *NamespacedRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedRef.
func (*NamespacedRef) DeepCopyInto ¶
func (in *NamespacedRef) DeepCopyInto(out *NamespacedRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectRef ¶
type ObjectRef struct {
// Type defines type of the object which is referenced. It can be one of:
//
// - konnectID
// - namespacedRef
//
// +required
Type ObjectRefType `json:"type,omitempty"`
// KonnectID is the schema for the KonnectID type.
// This field is required when the Type is konnectID.
//
// +optional
// +kubebuilder:validation:MaxLength=36
KonnectID *string `json:"konnectID,omitempty"`
// NamespacedRef is a reference to a KeySet entity inside the cluster.
// This field is required when the Type is namespacedRef.
//
// +optional
NamespacedRef *NamespacedRef `json:"namespacedRef,omitempty"`
}
ObjectRef is the schema for the ObjectRef type. It is used to reference an entity. Currently it is possible to reference a remote Konnect entity by its ID or a local in cluster entity by its namespaced name.
+kubebuilder:validation:XValidation:rule="self.type == 'namespacedRef' ? has(self.namespacedRef) : true", message="when type is namespacedRef, namespacedRef must be set" +kubebuilder:validation:XValidation:rule="self.type == 'namespacedRef' ? !has(self.konnectID) : true", message="when type is namespacedRef, konnectID must not be set" +kubebuilder:validation:XValidation:rule="self.type == 'konnectID' ? has(self.konnectID) : true", message="when type is konnectID, konnectID must be set" +kubebuilder:validation:XValidation:rule="self.type == 'konnectID' ? !has(self.namespacedRef) : true", message="when type is konnectID, namespacedRef must not be set" +apireference:kgo:include +kong:channels=kong-operator
func (*ObjectRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef.
func (*ObjectRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectRefType ¶
type ObjectRefType string
ObjectRefType is the enum type for the ObjectRef.
+kubebuilder:validation:Enum=konnectID;namespacedRef +apireference:kgo:include
const ( // ObjectRefTypeKonnectID is the type for the KonnectID KonnectRef. // It is used to reference an entity by its ID on the Konnect platform. ObjectRefTypeKonnectID ObjectRefType = "konnectID" // ObjectRefTypeNamespacedRef is the type for the KonnectRef. // It is used to reference an entity inside the cluster // using a namespaced reference. ObjectRefTypeNamespacedRef ObjectRefType = "namespacedRef" )
type Tags ¶
type Tags []string
Tags is a type for a list of tags applied to a Kong entity. +kubebuilder:validation:MaxItems=20 +kubebuilder:validation:XValidation:message="tags entries must not be longer than 128 characters", rule="self.all(tag, size(tag) >= 1 && size(tag) <= 128)"
func (Tags) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tags.
func (Tags) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.