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
- Variables
- func KongProtocolsToStrings(protocols []KongProtocol) (res []string)
- func Resource(resource string) schema.GroupResource
- type ConditionReason
- type ConditionType
- type ConfigSource
- type KongClusterPlugin
- type KongClusterPluginList
- type KongClusterPluginStatus
- type KongConsumer
- type KongConsumerList
- type KongConsumerStatus
- type KongIngress
- type KongIngressList
- type KongIngressRoute
- type KongIngressService
- type KongIngressUpstream
- type KongPlugin
- type KongPluginList
- type KongPluginStatus
- type KongProtocol
- type NamespacedConfigSource
- type NamespacedSecretValueFromSource
- type SecretValueFromSource
Constants ¶
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" )
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 ConditionReason ¶ added in v2.11.0
type ConditionReason string
ConditionReason defines the set of reasons that explain why a particular condition type has been raised.
type ConditionType ¶ added in v2.11.0
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 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,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. 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"`
// 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"`
// 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.
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 KongClusterPluginStatus ¶ added in v2.11.0
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 ¶ added in v2.11.0
func (in *KongClusterPluginStatus) DeepCopy() *KongClusterPluginStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KongClusterPluginStatus.
func (*KongClusterPluginStatus) DeepCopyInto ¶ added in v2.11.0
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.
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.
CustomID string `json:"custom_id,omitempty"`
// Credentials are references to secrets containing a credential to be
// provisioned in Kong.
Credentials []string `json:"credentials,omitempty"`
// ConsumerGroups are references to consumer groups (that consumer wants to be part of)
// provisioned in Kong.
ConsumerGroups []string `json:"consumerGroups,omitempty"`
// Status represents the current status of the KongConsumer resource.
Status KongConsumerStatus `json:"status,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 KongConsumerStatus ¶ added in v2.11.0
type KongConsumerStatus struct {
// Conditions describe the current conditions of the KongConsumer.
//
// 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"`
}
KongConsumerStatus represents the current status of the KongConsumer resource.
func (*KongConsumerStatus) DeepCopy ¶ added in v2.11.0
func (in *KongConsumerStatus) DeepCopy() *KongConsumerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KongConsumerStatus.
func (*KongConsumerStatus) DeepCopyInto ¶ added in v2.11.0
func (in *KongConsumerStatus) DeepCopyInto(out *KongConsumerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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`, etc.
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.
// Deprecated: use Ingress' "konghq.com/methods" annotation instead.
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.
// Deprecated: use Ingress' "konghq.com/headers" annotation instead.
Headers map[string][]string `json:"headers,omitempty" yaml:"headers,omitempty"`
// Protocols is an array of the protocols this Route should allow.
// Deprecated: use Ingress' "konghq.com/protocols" annotation instead.
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.
// Deprecated: use Ingress' "konghq.com/regex-priority" annotation instead.
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.
// Deprecated: use Ingress' "konghq.com/strip-path" annotation instead.
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.
// Deprecated: use Ingress' "konghq.com/preserve-host" annotation instead.
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.
// Deprecated: use Ingress' "ingress.kubernetes.io/force-ssl-redirect" or
// "konghq.com/https-redirect-status-code" annotations instead.
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
// Deprecated: use Ingress' "konghq.com/path-handling" annotation instead.
PathHandling *string `json:"path_handling,omitempty" yaml:"path_handling,omitempty"`
// SNIs is a list of SNIs that match this Route when using stream routing.
// Deprecated: use Ingress' "konghq.com/snis" annotation instead.
SNIs []*string `json:"snis,omitempty" yaml:"snis,omitempty"`
// RequestBuffering sets whether to enable request body buffering or not.
// Deprecated: use Ingress' "konghq.com/request-buffering" annotation instead.
RequestBuffering *bool `json:"request_buffering,omitempty" yaml:"request_buffering,omitempty"`
// ResponseBuffering sets whether to enable response body buffering or not.
// Deprecated: use Ingress' "konghq.com/response-buffering" annotation instead.
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`. Deprecated: use Ingress' annotations instead.
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.
// Deprecated: use Service's "konghq.com/protocol" annotation instead.
// +kubebuilder:validation:Enum=http;https;grpc;grpcs;tcp;tls;udp
Protocol *string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
// (optional) The path to be used in requests to the upstream server.
// Deprecated: use Service's "konghq.com/path" annotation instead.
// +kubebuilder:validation:Pattern=^/.*$
Path *string `json:"path,omitempty" yaml:"path,omitempty"`
// The number of retries to execute upon failure to proxy.
// Deprecated: use Service's "konghq.com/retries" annotation instead.
// +kubebuilder:validation:Minimum=0
Retries *int `json:"retries,omitempty" yaml:"retries,omitempty"`
// The timeout in milliseconds for establishing a connection to the upstream server.
// Deprecated: use Service's "konghq.com/connect-timeout" annotation instead.
// +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.
// Deprecated: use Service's "konghq.com/read-timeout" annotation instead.
// +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.
// Deprecated: use Service's "konghq.com/write-timeout" annotation instead.
// +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. Deprecated: use Service's annotations instead.
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;latency
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", "path", "query_arg", "uri_capture".
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"`
// HashOnQueryArg is the query string parameter whose value is the hash input when "hash_on" is set to "query_arg".
HashOnQueryArg *string `json:"hash_on_query_arg,omitempty" yaml:"hash_on_query_arg,omitempty"`
// HashFallbackQueryArg is the "hash_fallback" version of HashOnQueryArg.
HashFallbackQueryArg *string `json:"hash_fallback_query_arg,omitempty" yaml:"hash_fallback_query_arg,omitempty"`
// HashOnURICapture is the name of the capture group whose value is the hash input when "hash_on" is set to
// "uri_capture".
HashOnURICapture *string `json:"hash_on_uri_capture,omitempty" yaml:"hash_on_uri_capture,omitempty"`
// HashFallbackURICapture is the "hash_fallback" version of HashOnURICapture.
HashFallbackURICapture *string `json:"hash_fallback_uri_capture,omitempty" yaml:"hash_fallback_uri_capture,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"`
// 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.
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"`
// 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.
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 KongPluginStatus ¶ added in v2.11.0
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 ¶ added in v2.11.0
func (in *KongPluginStatus) DeepCopy() *KongPluginStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KongPluginStatus.
func (*KongPluginStatus) DeepCopyInto ¶ added in v2.11.0
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 ¶ 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 {
// Specifies a name, a namespace, and a key of a secret to refer to.
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.