kong

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

README

Kong Provider

Annotations supported

The project supports translating Kong-specific annotations.

Current supported annotations:

  • konghq.com/methods: If specified, the values of this annotation are used to perform method matching on the associated ingress rules. Multiple methods can be specified by separating values with commas. Example: konghq.com/methods: "POST,GET".
  • konghq.com/headers.*: If specified, the values of this annotation are used to perform header matching on the associated ingress rules. The header name is specified in the annotation key after ., and the annotation value can contain multiple header values separated by commas. All the header values for a specific header name are intended to be ORed. Example: konghq.com/headers.x-routing: "alpha,bravo".
  • konghq.com/plugins: If specified, the values of this annotation are used to configure plugins on the associated ingress rules. Multiple plugins can be specified by separating values with commas. Example: konghq.com/plugins: "plugin1,plugin2".

If you are reliant on any annotations not listed above, please open an issue.

Implementation-specific features

The following implementation-specific features are supported:

  • The ingress ImplementationSpecific match type is properly converted to
    • RegularExpression HTTPRoute match type when the path has the prefix /~.
    • PathPrefix HTTPRoute match type when there is no /~ prefix.

Documentation

Index

Constants

View Source
const KongIngressClass = "kong"
View Source
const Name = "kong"

The Name of the provider.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(conf *i2gw.ProviderConf) i2gw.Provider

NewProvider constructs and returns the kong implementation of i2gw.Provider.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements the i2gw.Provider interface.

func (*Provider) ReadResourcesFromCluster

func (p *Provider) ReadResourcesFromCluster(ctx context.Context) error

func (*Provider) ReadResourcesFromFile added in v0.2.0

func (p *Provider) ReadResourcesFromFile(ctx context.Context, filename string) error

func (*Provider) ToGatewayAPI

ToGatewayAPI converts the received i2gw.InputResources to i2gw.GatewayResources including the kong specific features.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL