v1

package
v2.2.7 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1 contains API Schema definitions for the konghq.com v1 API group. +kubebuilder:object:generate=true +groupName=configuration.konghq.com +apireference:kgo:include-all-types

Index

Constants

View Source
const (
	// ConditionProgrammed indicates whether the controller has generated Kong configuration
	// and has successfully applied it to Kong.
	//
	// Resources that support this condition are:
	//
	// * KongPlugin
	// * KongClusterPlugin
	// * KongConsumer
	// * KongConsumerGroup
	//
	// It is a positive-polarity summary condition, and so should always be
	// present on the resource with ObservedGeneration set.
	//
	// It should be set to Unknown if the controller performs updates to the
	// status before it has all the information it needs to be able to determine
	// if the condition is true.
	//
	// Possible reasons for this condition to be True are:
	//
	// * "Programmed"
	//
	// Possible reasons for this condition to be False are:
	//
	// * "Invalid"
	// * "Pending"
	//
	// Possible reasons for this condition to be Unknown are:
	//
	// * "Pending".
	//
	ConditionProgrammed ConditionType = "Programmed"

	// ReasonProgrammed is used with the ConditionProgrammed condition when the condition is
	// true.
	ReasonProgrammed ConditionReason = "Programmed"

	// ReasonInvalid is used with the ConditionProgrammed condition when the object fails to be
	// translated into Kong configuration or when Kong rejects the configuration.
	ReasonInvalid ConditionReason = "Invalid"

	// ReasonPending is used with the ConditionProgrammed when the status is "Unknown".
	ReasonPending ConditionReason = "Pending"
)
View Source
const (
	// ConditionKongConsumerCredentialSecretRefsValid is the condition type used on KongConsumer
	// to indicate whether the credential secret references are valid.
	ConditionKongConsumerCredentialSecretRefsValid = "CredentialSecretRefsValid"

	// ReasonKongConsumerCredentialSecretRefsValid is the condition reason used on KongConsumer
	// with CredentialSecretRefsValid condition when the condition is true.
	ReasonKongConsumerCredentialSecretRefsValid = "Valid"

	// ReasonKongConsumerCredentialSecretRefInvalid is the condition reason used on KongConsumer
	// with CredentialSecretRefsValid condition when the condition is false.
	// This can happen when the secret reference is invalid or the secret does not exist.
	ReasonKongConsumerCredentialSecretRefInvalid = "Invalid"
)
View Source
const (
	// GroupName is the group name used in this package.
	GroupName = "configuration.konghq.com"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"}

	// SchemeGroupVersion is a convenience var for generated clientsets.
	SchemeGroupVersion = GroupVersion

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

func KongProtocolsToStrings

func KongProtocolsToStrings(protocols []KongProtocol) []string

KongProtocolsToStrings converts a slice of KongProtocol to plain strings.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource.

Types

type ConditionReason

type ConditionReason string

ConditionReason defines the set of reasons that explain why a particular condition type has been raised.

type ConditionType

type ConditionType string

ConditionType is a type of condition associated with an object. This type should be used with the object's Status.Conditions field.

type ConfigPatch

type ConfigPatch struct {
	// Path is the JSON-Pointer value (RFC6901) that references a location within the target configuration.
	Path string `json:"path"`
	// ValueFrom is the reference to a key of a secret where the patched value comes from.
	ValueFrom ConfigSource `json:"valueFrom"`
}

ConfigPatch is a JSON patch (RFC6902) to add values from Secret to the generated configuration. It is an equivalent of the following patch: `{"op": "add", "path": {.Path}, "value": {.ComputedValueFrom}}`. +kubebuilder:object:generate=true

func (*ConfigPatch) DeepCopy

func (in *ConfigPatch) DeepCopy() *ConfigPatch

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

func (*ConfigPatch) DeepCopyInto

func (in *ConfigPatch) DeepCopyInto(out *ConfigPatch)

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

type ConfigSource

type ConfigSource struct {
	// Specifies a name and a key of a secret to refer to. The namespace is implicitly set to the one of referring object.
	SecretValue SecretValueFromSource `json:"secretKeyRef"`
}

ConfigSource is a wrapper around SecretValueFromSource. +kubebuilder:object:generate=true

func (*ConfigSource) DeepCopy

func (in *ConfigSource) DeepCopy() *ConfigSource

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

func (*ConfigSource) DeepCopyInto

func (in *ConfigSource) DeepCopyInto(out *ConfigSource)

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

type KongClusterPlugin

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

	// ConsumerRef is a reference to a particular consumer.
	ConsumerRef string `json:"consumerRef,omitempty"`

	// Disabled set if the plugin is disabled or not.
	Disabled bool `json:"disabled,omitempty"`

	// Config contains the plugin configuration. It's a list of keys and values
	// required to configure the plugin.
	// Please read the documentation of the plugin being configured to set values
	// in here. For any plugin in Kong, anything that goes in the `config` JSON
	// key in the Admin API request, goes into this property.
	// Only one of `config` or `configFrom` may be used in a KongClusterPlugin, not both at once.
	// +kubebuilder:validation:Type=object
	Config apiextensionsv1.JSON `json:"config,omitempty"`

	// ConfigFrom references a secret containing the plugin configuration.
	// This should be used when the plugin configuration contains sensitive information,
	// such as AWS credentials in the Lambda plugin or the client secret in the OIDC plugin.
	// Only one of `config` or `configFrom` may be used in a KongClusterPlugin, not both at once.
	ConfigFrom *NamespacedConfigSource `json:"configFrom,omitempty"`

	// ConfigPatches represents JSON patches to the configuration of the plugin.
	// Each item means a JSON patch to add something in the configuration,
	// where path is specified in `path` and value is in `valueFrom` referencing
	// a key in a secret.
	// When Config is specified, patches will be applied to the configuration in Config.
	// Otherwise, patches will be applied to an empty object.
	ConfigPatches []NamespacedConfigPatch `json:"configPatches,omitempty"`

	// PluginName is the name of the plugin to which to apply the config.
	// +required
	PluginName string `json:"plugin"`

	// RunOn configures the plugin to run on the first or the second or both
	// nodes in case of a service mesh deployment.
	// +kubebuilder:validation:Enum:=first;second;all
	RunOn string `json:"run_on,omitempty"`

	// Protocols configures plugin to run on requests received on specific
	// protocols.
	Protocols []KongProtocol `json:"protocols,omitempty"`

	// Ordering overrides the normal plugin execution order. It's only available on Kong Enterprise.
	// `<phase>` is a request processing phase (for example, `access` or `body_filter`) and
	// `<plugin>` is the name of the plugin that will run before or after the KongPlugin.
	// For example, a KongPlugin with `plugin: rate-limiting` and `before.access: ["key-auth"]`
	// will create a rate limiting plugin that limits requests _before_ they are authenticated.
	Ordering *kong.PluginOrdering `json:"ordering,omitempty"`

	// InstanceName is an optional custom name to identify an instance of the plugin. This is useful when running the
	// same plugin in multiple contexts, for example, on multiple services.
	InstanceName string `json:"instance_name,omitempty"`

	// Status represents the current status of the KongClusterPlugin resource.
	Status KongClusterPluginStatus `json:"status,omitempty"`
}

