gce

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

GCE Provider

The project supports translating ingress-gce specific annotations.

Currently supported annotations: kubernetes.io/ingress.class: Though it is a deprecated annotation for most providers, GCE still uses this annotation to specify the specific type of load balancers created by GKE Ingress.

Implementation-specific features

The following implementation-specific features are supported:

  • Ingress path with type ImplementationSpecific will:
    • Translate to equivalent Gateway Prefix path but dropping /*, if /* exists
    • Translate to equivalent Exact path otherwise.

Examples:

Ingress ImplementationSpecific Path map to Gateway Path
/* / Prefix
/v1 /v1 Exact
/v1/ /v1/ Exact
/v1/* /v1 Prefix

Note: For Ingress ImplementationSpecific path with /v1/*, it will map to /v1/ or /v1/v2 but not /v1, but the translator will convert it to the most similar Gateway path /v1 Prefix, which means while /v1 path is not considered as a matching path for Ingress, it will be a matching path for Gateway. If you want to avoid such behavior, please consider switching to Prefix, Exact, or an ImplementationSpecific path without * before converting an Ingress to a Gateway.

Feature list

Currently supported:

To be supported:

Summary of GKE Ingress annotation

External Ingress: https://cloud.google.com/kubernetes-engine/docs/how-to/load-balance-ingress#summary_of_external_ingress_annotations

Internal Ingress: https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balance-ingress#summary_of_internal_ingress_annotations

Documentation

Index

Constants

View Source
const ProviderName = "gce"

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(conf *i2gw.ProviderConf) 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

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

func (*Provider) ToGatewayAPI

func (p *Provider) ToGatewayAPI() (i2gw.GatewayResources, field.ErrorList)

ToGatewayAPI converts stored Ingress GCE API entities to i2gw.GatewayResources including the ingress-gce specific features.

Jump to

Keyboard shortcuts

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