Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the konghq.com v1 API group +kubebuilder:object:generate=true +groupName=configuration.konghq.com
Index ¶
- Variables
- func KongProtocolsToStrings(protocols []KongProtocol) (res []string)
- func Resource(resource string) schema.GroupResource
- type ConfigSource
- type KongClusterPlugin
- type KongClusterPluginList
- type KongConsumer
- type KongConsumerList
- type KongIngress
- type KongIngressList
- type KongIngressRoute
- type KongIngressService
- type KongIngressUpstream
- type KongPlugin
- type KongPluginList
- type KongProtocol
- type NamespacedConfigSource
- type NamespacedSecretValueFromSource
- type SecretValueFromSource
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (in *KongClusterPluginList) DeepCopy() *KongClusterPluginList
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 represents a virtual hostname and can be used to loadbalance // incoming requests over multiple targets (e.g. Kubernetes `Services` can // be a target, OR `Endpoints` can be targets). Upstream *KongIngressUpstream `json:"upstream,omitempty"` // Proxy defines additional connection options for the routes to be configured in the // Kong Gateway, e.g. `connection_timeout`, `retries`, e.t.c. Proxy *KongIngressService `json:"proxy,omitempty"` // Route define rules to match client requests. // Each Route is associated with a Service, // and a Service may have multiple Routes associated to it. 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 is a list of HTTP methods that match this Route. Methods []*string `json:"methods,omitempty" yaml:"methods,omitempty"` // Headers contains one or more lists of values indexed by header name // that will cause this Route to match if present in the request. // The Host header cannot be used with this attribute. Headers map[string][]string `json:"headers,omitempty" yaml:"headers,omitempty"` // Protocols is an array of the protocols this Route should allow. Protocols []*KongProtocol `json:"protocols,omitempty" yaml:"protocols,omitempty"` // RegexPriority is a number used to choose which route resolves a given request // when several routes match it using regexes simultaneously. RegexPriority *int `json:"regex_priority,omitempty" yaml:"regex_priority,omitempty"` // StripPath sets When matching a Route via one of the paths // strip the matching prefix from the upstream request URL. StripPath *bool `json:"strip_path,omitempty" yaml:"strip_path,omitempty"` // PreserveHost sets When matching a Route via one of the hosts domain names, // use the request Host header in the upstream request headers. //If set to false, the upstream Host header will be that of the Service’s host. PreserveHost *bool `json:"preserve_host,omitempty" yaml:"preserve_host,omitempty"` // HTTPSRedirectStatusCode is the status code Kong responds with // when all properties of a Route match except the protocol. HTTPSRedirectStatusCode *int `json:"https_redirect_status_code,omitempty" yaml:"https_redirect_status_code,omitempty"` // PathHandling controls how the Service path, Route path and requested path // are combined when sending a request to the upstream. //+kubebuilder:validation:Enum=v0;v1 PathHandling *string `json:"path_handling,omitempty" yaml:"path_handling,omitempty"` // SNIs is a list of SNIs that match this Route when using stream routing. SNIs []*string `json:"snis,omitempty" yaml:"snis,omitempty"` // RequestBuffering sets whether to enable request body buffering or not. RequestBuffering *bool `json:"request_buffering,omitempty" yaml:"request_buffering,omitempty"` // ResponseBuffering sets whether to enable response body buffering or not. 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 { // The protocol used to communicate with the upstream. //+kubebuilder:validation:Enum=http;https;grpc;grpcs;tcp;tls;udp Protocol *string `json:"protocol,omitempty" yaml:"protocol,omitempty"` // The path to be used in requests to the upstream server.(optional) //+kubebuilder:validation:Pattern=^/.*$ Path *string `json:"path,omitempty" yaml:"path,omitempty"` // The number of retries to execute upon failure to proxy. //+kubebuilder:validation:Minimum=0 Retries *int `json:"retries,omitempty" yaml:"retries,omitempty"` // The timeout in milliseconds for establishing a connection to the upstream server. //+kubebuilder:validation:Minimum=0 ConnectTimeout *int `json:"connect_timeout,omitempty" yaml:"connect_timeout,omitempty"` // The timeout in milliseconds between two successive read operations // for transmitting a request to the upstream server. //+kubebuilder:validation:Minimum=0 ReadTimeout *int `json:"read_timeout,omitempty" yaml:"read_timeout,omitempty"` // The timeout in milliseconds between two successive write operations // for transmitting a request to the upstream server. //+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 is The hostname to be used as Host header // when proxying requests through Kong. HostHeader *string `json:"host_header,omitempty" yaml:"host_header,omitempty"` // Algorithm is the load balancing algorithm to use. //+kubebuilder:validation:Enum=round-robin;consistent-hashing;least-connections Algorithm *string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"` // Slots is the number of slots in the load balancer algorithm. //+kubebuilder:validation:Minimum=10 Slots *int `json:"slots,omitempty" yaml:"slots,omitempty"` // Healthchecks defines the health check configurations in Kong. Healthchecks *kong.Healthcheck `json:"healthchecks,omitempty" yaml:"healthchecks,omitempty"` // HashOn defines what to use as hashing input. // Accepted values are: "none", "consumer", "ip", "header", "cookie". HashOn *string `json:"hash_on,omitempty" yaml:"hash_on,omitempty"` // HashFallback defines What to use as hashing input // if the primary hash_on does not return a hash. // Accepted values are: "none", "consumer", "ip", "header", "cookie". HashFallback *string `json:"hash_fallback,omitempty" yaml:"hash_fallback,omitempty"` // HashOnHeader defines the header name to take the value from as hash input. // Only required when "hash_on" is set to "header". HashOnHeader *string `json:"hash_on_header,omitempty" yaml:"hash_on_header,omitempty"` // HashFallbackHeader is the header name to take the value from as hash input. // Only required when "hash_fallback" is set to "header". HashFallbackHeader *string `json:"hash_fallback_header,omitempty" yaml:"hash_fallback_header,omitempty"` // The cookie name to take the value from as hash input. // Only required when "hash_on" or "hash_fallback" is set to "cookie". HashOnCookie *string `json:"hash_on_cookie,omitempty" yaml:"hash_on_cookie,omitempty"` // The cookie path to set in the response headers. // Only required when "hash_on" or "hash_fallback" is set to "cookie". 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 ¶
func (in *NamespacedConfigSource) DeepCopy() *NamespacedConfigSource
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 ¶
func (in *NamespacedSecretValueFromSource) DeepCopy() *NamespacedSecretValueFromSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespacedSecretValueFromSource.
func (*NamespacedSecretValueFromSource) DeepCopyInto ¶
func (in *NamespacedSecretValueFromSource) DeepCopyInto(out *NamespacedSecretValueFromSource)
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 ¶
func (in *SecretValueFromSource) DeepCopy() *SecretValueFromSource
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.