KongClusterPlugin is the Schema for the kongclusterplugins API. +kong:channels=kong-operator

func (*KongClusterPlugin) DeepCopy

func (in *KongClusterPlugin) DeepCopy() *KongClusterPlugin

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

func (*KongClusterPlugin) DeepCopyInto

func (in *KongClusterPlugin) DeepCopyInto(out *KongClusterPlugin)

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

func (*KongClusterPlugin) DeepCopyObject

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

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

type KongClusterPluginList

type KongClusterPluginList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []KongClusterPlugin `json:"items"`
}

KongClusterPluginList contains a list of KongClusterPlugin.

func (*KongClusterPluginList) DeepCopy

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

func (*KongClusterPluginList) DeepCopyInto

func (in *KongClusterPluginList) DeepCopyInto(out *KongClusterPluginList)

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

func (*KongClusterPluginList) DeepCopyObject

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

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

type KongClusterPluginStatus

type KongClusterPluginStatus struct {
	// Conditions describe the current conditions of the KongClusterPluginStatus.
	//
	// Known condition types are:
	//
	// * "Programmed"
	//
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MaxItems=8
	// +kubebuilder:default={{type: "Programmed", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

KongClusterPluginStatus represents the current status of the KongClusterPlugin resource.

func (*KongClusterPluginStatus) DeepCopy

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

func (*KongClusterPluginStatus) DeepCopyInto

func (in *KongClusterPluginStatus) DeepCopyInto(out *KongClusterPluginStatus)

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

type KongConsumer

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

	// Username is a Kong cluster-unique username of the consumer.
	// +kubebuilder:validation:MaxLength=128
	// +kubebuilder:validation:Pattern=`^[\p{L}\p{N}.\-_~+@/\[\]]*(?: [\p{L}\p{N}.\-_~+@/\[\]]+)*$`
	Username string `json:"username,omitempty"`

	// CustomID is a Kong cluster-unique existing ID for the consumer - useful for mapping
	// Kong with users in your existing database.
	// +kubebuilder:validation:MaxLength=128
	// +kubebuilder:validation:Pattern=`^[0-9a-zA-Z.\-_~\(\)#%@|+\[\]]*(?: [0-9a-zA-Z.\-_~\(\)#%@|+\[\]]+)*$`
	CustomID string `json:"custom_id,omitempty"`

	// Credentials are references to secrets containing a credential to be
	// provisioned in Kong.
	// +listType=set
	Credentials []string `json:"credentials,omitempty"`

	// ConsumerGroups are references to consumer groups (that consumer wants to be part of)
	// provisioned in Kong.
	// +listType=set
	ConsumerGroups []string `json:"consumerGroups,omitempty"`

	Spec KongConsumerSpec `json:"spec,omitempty"`

	// Status represents the current status of the KongConsumer resource.
	// +kubebuilder:default={conditions: {{type: "Programmed", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}}
	Status KongConsumerStatus `json:"status,omitempty"`
}

