v1alpha1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 2 Imported by: 8

Documentation

Overview

+kubebuilder:object:generate=true

Index

Constants

View Source
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 *string `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 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 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

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 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 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

func (in Tags) DeepCopy() Tags

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

func (Tags) DeepCopyInto

func (in Tags) DeepCopyInto(out *Tags)

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