v1

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the konghq.com v1 API group +kubebuilder:object:generate=true +groupName=configuration.konghq.com

Index

Constants

This section is empty.

Variables

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

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

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

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

Functions

func KongProtocolsToStrings added in v2.1.0

func KongProtocolsToStrings(protocols []KongProtocol) (res []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 ConfigSource

type ConfigSource struct {
	SecretValue SecretValueFromSource `json:"secretKeyRef,omitempty"`
}

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.
	//+kubebuilder:validation:Type=object
	Config apiextensionsv1.JSON `json:"config,omitempty"`

	// ConfigFrom references a secret containing the plugin configuration.
	ConfigFrom *NamespacedConfigSource `json:"configFrom,omitempty"`

	// PluginName is the name of the plugin to which to apply the config
	//+kubebuilder:validation:Required
	PluginName string `json:"plugin,omitempty"`

	// 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"`
}

KongClusterPlugin is the Schema for the kongclusterplugins API

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 KongConsumer

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

	// Username unique username of the consumer.
	Username string `json:"username,omitempty"`

	// CustomID existing unique ID for the consumer - useful for mapping
	// Kong with users in your existing database
	CustomID string `json:"custom_id,omitempty"`

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

KongConsumer is the Schema for the kongconsumers API

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.

type KongConsumerList

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

KongConsumerList contains a list of KongConsumer

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.

type KongIngress

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

	Upstream *KongIngressUpstream `json:"upstream,omitempty"`
	Proxy    *KongIngressService  `json:"proxy,omitempty"`
	Route    *KongIngressRoute    `json:"route,omitempty"`
}

KongIngress is the Schema for the kongingresses API

func (*KongIngress) DeepCopy

func (in *KongIngress) DeepCopy() *KongIngress

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

func (*KongIngress) DeepCopyInto

func (in *KongIngress) DeepCopyInto(out *KongIngress)

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

func (*KongIngress) DeepCopyObject

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

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

type KongIngressList

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

KongIngressList contains a list of KongIngress

func (*KongIngressList) DeepCopy

func (in *KongIngressList) DeepCopy() *KongIngressList

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

func (*KongIngressList) DeepCopyInto

func (in *KongIngressList) DeepCopyInto(out *KongIngressList)

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

func (*KongIngressList) DeepCopyObject

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

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

type KongIngressRoute added in v2.1.0

type KongIngressRoute struct {
	Methods                 []*string           `json:"methods,omitempty" yaml:"methods,omitempty"`
	Headers                 map[string][]string `json:"headers,omitempty" yaml:"headers,omitempty"`
	Protocols               []*KongProtocol     `json:"protocols,omitempty" yaml:"protocols,omitempty"`
	RegexPriority           *int                `json:"regex_priority,omitempty" yaml:"regex_priority,omitempty"`
	StripPath               *bool               `json:"strip_path,omitempty" yaml:"strip_path,omitempty"`
	PreserveHost            *bool               `json:"preserve_host,omitempty" yaml:"preserve_host,omitempty"`
	HTTPSRedirectStatusCode *int                `json:"https_redirect_status_code,omitempty" yaml:"https_redirect_status_code,omitempty"`
	//+kubebuilder:validation:Enum=v0;v1
	PathHandling      *string   `json:"path_handling,omitempty" yaml:"path_handling,omitempty"`
	SNIs              []*string `json:"snis,omitempty" yaml:"snis,omitempty"`
	RequestBuffering  *bool     `json:"request_buffering,omitempty" yaml:"request_buffering,omitempty"`
	ResponseBuffering *bool     `json:"response_buffering,omitempty" yaml:"response_buffering,omitempty"`
}

KongIngressRoute contains KongIngress route configuration + It contains the subset of go-kong.kong.Route fields supported by kongstate.Route.overrideByKongIngress

func (*KongIngressRoute) DeepCopy added in v2.1.0

func (in *KongIngressRoute) DeepCopy() *KongIngressRoute

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

func (*KongIngressRoute) DeepCopyInto added in v2.1.0

func (in *KongIngressRoute) DeepCopyInto(out *KongIngressRoute)

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

type KongIngressService added in v2.1.0