KongConsumer is the Schema for the kongconsumers API.

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:resource:shortName=kc,categories=kong +kubebuilder:printcolumn:name="Username",type=string,JSONPath=`.username`,description="Username of a Kong Consumer" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age" +kubebuilder:printcolumn:name="Programmed",type=string,JSONPath=`.status.conditions[?(@.type=="Programmed")].status` +kubebuilder:validation:XValidation:rule="has(self.username) || has(self.custom_id)", message="Need to provide either username or custom_id" +kubebuilder:validation:XValidation:rule="(!has(oldSelf.spec) || !has(oldSelf.spec.controlPlaneRef)) || has(self.spec.controlPlaneRef)", message="controlPlaneRef is required once set" +kubebuilder:validation:XValidation:rule="(!has(self.spec) || !has(self.spec.controlPlaneRef)) ? true : (!has(self.status) || !self.status.conditions.exists(c, c.type == 'Programmed' && c.status == 'True')) ? true : oldSelf.spec.controlPlaneRef == self.spec.controlPlaneRef", message="spec.controlPlaneRef is immutable when an entity is already Programmed" +kong:channels=kong-operator

func (*KongConsumer) DeepCopy

func (in *KongConsumer) DeepCopy() *KongConsumer

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

func (*KongConsumer) DeepCopyInto

func (in *KongConsumer) DeepCopyInto(out *KongConsumer)

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

func (*KongConsumer) DeepCopyObject

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

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

func (*KongConsumer) GetAdoptOptions

func (obj *KongConsumer) GetAdoptOptions() *commonv1alpha1.AdoptOptions

GetAdoptOptions gets the options to adopt the resource from an existing resource.

func (*KongConsumer) GetConditions

func (obj *KongConsumer) GetConditions() []metav1.Condition

GetConditions returns the Status Conditions.

func (*KongConsumer) GetControlPlaneID

func (obj *KongConsumer) GetControlPlaneID() string

GetControlPlaneID returns the ControlPlane ID in the KongConsumer status.

func (*KongConsumer) GetControlPlaneRef

func (obj *KongConsumer) GetControlPlaneRef() *commonv1alpha1.ControlPlaneRef

GetControlPlaneRef returns the ControlPlaneRef.

func (*KongConsumer) GetKonnectID

func (obj *KongConsumer) GetKonnectID() string

GetKonnectID returns the Konnect ID in the KongConsumer status.

func (*KongConsumer) GetKonnectStatus

func (obj *KongConsumer) GetKonnectStatus() *konnectv1alpha2.KonnectEntityStatus

GetKonnectStatus returns the Konnect status contained in the KongConsumer status.

func (KongConsumer) GetTypeName

func (obj KongConsumer) GetTypeName() string

GetTypeName returns the KongConsumer Kind name.

func (*KongConsumer) PersistsKonnectID added in v2.2.0

func (*KongConsumer) PersistsKonnectID() bool

