ingressnginx

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

Ingress Nginx Provider

The project supports translating ingress-nginx specific annotations.

Current supported annotations:

  • nginx.ingress.kubernetes.io/canary: If set to true will enable weighting backends.
  • nginx.ingress.kubernetes.io/canary-by-header: If specified, the value of this annotation is the header name that will be added as a HTTPHeaderMatch for the routes
  • generated from this Ingress. If not specified, no HTTPHeaderMatch will be generated.
  • nginx.ingress.kubernetes.io/canary-by-header-value: If specified, the value of this annotation is the header value to perform an HeaderMatchExact match on in the generated HTTPHeaderMatch.
  • nginx.ingress.kubernetes.io/canary-by-header-pattern: If specified, this is the pattern to match against for the HTTPHeaderMatch, which will be of type HeaderMatchRegularExpression.
  • nginx.ingress.kubernetes.io/canary-weight: If specified and non-zero, this value will be applied as the weight of the backends for the routes generated from this Ingress resource. nginx.ingress.kubernetes.io/canary-weight-total

If you are reliant on any annotations not listed above, please open an issue. In the meantime you'll need to manually find a Gateway API equivalent.

Documentation

Index

Constants

View Source
const Name = "ingress-nginx"

The Name of the provider.

View Source
const NginxIngressClass = "nginx"

Variables

This section is empty.

Functions

func NewProvider

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

NewProvider constructs and returns the ingress-nginx 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(_ context.Context, filename string) error

func (*Provider) ToGatewayAPI

ToGatewayAPI converts the received i2gw.InputResources to i2gw.GatewayResources including the ingress-nginx specific features.

Jump to

Keyboard shortcuts

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