Documentation
¶
Overview ¶
+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 ControlPlaneRef ¶
type ControlPlaneRef struct {
// Type indicates the type of the control plane being referenced. Allowed values:
// - konnectID
// - konnectNamespacedRef
// - kic
//
// The default is kic, which implies that the Control Plane is KIC.
//
// +kubebuilder:validation:Enum=konnectID;konnectNamespacedRef;kic
// +kubebuilder:default:=kic
Type string `json:"type,omitempty"`
// KonnectID is the schema for the KonnectID type.
// This field is required when the Type is konnectID.
// +optional
KonnectID *KonnectIDType `json:"konnectID,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 == 'konnectNamespacedRef') ? !has(self.konnectID) : true", message="when type is konnectNamespacedRef, konnectID must not be set" +kubebuilder:validation:XValidation:rule="(has(self.type) && self.type == 'konnectID') ? has(self.konnectID) : true", message="when type is konnectID, konnectID must be set" +kubebuilder:validation:XValidation:rule="(has(self.type) && self.type == 'konnectID') ? !has(self.konnectNamespacedRef) : true", message="when type is konnectID, konnectNamespacedRef must not be set" +kubebuilder:validation:XValidation:rule="(has(self.type) && self.type == 'kic') ? !has(self.konnectID) : true", message="when type is kic, konnectID must not 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.konnectID) : true", message="when type is unset, konnectID 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
type EntitySource ¶ added in v1.4.0
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.
// +kubebuilder:validation:Optional
// +kubebuilder:default=gateway-operator.konghq.com
Group string `json:"group"`
// Kind is kind of the extension resource.
Kind string `json:"kind"`
// 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 KonnectIDType ¶ added in v1.4.0
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}$`
type KonnectNamespacedRef ¶
type KonnectNamespacedRef struct {
// Name is the name of the Konnect Control Plane.
// +kubebuilder:validation:Required
Name string `json:"name"`
// Namespace is the namespace where the Konnect Control Plane is in.
// Currently only cluster scoped resources (KongVault) are allowed to set `konnectNamespacedRef.namespace`.
//
// +optional
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 ¶ added in v1.3.2
type NameRef struct {
// Name is the name of the entity.
//
// +kubebuilder:validation:Required
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
}
NameRef is a reference to another object representing a Kong entity with deterministic type.
+apireference:kgo:include
func (*NameRef) DeepCopy ¶ added in v1.3.2
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NameRef.
func (*NameRef) DeepCopyInto ¶ added in v1.3.2
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.
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`
// 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
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 ¶ added in v1.3.0
type ObjectRef struct {
// Type defines type of the object which is referenced. It can be one of:
//
// - konnectID
// - namespacedRef
Type ObjectRefType `json:"type"`
// KonnectID is the schema for the KonnectID type.
// This field is required when the Type is konnectID.
//
// +optional
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=gateway-operator
func (*ObjectRef) DeepCopy ¶ added in v1.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectRef.
func (*ObjectRef) DeepCopyInto ¶ added in v1.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectRefType ¶ added in v1.3.0
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.