PersistsKonnectID reports whether the KongConsumer persists a Konnect ID in status.

func (*KongConsumer) SetAdoptOptions

func (obj *KongConsumer) SetAdoptOptions(opts *commonv1alpha1.AdoptOptions)

SetAdoptOptions sets the options to adopt the resource from an existing resource.

func (*KongConsumer) SetConditions

func (obj *KongConsumer) SetConditions(conditions []metav1.Condition)

SetConditions sets the Status Conditions.

func (*KongConsumer) SetControlPlaneID

func (obj *KongConsumer) SetControlPlaneID(id string)

SetControlPlaneID sets the ControlPlane ID in the KongConsumer status.

func (*KongConsumer) SetControlPlaneRef

func (obj *KongConsumer) SetControlPlaneRef(ref *commonv1alpha1.ControlPlaneRef)

SetControlPlaneRef sets the ControlPlaneRef.

func (*KongConsumer) SetKonnectID

func (obj *KongConsumer) SetKonnectID(id string)

SetKonnectID sets the Konnect ID in the KongConsumer status.

type KongConsumerList

type KongConsumerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []KongConsumer `json:"items"`
}

KongConsumerList contains a list of KongConsumer. +kubebuilder:object:root=true

func (*KongConsumerList) DeepCopy

func (in *KongConsumerList) DeepCopy() *KongConsumerList

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

func (*KongConsumerList) DeepCopyInto

func (in *KongConsumerList) DeepCopyInto(out *KongConsumerList)

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

func (*KongConsumerList) DeepCopyObject

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

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

func (KongConsumerList) GetItems

func (obj KongConsumerList) GetItems() []KongConsumer

GetItems returns the list of KongConsumer items.

type KongConsumerSpec

type KongConsumerSpec struct {
	// ControlPlaneRef is a reference to a ControlPlane this Consumer is associated with.
	// +kubebuilder:validation:XValidation:message="'konnectID' type is not supported", rule="self.type != 'konnectID'"
	// +optional
	ControlPlaneRef *commonv1alpha1.ControlPlaneRef `json:"controlPlaneRef,omitempty"`

	// Adopt is the options for adopting a consumer from an existing consumer in Konnect.
	// +optional
	Adopt *commonv1alpha1.AdoptOptions `json:"adopt,omitempty"`

	// Tags is an optional set of tags applied to the consumer.
	Tags commonv1alpha1.Tags `json:"tags,omitempty"`
}

KongConsumerSpec defines the specification of the KongConsumer. +kubebuilder:validation:XValidation:rule="!has(self.adopt) ? true : (has(self.controlPlaneRef) && self.controlPlaneRef.type == 'konnectNamespacedRef')", message="spec.adopt is allowed only when controlPlaneRef is konnectNamespacedRef" +kubebuilder:validation:XValidation:rule="(has(oldSelf.adopt) && has(self.adopt)) || (!has(oldSelf.adopt) && !has(self.adopt))", message="Cannot set or unset spec.adopt in updates"

func (*KongConsumerSpec) DeepCopy

func (in *KongConsumerSpec) DeepCopy() *KongConsumerSpec

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

func (*KongConsumerSpec) DeepCopyInto

func (in *KongConsumerSpec) DeepCopyInto(out *KongConsumerSpec)

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

type KongConsumerStatus

