Documentation
¶
Index ¶
- Constants
- func GenerateKongRoutePathFromHTTPRouteMatch(pathMatch *gatewayv1.HTTPPathMatch, setCaptureGroup bool) (paths []string, regexPriority *int64)
- type KongCertificateBuilder
- func (b *KongCertificateBuilder) Build() (configurationv1alpha1.KongCertificate, error)
- func (b *KongCertificateBuilder) MustBuild() configurationv1alpha1.KongCertificate
- func (b *KongCertificateBuilder) WithAnnotations(gateway *gwtypes.Gateway) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithAnnotationsForRoute(route client.Object, pRef *gwtypes.ParentReference) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithLabels(gateway *gwtypes.Gateway, listener *gwtypes.Listener) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithLabelsForRoute(route client.Object, pRef *gwtypes.ParentReference) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithName(name string) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithNamespace(namespace string) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithOwner(owner *gwtypes.Gateway) *KongCertificateBuilder
- func (b *KongCertificateBuilder) WithSecretRef(name, namespace string) *KongCertificateBuilder
- type KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) Build() (configurationv1alpha1.KongPluginBinding, error)
- func (b *KongPluginBindingBuilder) MustBuild() configurationv1alpha1.KongPluginBinding
- func (b *KongPluginBindingBuilder) WithAnnotations(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithLabels(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithName(name string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithNamespace(namespace string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithOwner(owner *gwtypes.HTTPRoute) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithPluginRef(name string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithRouteRef(name string) *KongPluginBindingBuilder
- func (b *KongPluginBindingBuilder) WithServiceRef(name string) *KongPluginBindingBuilder
- type KongPluginBuilder
- func (b *KongPluginBuilder) Build() (configurationv1.KongPlugin, error)
- func (b *KongPluginBuilder) MustBuild() configurationv1.KongPlugin
- func (b *KongPluginBuilder) WithAnnotations(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBuilder
- func (b *KongPluginBuilder) WithLabels(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBuilder
- func (b *KongPluginBuilder) WithName(name string) *KongPluginBuilder
- func (b *KongPluginBuilder) WithNamespace(namespace string) *KongPluginBuilder
- func (b *KongPluginBuilder) WithOwner(owner *gwtypes.HTTPRoute) *KongPluginBuilder
- func (b *KongPluginBuilder) WithPluginConfig(config json.RawMessage) *KongPluginBuilder
- func (b *KongPluginBuilder) WithPluginName(name string) *KongPluginBuilder
- type KongRouteBuilder
- func (b *KongRouteBuilder) Build() (configurationv1alpha1.KongRoute, error)
- func (b *KongRouteBuilder) MustBuild() configurationv1alpha1.KongRoute
- func (b *KongRouteBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongRouteBuilder
- func (b *KongRouteBuilder) WithHTTPRouteMatch(match gwtypes.HTTPRouteMatch, setCaptureGroup bool) *KongRouteBuilder
- func (b *KongRouteBuilder) WithHosts(hosts []string) *KongRouteBuilder
- func (b *KongRouteBuilder) WithKongService(name string) *KongRouteBuilder
- func (b *KongRouteBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongRouteBuilder
- func (b *KongRouteBuilder) WithName(name string) *KongRouteBuilder
- func (b *KongRouteBuilder) WithNamespace(namespace string) *KongRouteBuilder
- func (b *KongRouteBuilder) WithOwner(owner client.Object) *KongRouteBuilder
- func (b *KongRouteBuilder) WithPreserveHost(preserveHost bool) *KongRouteBuilder
- func (b *KongRouteBuilder) WithProtocols(protocols ...sdkkonnectcomp.RouteJSONProtocols) *KongRouteBuilder
- func (b *KongRouteBuilder) WithSNIs(snis []string) *KongRouteBuilder
- func (b *KongRouteBuilder) WithSpecName(name string) *KongRouteBuilder
- func (b *KongRouteBuilder) WithStripPath(stripPath bool) *KongRouteBuilder
- type KongSNIBuilder
- func (b *KongSNIBuilder) Build() (configurationv1alpha1.KongSNI, error)
- func (b *KongSNIBuilder) MustBuild() configurationv1alpha1.KongSNI
- func (b *KongSNIBuilder) WithAnnotations(gateway *gwtypes.Gateway) *KongSNIBuilder
- func (b *KongSNIBuilder) WithCertificateRef(certName string) *KongSNIBuilder
- func (b *KongSNIBuilder) WithLabels(gateway *gwtypes.Gateway, listener *gwtypes.Listener) *KongSNIBuilder
- func (b *KongSNIBuilder) WithName(name string) *KongSNIBuilder
- func (b *KongSNIBuilder) WithNamespace(namespace string) *KongSNIBuilder
- func (b *KongSNIBuilder) WithOwner(owner *gwtypes.Gateway) *KongSNIBuilder
- func (b *KongSNIBuilder) WithSNIName(hostname string) *KongSNIBuilder
- type KongServiceBuilder
- func (b *KongServiceBuilder) Build() (configurationv1alpha1.KongService, error)
- func (b *KongServiceBuilder) MustBuild() configurationv1alpha1.KongService
- func (b *KongServiceBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongServiceBuilder
- func (b *KongServiceBuilder) WithClientCertificateRef(name string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithConnectTimeout(v *int64) *KongServiceBuilder
- func (b *KongServiceBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongServiceBuilder
- func (b *KongServiceBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongServiceBuilder
- func (b *KongServiceBuilder) WithName(name string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithNamespace(namespace string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithOwner(owner client.Object) *KongServiceBuilder
- func (b *KongServiceBuilder) WithPath(path string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithProtocol(protocol string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithReadTimeout(v *int64) *KongServiceBuilder
- func (b *KongServiceBuilder) WithRetries(v *int64) *KongServiceBuilder
- func (b *KongServiceBuilder) WithSpecHost(host string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithSpecName(name string) *KongServiceBuilder
- func (b *KongServiceBuilder) WithTLSVerify(v *bool) *KongServiceBuilder
- func (b *KongServiceBuilder) WithTLSVerifyDepth(v *int64) *KongServiceBuilder
- func (b *KongServiceBuilder) WithWriteTimeout(v *int64) *KongServiceBuilder
- type KongTargetBuilder
- func (b *KongTargetBuilder) Build() (configurationv1alpha1.KongTarget, error)
- func (b *KongTargetBuilder) MustBuild() configurationv1alpha1.KongTarget
- func (b *KongTargetBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongTargetBuilder
- func (b *KongTargetBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongTargetBuilder
- func (b *KongTargetBuilder) WithName(name string) *KongTargetBuilder
- func (b *KongTargetBuilder) WithNamespace(namespace string) *KongTargetBuilder
- func (b *KongTargetBuilder) WithOwner(owner client.Object) *KongTargetBuilder
- func (b *KongTargetBuilder) WithTarget(host string, port int) *KongTargetBuilder
- func (b *KongTargetBuilder) WithUpstreamRef(upstreamRef string) *KongTargetBuilder
- func (b *KongTargetBuilder) WithWeight(weight *int32) *KongTargetBuilder
- type KongUpstreamBuilder
- func (b *KongUpstreamBuilder) Build() (configurationv1alpha1.KongUpstream, error)
- func (b *KongUpstreamBuilder) MustBuild() configurationv1alpha1.KongUpstream
- func (b *KongUpstreamBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithHostHeader(v *string) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithName(name string) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithNamespace(namespace string) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithOwner(owner client.Object) *KongUpstreamBuilder
- func (b *KongUpstreamBuilder) WithSpecName(name string) *KongUpstreamBuilder
Constants ¶
const ( // KongPathRegexPrefix is the reserved prefix string that instructs Kong 3.0+ to interpret a path as a regex. KongPathRegexPrefix = "~" // KongHeaderRegexPrefix is a reserved prefix string that Kong uses to determine if it should parse a header value // as a regex. KongHeaderRegexPrefix = "~*" )
const ( // KongServiceProtocolHTTP stands for http protocol in Kong Service. KongServiceProtocolHTTP = "http" // KongServiceProtocolTCP stands for tcp protocol in Kong Service. KongServiceProtocolTCP = "tcp" // KongServiceProtocolTLS stands for tls protocol in Kong Service. KongServiceProtocolTLS = "tls" )
Variables ¶
This section is empty.
Functions ¶
func GenerateKongRoutePathFromHTTPRouteMatch ¶
func GenerateKongRoutePathFromHTTPRouteMatch(pathMatch *gatewayv1.HTTPPathMatch, setCaptureGroup bool) (paths []string, regexPriority *int64)
GenerateKongRoutePathFromHTTPRouteMatch translates the value in HTTPRoute's path match to the path used in KongRoute and returns any RegexPriority needed for the KongRoute. RegexPriority is set for Exact and non-root PathPrefix translations whose generated regex paths must preserve Gateway API path precedence in Kong's traditional-compatible router. Root capture-group translations and user-supplied RegularExpression matches keep Kong's default priority because they remain catch-all or implementation-specific cases.
Types ¶
type KongCertificateBuilder ¶
type KongCertificateBuilder struct {
// contains filtered or unexported fields
}
KongCertificateBuilder is a builder for configurationv1alpha1.KongCertificate resources.
func NewKongCertificate ¶
func NewKongCertificate() *KongCertificateBuilder
NewKongCertificate creates and returns a new KongCertificateBuilder instance.
func (*KongCertificateBuilder) Build ¶
func (b *KongCertificateBuilder) Build() (configurationv1alpha1.KongCertificate, error)
Build returns the constructed KongCertificate resource and any accumulated errors.
func (*KongCertificateBuilder) MustBuild ¶
func (b *KongCertificateBuilder) MustBuild() configurationv1alpha1.KongCertificate
MustBuild returns the constructed KongCertificate resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongCertificateBuilder) WithAnnotations ¶
func (b *KongCertificateBuilder) WithAnnotations(gateway *gwtypes.Gateway) *KongCertificateBuilder
WithAnnotations sets the annotations for the KongCertificate being built.
func (*KongCertificateBuilder) WithAnnotationsForRoute ¶ added in v2.2.0
func (b *KongCertificateBuilder) WithAnnotationsForRoute(route client.Object, pRef *gwtypes.ParentReference) *KongCertificateBuilder
WithAnnotationsForRoute sets annotations on the KongCertificate derived from a route object and its parent reference. This is the route-driven equivalent of WithAnnotations(gateway) used for listener TLS certs.
func (*KongCertificateBuilder) WithControlPlaneRef ¶
func (b *KongCertificateBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongCertificateBuilder
WithControlPlaneRef sets the ControlPlaneRef for the KongCertificate being built.
func (*KongCertificateBuilder) WithLabels ¶
func (b *KongCertificateBuilder) WithLabels(gateway *gwtypes.Gateway, listener *gwtypes.Listener) *KongCertificateBuilder
WithLabels sets the labels for the KongCertificate being built.
func (*KongCertificateBuilder) WithLabelsForRoute ¶ added in v2.2.0
func (b *KongCertificateBuilder) WithLabelsForRoute(route client.Object, pRef *gwtypes.ParentReference) *KongCertificateBuilder
WithLabelsForRoute sets labels on the KongCertificate derived from a route object and its parent reference. This is the route-driven equivalent of WithLabels(gateway, listener) used for listener TLS certs.
func (*KongCertificateBuilder) WithName ¶
func (b *KongCertificateBuilder) WithName(name string) *KongCertificateBuilder
WithName sets the name for the KongCertificate being built.
func (*KongCertificateBuilder) WithNamespace ¶
func (b *KongCertificateBuilder) WithNamespace(namespace string) *KongCertificateBuilder
WithNamespace sets the namespace for the KongCertificate being built.
func (*KongCertificateBuilder) WithOwner ¶
func (b *KongCertificateBuilder) WithOwner(owner *gwtypes.Gateway) *KongCertificateBuilder
WithOwner sets the owner reference for the KongCertificate to the given Gateway.
func (*KongCertificateBuilder) WithSecretRef ¶
func (b *KongCertificateBuilder) WithSecretRef(name, namespace string) *KongCertificateBuilder
WithSecretRef sets the secret reference for the KongCertificate.
type KongPluginBindingBuilder ¶
type KongPluginBindingBuilder struct {
// contains filtered or unexported fields
}
KongPluginBindingBuilder is a builder for configurationv1alpha1.KongPluginBinding resources.
func NewKongPluginBinding ¶
func NewKongPluginBinding() *KongPluginBindingBuilder
NewKongPluginBinding creates and returns a new KongPluginBindingBuilder instance.
func (*KongPluginBindingBuilder) Build ¶
func (b *KongPluginBindingBuilder) Build() (configurationv1alpha1.KongPluginBinding, error)
Build returns the constructed KongPluginBinding resource and any accumulated errors.
func (*KongPluginBindingBuilder) MustBuild ¶
func (b *KongPluginBindingBuilder) MustBuild() configurationv1alpha1.KongPluginBinding
MustBuild returns the constructed KongPluginBinding resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongPluginBindingBuilder) WithAnnotations ¶
func (b *KongPluginBindingBuilder) WithAnnotations(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBindingBuilder
WithAnnotations sets the annotations for the KongPluginBinding resource based on the given HTTPRoute and parent reference.
func (*KongPluginBindingBuilder) WithControlPlaneRef ¶
func (b *KongPluginBindingBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongPluginBindingBuilder
WithControlPlaneRef sets the ControlPlaneRef for the KongPluginBinding being built.
func (*KongPluginBindingBuilder) WithLabels ¶
func (b *KongPluginBindingBuilder) WithLabels(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBindingBuilder
WithLabels sets the labels for the KongPluginBinding resource based on the given HTTPRoute.
func (*KongPluginBindingBuilder) WithName ¶
func (b *KongPluginBindingBuilder) WithName(name string) *KongPluginBindingBuilder
WithName sets the name for the KongPluginBinding being built.
func (*KongPluginBindingBuilder) WithNamespace ¶
func (b *KongPluginBindingBuilder) WithNamespace(namespace string) *KongPluginBindingBuilder
WithNamespace sets the namespace for the KongPluginBinding being built.
func (*KongPluginBindingBuilder) WithOwner ¶
func (b *KongPluginBindingBuilder) WithOwner(owner *gwtypes.HTTPRoute) *KongPluginBindingBuilder
WithOwner sets the owner reference for the KongPluginBinding to the given HTTPRoute.
func (*KongPluginBindingBuilder) WithPluginRef ¶
func (b *KongPluginBindingBuilder) WithPluginRef(name string) *KongPluginBindingBuilder
WithPluginRef sets the plugin reference for the KongPluginBinding.
func (*KongPluginBindingBuilder) WithRouteRef ¶
func (b *KongPluginBindingBuilder) WithRouteRef(name string) *KongPluginBindingBuilder
WithRouteRef sets the KongRoute reference for the KongPluginBinding.
func (*KongPluginBindingBuilder) WithServiceRef ¶
func (b *KongPluginBindingBuilder) WithServiceRef(name string) *KongPluginBindingBuilder
WithServiceRef sets the KongService reference for the KongPluginBinding.
type KongPluginBuilder ¶
type KongPluginBuilder struct {
// contains filtered or unexported fields
}
KongPluginBuilder is a builder for configurationv1.KongPlugin resources.
func NewKongPlugin ¶
func NewKongPlugin() *KongPluginBuilder
NewKongPlugin creates and returns a new KongPluginBuilder instance.
func (*KongPluginBuilder) Build ¶
func (b *KongPluginBuilder) Build() (configurationv1.KongPlugin, error)
Build returns the constructed KongPlugin resource and any accumulated errors.
func (*KongPluginBuilder) MustBuild ¶
func (b *KongPluginBuilder) MustBuild() configurationv1.KongPlugin
MustBuild returns the constructed KongPlugin resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongPluginBuilder) WithAnnotations ¶
func (b *KongPluginBuilder) WithAnnotations(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBuilder
WithAnnotations sets the annotations for the KongPlugin resource based on the given HTTPRoute and parent reference.
func (*KongPluginBuilder) WithLabels ¶
func (b *KongPluginBuilder) WithLabels(route *gwtypes.HTTPRoute, parentRef *gwtypes.ParentReference) *KongPluginBuilder
WithLabels sets the labels for the KongPlugin resource based on the given HTTPRoute.
func (*KongPluginBuilder) WithName ¶
func (b *KongPluginBuilder) WithName(name string) *KongPluginBuilder
WithName sets the name for the KongPlugin being built.
func (*KongPluginBuilder) WithNamespace ¶
func (b *KongPluginBuilder) WithNamespace(namespace string) *KongPluginBuilder
WithNamespace sets the namespace for the KongPlugin being built.
func (*KongPluginBuilder) WithOwner ¶
func (b *KongPluginBuilder) WithOwner(owner *gwtypes.HTTPRoute) *KongPluginBuilder
WithOwner sets the owner reference for the KongPlugin to the given HTTPRoute.
func (*KongPluginBuilder) WithPluginConfig ¶
func (b *KongPluginBuilder) WithPluginConfig(config json.RawMessage) *KongPluginBuilder
WithPluginConfig sets the plugin config for the KongPlugin being built.
func (*KongPluginBuilder) WithPluginName ¶
func (b *KongPluginBuilder) WithPluginName(name string) *KongPluginBuilder
WithPluginName sets the plugin name for the KongPlugin being built.
type KongRouteBuilder ¶
type KongRouteBuilder struct {
// contains filtered or unexported fields
}
KongRouteBuilder is a builder for configurationv1alpha1.KongRoute resources.
func NewKongRoute ¶
func NewKongRoute() *KongRouteBuilder
NewKongRoute creates and returns a new KongRouteBuilder instance.
func (*KongRouteBuilder) Build ¶
func (b *KongRouteBuilder) Build() (configurationv1alpha1.KongRoute, error)
Build returns the constructed KongRoute resource and any accumulated errors.
func (*KongRouteBuilder) MustBuild ¶
func (b *KongRouteBuilder) MustBuild() configurationv1alpha1.KongRoute
MustBuild returns the constructed KongRoute resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongRouteBuilder) WithAnnotations ¶
func (b *KongRouteBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongRouteBuilder
WithAnnotations sets the annotations for the KongRoute resource based on the given route and parent reference.
func (*KongRouteBuilder) WithHTTPRouteMatch ¶
func (b *KongRouteBuilder) WithHTTPRouteMatch(match gwtypes.HTTPRouteMatch, setCaptureGroup bool) *KongRouteBuilder
WithHTTPRouteMatch sets the match criteria (path, method, headers) for the KongRoute.
func (*KongRouteBuilder) WithHosts ¶
func (b *KongRouteBuilder) WithHosts(hosts []string) *KongRouteBuilder
WithHosts sets the hosts for the KongRoute being built.
func (*KongRouteBuilder) WithKongService ¶
func (b *KongRouteBuilder) WithKongService(name string) *KongRouteBuilder
WithKongService sets the KongService reference for the KongRoute.
func (*KongRouteBuilder) WithLabels ¶
func (b *KongRouteBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongRouteBuilder
WithLabels sets the labels for the KongRoute resource based on the given route.
func (*KongRouteBuilder) WithName ¶
func (b *KongRouteBuilder) WithName(name string) *KongRouteBuilder
WithName sets the name field of the KongRoute resource.
func (*KongRouteBuilder) WithNamespace ¶
func (b *KongRouteBuilder) WithNamespace(namespace string) *KongRouteBuilder
WithNamespace sets the namespace field of the KongRoute resource.
func (*KongRouteBuilder) WithOwner ¶
func (b *KongRouteBuilder) WithOwner(owner client.Object) *KongRouteBuilder
WithOwner sets the owner reference for the KongRoute to the given route.
func (*KongRouteBuilder) WithPreserveHost ¶
func (b *KongRouteBuilder) WithPreserveHost(preserveHost bool) *KongRouteBuilder
WithPreserveHost sets the preserve host option for the KongRoute.
func (*KongRouteBuilder) WithProtocols ¶ added in v2.1.4
func (b *KongRouteBuilder) WithProtocols(protocols ...sdkkonnectcomp.RouteJSONProtocols) *KongRouteBuilder
WithProtocols sets the allowed protocols for the KongRoute being built.
func (*KongRouteBuilder) WithSNIs ¶ added in v2.2.0
func (b *KongRouteBuilder) WithSNIs(snis []string) *KongRouteBuilder
WithSNIs sets the SNIs for the KongRoute.
func (*KongRouteBuilder) WithSpecName ¶
func (b *KongRouteBuilder) WithSpecName(name string) *KongRouteBuilder
WithSpecName sets the name field in the KongRoute spec.
func (*KongRouteBuilder) WithStripPath ¶
func (b *KongRouteBuilder) WithStripPath(stripPath bool) *KongRouteBuilder
WithStripPath sets the strip path option for the KongRoute.
type KongSNIBuilder ¶
type KongSNIBuilder struct {
// contains filtered or unexported fields
}
KongSNIBuilder is a builder for configurationv1alpha1.KongSNI resources.
func NewKongSNI ¶
func NewKongSNI() *KongSNIBuilder
NewKongSNI creates and returns a new KongSNIBuilder instance.
func (*KongSNIBuilder) Build ¶
func (b *KongSNIBuilder) Build() (configurationv1alpha1.KongSNI, error)
Build returns the constructed KongSNI resource and any accumulated errors.
func (*KongSNIBuilder) MustBuild ¶
func (b *KongSNIBuilder) MustBuild() configurationv1alpha1.KongSNI
MustBuild returns the constructed KongSNI resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongSNIBuilder) WithAnnotations ¶
func (b *KongSNIBuilder) WithAnnotations(gateway *gwtypes.Gateway) *KongSNIBuilder
WithAnnotations sets the annotations for the KongSNI being built.
func (*KongSNIBuilder) WithCertificateRef ¶
func (b *KongSNIBuilder) WithCertificateRef(certName string) *KongSNIBuilder
WithCertificateRef sets the certificate reference for the KongSNI.
func (*KongSNIBuilder) WithLabels ¶
func (b *KongSNIBuilder) WithLabels(gateway *gwtypes.Gateway, listener *gwtypes.Listener) *KongSNIBuilder
WithLabels sets the labels for the KongSNI being built.
func (*KongSNIBuilder) WithName ¶
func (b *KongSNIBuilder) WithName(name string) *KongSNIBuilder
WithName sets the name for the KongSNI being built.
func (*KongSNIBuilder) WithNamespace ¶
func (b *KongSNIBuilder) WithNamespace(namespace string) *KongSNIBuilder
WithNamespace sets the namespace for the KongSNI being built.
func (*KongSNIBuilder) WithOwner ¶
func (b *KongSNIBuilder) WithOwner(owner *gwtypes.Gateway) *KongSNIBuilder
WithOwner sets the owner reference for the KongSNI using controllerutil.SetControllerReference.
func (*KongSNIBuilder) WithSNIName ¶
func (b *KongSNIBuilder) WithSNIName(hostname string) *KongSNIBuilder
WithSNIName sets the SNI name (hostname) in the spec.
type KongServiceBuilder ¶
type KongServiceBuilder struct {
// contains filtered or unexported fields
}
KongServiceBuilder is a builder for configurationv1alpha1.KongService resources.
func NewKongService ¶
func NewKongService() *KongServiceBuilder
NewKongService creates and returns a new KongServiceBuilder instance.
func (*KongServiceBuilder) Build ¶
func (b *KongServiceBuilder) Build() (configurationv1alpha1.KongService, error)
Build returns the constructed KongService resource and any accumulated errors.
func (*KongServiceBuilder) MustBuild ¶
func (b *KongServiceBuilder) MustBuild() configurationv1alpha1.KongService
MustBuild returns the constructed KongService resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongServiceBuilder) WithAnnotations ¶
func (b *KongServiceBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongServiceBuilder
WithAnnotations sets the annotations for the KongService being built.
func (*KongServiceBuilder) WithClientCertificateRef ¶ added in v2.2.0
func (b *KongServiceBuilder) WithClientCertificateRef(name string) *KongServiceBuilder
WithClientCertificateRef sets the clientCertificateRef on the KongService. name is the metadata.name of the KongCertificate in the same namespace. No-op when name is empty.
func (*KongServiceBuilder) WithConnectTimeout ¶ added in v2.2.0
func (b *KongServiceBuilder) WithConnectTimeout(v *int64) *KongServiceBuilder
WithConnectTimeout sets the connect timeout (milliseconds) for the KongService being built. A nil pointer leaves the field unset.
func (*KongServiceBuilder) WithControlPlaneRef ¶
func (b *KongServiceBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongServiceBuilder
WithControlPlaneRef sets the ControlPlaneRef for the KongService being built.
func (*KongServiceBuilder) WithLabels ¶
func (b *KongServiceBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongServiceBuilder
WithLabels sets the labels for the KongService being built.
func (*KongServiceBuilder) WithName ¶
func (b *KongServiceBuilder) WithName(name string) *KongServiceBuilder
WithName sets the name for the KongService being built.
func (*KongServiceBuilder) WithNamespace ¶
func (b *KongServiceBuilder) WithNamespace(namespace string) *KongServiceBuilder
WithNamespace sets the namespace for the KongService being built.
func (*KongServiceBuilder) WithOwner ¶
func (b *KongServiceBuilder) WithOwner(owner client.Object) *KongServiceBuilder
WithOwner sets the owner reference for the KongService to the given route.
func (*KongServiceBuilder) WithPath ¶ added in v2.2.0
func (b *KongServiceBuilder) WithPath(path string) *KongServiceBuilder
WithPath sets the path for the KongService being built. An empty path leaves Spec.Path unset.
func (*KongServiceBuilder) WithProtocol ¶
func (b *KongServiceBuilder) WithProtocol(protocol string) *KongServiceBuilder
WithProtocol sets the protocol for the KongService being built. Supported protocols match the Kong Gateway upstream protocol set.
func (*KongServiceBuilder) WithReadTimeout ¶ added in v2.2.0
func (b *KongServiceBuilder) WithReadTimeout(v *int64) *KongServiceBuilder
WithReadTimeout sets the read timeout (milliseconds) for the KongService being built. A nil pointer leaves the field unset.
func (*KongServiceBuilder) WithRetries ¶ added in v2.2.0
func (b *KongServiceBuilder) WithRetries(v *int64) *KongServiceBuilder
WithRetries sets the retries count for the KongService being built. A nil pointer leaves the field unset.
func (*KongServiceBuilder) WithSpecHost ¶
func (b *KongServiceBuilder) WithSpecHost(host string) *KongServiceBuilder
WithSpecHost sets the host field in the KongService spec.
func (*KongServiceBuilder) WithSpecName ¶
func (b *KongServiceBuilder) WithSpecName(name string) *KongServiceBuilder
WithSpecName sets the name field in the KongService spec.
func (*KongServiceBuilder) WithTLSVerify ¶ added in v2.2.0
func (b *KongServiceBuilder) WithTLSVerify(v *bool) *KongServiceBuilder
WithTLSVerify sets the tls-verify flag for the KongService being built. Nil leaves the field unset.
func (*KongServiceBuilder) WithTLSVerifyDepth ¶ added in v2.2.0
func (b *KongServiceBuilder) WithTLSVerifyDepth(v *int64) *KongServiceBuilder
WithTLSVerifyDepth sets the TLS verify depth for the KongService being built. Nil leaves the field unset.
func (*KongServiceBuilder) WithWriteTimeout ¶ added in v2.2.0
func (b *KongServiceBuilder) WithWriteTimeout(v *int64) *KongServiceBuilder
WithWriteTimeout sets the write timeout (milliseconds) for the KongService being built. A nil pointer leaves the field unset.
type KongTargetBuilder ¶
type KongTargetBuilder struct {
// contains filtered or unexported fields
}
KongTargetBuilder is a builder for configurationv1alpha1.KongTarget resources.
func NewKongTarget ¶
func NewKongTarget() *KongTargetBuilder
NewKongTarget creates and returns a new KongTargetBuilder instance.
func (*KongTargetBuilder) Build ¶
func (b *KongTargetBuilder) Build() (configurationv1alpha1.KongTarget, error)
Build returns the constructed KongTarget resource and any accumulated errors.
func (*KongTargetBuilder) MustBuild ¶
func (b *KongTargetBuilder) MustBuild() configurationv1alpha1.KongTarget
MustBuild returns the constructed KongTarget resource, panicking on any errors. Useful for tests or when you're certain the build will succeed.
func (*KongTargetBuilder) WithAnnotations ¶
func (b *KongTargetBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongTargetBuilder
WithAnnotations sets the annotations for the KongTarget being built.
func (*KongTargetBuilder) WithLabels ¶
func (b *KongTargetBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongTargetBuilder
WithLabels sets the labels for the KongTarget being built.
func (*KongTargetBuilder) WithName ¶
func (b *KongTargetBuilder) WithName(name string) *KongTargetBuilder
WithName sets the name for the KongTarget being built.
func (*KongTargetBuilder) WithNamespace ¶
func (b *KongTargetBuilder) WithNamespace(namespace string) *KongTargetBuilder
WithNamespace sets the namespace for the KongTarget being built.
func (*KongTargetBuilder) WithOwner ¶
func (b *KongTargetBuilder) WithOwner(owner client.Object) *KongTargetBuilder
WithOwner sets the owner reference for the KongTarget to the given route.
func (*KongTargetBuilder) WithTarget ¶
func (b *KongTargetBuilder) WithTarget(host string, port int) *KongTargetBuilder
WithTarget sets the target address for the KongTarget. It combines the host and port into a single target string in the format "host:port". The host can be an IP address, hostname, or FQDN, and the port must be a valid port number.
func (*KongTargetBuilder) WithUpstreamRef ¶
func (b *KongTargetBuilder) WithUpstreamRef(upstreamRef string) *KongTargetBuilder
WithUpstreamRef sets the upstream reference for the KongTarget.
func (*KongTargetBuilder) WithWeight ¶
func (b *KongTargetBuilder) WithWeight(weight *int32) *KongTargetBuilder
WithWeight sets the weight for the KongTarget, which determines the proportion of traffic this target will receive relative to other targets in the same upstream. If weight is nil, it defaults to 100. Higher weights receive more traffic.
type KongUpstreamBuilder ¶
type KongUpstreamBuilder struct {
// contains filtered or unexported fields
}
KongUpstreamBuilder is a builder for configurationv1alpha1.KongUpstream resources.
func NewKongUpstream ¶
func NewKongUpstream() *KongUpstreamBuilder
NewKongUpstream returns a new KongUpstreamBuilder.
func (*KongUpstreamBuilder) Build ¶
func (b *KongUpstreamBuilder) Build() (configurationv1alpha1.KongUpstream, error)
Build returns the constructed KongUpstream resource and any accumulated errors.
func (*KongUpstreamBuilder) MustBuild ¶
func (b *KongUpstreamBuilder) MustBuild() configurationv1alpha1.KongUpstream
MustBuild returns the constructed KongUpstream resource, panicking if there are any errors.
func (*KongUpstreamBuilder) WithAnnotations ¶
func (b *KongUpstreamBuilder) WithAnnotations(route client.Object, parentRef *gwtypes.ParentReference) *KongUpstreamBuilder
WithAnnotations sets the annotations for the KongUpstream being built.
func (*KongUpstreamBuilder) WithControlPlaneRef ¶
func (b *KongUpstreamBuilder) WithControlPlaneRef(cpr commonv1alpha1.ControlPlaneRef) *KongUpstreamBuilder
WithControlPlaneRef sets the control plane reference for the KongUpstream.
func (*KongUpstreamBuilder) WithHostHeader ¶ added in v2.2.0
func (b *KongUpstreamBuilder) WithHostHeader(v *string) *KongUpstreamBuilder
WithHostHeader sets the host-header field in the KongUpstream spec. A nil pointer leaves the field unset.
func (*KongUpstreamBuilder) WithLabels ¶
func (b *KongUpstreamBuilder) WithLabels(route client.Object, parentRef *gwtypes.ParentReference) *KongUpstreamBuilder
WithLabels sets the labels for the KongUpstream being built.
func (*KongUpstreamBuilder) WithName ¶
func (b *KongUpstreamBuilder) WithName(name string) *KongUpstreamBuilder
WithName sets the name for the KongUpstream being built.
func (*KongUpstreamBuilder) WithNamespace ¶
func (b *KongUpstreamBuilder) WithNamespace(namespace string) *KongUpstreamBuilder
WithNamespace sets the namespace for the KongUpstream being built.
func (*KongUpstreamBuilder) WithOwner ¶
func (b *KongUpstreamBuilder) WithOwner(owner client.Object) *KongUpstreamBuilder
WithOwner sets the owner reference for the KongUpstream to the given route.
func (*KongUpstreamBuilder) WithSpecName ¶
func (b *KongUpstreamBuilder) WithSpecName(name string) *KongUpstreamBuilder
WithSpecName sets the name field in the KongUpstream spec.