type KongIngressService struct {
	//+kubebuilder:validation:Enum=http;https;grpc;grpcs;tcp;tls;udp
	Protocol *string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
	//+kubebuilder:validation:Pattern=^/.*$
	Path *string `json:"path,omitempty" yaml:"path,omitempty"`
	//+kubebuilder:validation:Minimum=0
	Retries *int `json:"retries,omitempty" yaml:"retries,omitempty"`
	//+kubebuilder:validation:Minimum=0
	ConnectTimeout *int `json:"connect_timeout,omitempty" yaml:"connect_timeout,omitempty"`
	//+kubebuilder:validation:Minimum=0
	ReadTimeout *int `json:"read_timeout,omitempty" yaml:"read_timeout,omitempty"`
	//+kubebuilder:validation:Minimum=0
	WriteTimeout *int `json:"write_timeout,omitempty" yaml:"write_timeout,omitempty"`
}

KongIngressService contains KongIngress service configuration + It contains the subset of go-kong.kong.Service fields supported by kongstate.Service.overrideByKongIngress

func (*KongIngressService) DeepCopy added in v2.1.0

func (in *KongIngressService) DeepCopy() *KongIngressService

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

func (*KongIngressService) DeepCopyInto added in v2.1.0

func (in *KongIngressService) DeepCopyInto(out *KongIngressService)

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

type KongIngressUpstream added in v2.1.0

type KongIngressUpstream struct {
	HostHeader *string `json:"host_header,omitempty" yaml:"host_header,omitempty"`
	//+kubebuilder:validation:Enum=round-robin;consistent-hashing;least-connections
	Algorithm *string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
	//+kubebuilder:validation:Minimum=10
	Slots              *int              `json:"slots,omitempty" yaml:"slots,omitempty"`
	Healthchecks       *kong.Healthcheck `json:"healthchecks,omitempty" yaml:"healthchecks,omitempty"`
	HashOn             *string           `json:"hash_on,omitempty" yaml:"hash_on,omitempty"`
	HashFallback       *string           `json:"hash_fallback,omitempty" yaml:"hash_fallback,omitempty"`
	HashOnHeader       *string           `json:"hash_on_header,omitempty" yaml:"hash_on_header,omitempty"`
	HashFallbackHeader *string           `json:"hash_fallback_header,omitempty" yaml:"hash_fallback_header,omitempty"`
	HashOnCookie       *string           `json:"hash_on_cookie,omitempty" yaml:"hash_on_cookie,omitempty"`
	HashOnCookiePath   *string           `json:"hash_on_cookie_path,omitempty" yaml:"hash_on_cookie_path,omitempty"`
}

KongIngressUpstream contains KongIngress upstream configuration + It contains the subset of go-kong.kong.Upstream fields supported by kongstate.Upstream.overrideByKongIngress

func (*KongIngressUpstream) DeepCopy added in v2.1.0

func (in *KongIngressUpstream) DeepCopy() *KongIngressUpstream

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

func (*KongIngressUpstream) DeepCopyInto added in v2.1.0

func (in *KongIngressUpstream) DeepCopyInto(out *KongIngressUpstream)

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"`
	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.
	//+kubebuilder:validation:Type=object
	Config apiextensionsv1.JSON `json:"config,omitempty"`

	// ConfigFrom references a secret containing the plugin configuration.
	ConfigFrom *ConfigSource `json:"configFrom,omitempty"`

	// PluginName is the name of the plugin to which to apply the config
	//+kubebuilder:validation:Required
	PluginName string `json:"plugin,omitempty"`

	// 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"`
}

KongPlugin is the Schema for the kongplugins API

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.

type KongPluginList

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

KongPluginList contains a list of KongPlugin

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.

type KongProtocol added in v2.1.0

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 added in v2.1.0

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

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

func StringsToKongProtocols added in v2.1.0

func StringsToKongProtocols(strings []string) (res []KongProtocol)

StringsToKongProtocols converts a slice of strings to KongProtocols

type NamespacedConfigSource

type NamespacedConfigSource struct {
	SecretValue NamespacedSecretValueFromSource `json:"secretKeyRef,omitempty"`
}

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
	//+kubebuilder:validation:Required
	Namespace string `json:"namespace,omitempty"`
	// the secret containing the key
	//+kubebuilder:validation:Required
	Secret string `json:"name,omitempty"`
	// the key containing the value
	//+kubebuilder:validation:Required
	Key string `json:"key,omitempty"`
}

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
	//+kubebuilder:validation:Required
	Secret string `json:"name,omitempty"`
	// the key containing the value
	//+kubebuilder:validation:Required
	Key string `json:"key,omitempty"`
}

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