type KongConsumerStatus struct {
	// Konnect contains the Konnect entity status.
	// +optional
	Konnect *konnecv1alpha2.KonnectEntityStatusWithControlPlaneRef `json:"konnect,omitempty"`

	// Conditions describe the current conditions of the KongConsumer.
	//
	// Known condition types are:
	//
	// * "Programmed"
	//
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MaxItems=8
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

KongConsumerStatus represents the current status of the KongConsumer resource.

func (*KongConsumerStatus) DeepCopy

func (in *KongConsumerStatus) DeepCopy() *KongConsumerStatus

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

func (*KongConsumerStatus) DeepCopyInto

func (in *KongConsumerStatus) DeepCopyInto(out *KongConsumerStatus)

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

type KongPlugin

type KongPlugin struct {
	metav1.TypeMeta `json:",inline"`
	// Setting a `global` label to `true` will apply the plugin to every request proxied by the Kong.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// ConsumerRef is a reference to a particular consumer.
	ConsumerRef string `json:"consumerRef,omitempty"`

	// Disabled set if the plugin is disabled or not.
	Disabled bool `json:"disabled,omitempty"`

	// Config contains the plugin configuration. It's a list of keys and values
	// required to configure the plugin.
	// Please read the documentation of the plugin being configured to set values
	// in here. For any plugin in Kong, anything that goes in the `config` JSON
	// key in the Admin API request, goes into this property.
	// Only one of `config` or `configFrom` may be used in a KongPlugin, not both at once.
	// +kubebuilder:validation:Type=object
	Config apiextensionsv1.JSON `json:"config,omitempty"`

	// ConfigFrom references a secret containing the plugin configuration.
	// This should be used when the plugin configuration contains sensitive information,
	// such as AWS credentials in the Lambda plugin or the client secret in the OIDC plugin.
	// Only one of `config` or `configFrom` may be used in a KongPlugin, not both at once.
	//
	// +apireference:kgo:exclude
	ConfigFrom *ConfigSource `json:"configFrom,omitempty"`

	// ConfigPatches represents JSON patches to the configuration of the plugin.
	// Each item means a JSON patch to add something in the configuration,
	// where path is specified in `path` and value is in `valueFrom` referencing
	// a key in a secret.
	// When Config is specified, patches will be applied to the configuration in Config.
	// Otherwise, patches will be applied to an empty object.
	//
	// +apireference:kgo:exclude
	ConfigPatches []ConfigPatch `json:"configPatches,omitempty"`

	// PluginName is the name of the plugin to which to apply the config.
	// +required
	PluginName string `json:"plugin"`

	// RunOn configures the plugin to run on the first or the second or both
	// nodes in case of a service mesh deployment.
	// +kubebuilder:validation:Enum:=first;second;all
	RunOn string `json:"run_on,omitempty"`

	// Protocols configures plugin to run on requests received on specific
	// protocols.
	Protocols []KongProtocol `json:"protocols,omitempty"`

	// Ordering overrides the normal plugin execution order. It's only available on Kong Enterprise.
	// `<phase>` is a request processing phase (for example, `access` or `body_filter`) and
	// `<plugin>` is the name of the plugin that will run before or after the KongPlugin.
	// For example, a KongPlugin with `plugin: rate-limiting` and `before.access: ["key-auth"]`
	// will create a rate limiting plugin that limits requests _before_ they are authenticated.
	Ordering *kong.PluginOrdering `json:"ordering,omitempty"`

	// InstanceName is an optional custom name to identify an instance of the plugin. This is useful when running the
	// same plugin in multiple contexts, for example, on multiple services.
	InstanceName string `json:"instance_name,omitempty"`

	// Status represents the current status of the KongPlugin resource.
	Status KongPluginStatus `json:"status,omitempty"`
}

KongPlugin is the Schema for the kongplugins API.

+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:storageversion +kubebuilder:resource:shortName=kp,categories=kong +kubebuilder:printcolumn:name="Plugin-Type",type=string,JSONPath=`.plugin`,description="Name of the plugin" +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`,description="Age" +kubebuilder:printcolumn:name="Disabled",type=boolean,JSONPath=`.disabled`,description="Indicates if the plugin is disabled",priority=1 +kubebuilder:printcolumn:name="Config",type=string,JSONPath=`.config`,description="Configuration of the plugin",priority=1 +kubebuilder:printcolumn:name="Programmed",type=string,JSONPath=`.status.conditions[?(@.type=="Programmed")].status` +kubebuilder:validation:XValidation:rule="!(has(self.config) && has(self.configFrom))", message="Using both config and configFrom fields is not allowed." +kubebuilder:validation:XValidation:rule="!(has(self.configFrom) && has(self.configPatches))", message="Using both configFrom and configPatches fields is not allowed." +kubebuilder:validation:XValidation:rule="self.plugin == oldSelf.plugin", message="The plugin field is immutable" +kong:channels=kong-operator

func (*KongPlugin) DeepCopy

func (in *KongPlugin) DeepCopy() *KongPlugin

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

func (*KongPlugin) DeepCopyInto

func (in *KongPlugin) DeepCopyInto(out *KongPlugin)

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

func (*KongPlugin) DeepCopyObject

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

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

func (*KongPlugin) GetConditions

func (obj *KongPlugin) GetConditions() []metav1.Condition

GetConditions returns the Status Conditions.

func (KongPlugin) GetTypeName

func (obj KongPlugin) GetTypeName() string

GetTypeName returns the KongPlugin Kind name.

func (*KongPlugin) SetConditions

func (obj *KongPlugin) SetConditions(conditions []metav1.Condition)

SetConditions sets the Status Conditions.

type KongPluginList

type KongPluginList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []KongPlugin `json:"items"`
}

KongPluginList contains a list of KongPlugin. +kubebuilder:object:root=true

func (*KongPluginList) DeepCopy

func (in *KongPluginList) DeepCopy() *KongPluginList

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

func (*KongPluginList) DeepCopyInto

func (in *KongPluginList) DeepCopyInto(out *KongPluginList)

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

func (*KongPluginList) DeepCopyObject

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

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

func (KongPluginList) GetItems

func (obj KongPluginList) GetItems() []KongPlugin

GetItems returns the list of KongPlugin items.

type KongPluginStatus

type KongPluginStatus struct {
	// Conditions describe the current conditions of the KongPluginStatus.
	//
	// Known condition types are:
	//
	// * "Programmed"
	//
	// +listType=map
	// +listMapKey=type
	// +kubebuilder:validation:MaxItems=8
	// +kubebuilder:default={{type: "Programmed", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

KongPluginStatus represents the current status of the KongPlugin resource.

func (*KongPluginStatus) DeepCopy

func (in *KongPluginStatus) DeepCopy() *KongPluginStatus

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

func (*KongPluginStatus) DeepCopyInto

func (in *KongPluginStatus) DeepCopyInto(out *KongPluginStatus)

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

type KongProtocol

type KongProtocol string

KongProtocol is a valid Kong protocol. This alias is necessary to deal with https://github.com/kubernetes-sigs/controller-tools/issues/342 +kubebuilder:validation:Enum=http;https;grpc;grpcs;tcp;tls;udp +kubebuilder:object:generate=true

func ProtocolSlice

func ProtocolSlice(elements ...string) []*KongProtocol

ProtocolSlice converts a slice of string to a slice of *KongProtocol.

func StringsToKongProtocols

func StringsToKongProtocols(strings []string) []KongProtocol

StringsToKongProtocols converts a slice of strings to KongProtocols.

type NamespacedConfigPatch

type NamespacedConfigPatch struct {
	// Path is the JSON path to add the patch.
	Path string `json:"path"`
	// ValueFrom is the reference to a key of a secret where the patched value comes from.
	ValueFrom NamespacedConfigSource `json:"valueFrom"`
}

NamespacedConfigPatch is a JSON patch to add values from secrets to KongClusterPlugin to the generated configuration of plugin in Kong. +kubebuilder:object:generate=true

func (*NamespacedConfigPatch) DeepCopy

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

func (*NamespacedConfigPatch) DeepCopyInto

func (in *NamespacedConfigPatch) DeepCopyInto(out *NamespacedConfigPatch)

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

type NamespacedConfigSource

type NamespacedConfigSource struct {
	// Specifies a name, a namespace, and a key of a secret to refer to.
	SecretValue NamespacedSecretValueFromSource `json:"secretKeyRef"`
}

NamespacedConfigSource is a wrapper around NamespacedSecretValueFromSource. +kubebuilder:object:generate=true

func (*NamespacedConfigSource) DeepCopy

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

func (*NamespacedConfigSource) DeepCopyInto

func (in *NamespacedConfigSource) DeepCopyInto(out *NamespacedConfigSource)

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

type NamespacedSecretValueFromSource

type NamespacedSecretValueFromSource struct {
	// The namespace containing the secret.
	Namespace string `json:"namespace"`
	// The secret containing the key.
	Secret string `json:"name"`
	// The key containing the value.
	Key string `json:"key"`
}

NamespacedSecretValueFromSource represents the source of a secret value specifying the secret namespace. +kubebuilder:object:generate=true

func (*NamespacedSecretValueFromSource) DeepCopy

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

func (*NamespacedSecretValueFromSource) DeepCopyInto

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

type SecretValueFromSource

type SecretValueFromSource struct {
	// The secret containing the key.
	Secret string `json:"name"`
	// The key containing the value.
	Key string `json:"key"`
}

SecretValueFromSource represents the source of a secret value. +kubebuilder:object:generate=true

func (*SecretValueFromSource) DeepCopy

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

func (*SecretValueFromSource) DeepCopyInto

func (in *SecretValueFromSource) DeepCopyInto(out *SecretValueFromSource)

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