kong2kic

package
v1.42.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KongHQClientCert              = "konghq.com/client-cert"
	KongHQConnectTimeout          = "konghq.com/connect-timeout"
	KongHQCredential              = "konghq.com/credential" //nolint: gosec
	KongHQHeaders                 = "konghq.com/headers"
	KongHQHTTPSRedirectStatusCode = "konghq.com/https-redirect-status-code"
	KongHQMethods                 = "konghq.com/methods"
	KongHQOverride                = "konghq.com/override"
	KongHQPath                    = "konghq.com/path"
	KongHQPathHandling            = "konghq.com/path-handling"
	KongHQPlugins                 = "konghq.com/plugins"
	KongHQPreserveHost            = "konghq.com/preserve-host"
	KongHQProtocol                = "konghq.com/protocol"
	KongHQProtocols               = "konghq.com/protocols"
	KongHQReadTimeout             = "konghq.com/read-timeout"
	KongHQRegexPriority           = "konghq.com/regex-priority"
	KongHQRequestBuffering        = "konghq.com/request-buffering"
	KongHQResponseBuffering       = "konghq.com/response-buffering"
	KongHQRetries                 = "konghq.com/retries"
	KongHQSNIs                    = "konghq.com/snis"
	KongHQStripPath               = "konghq.com/strip-path"
	KongHQTags                    = "konghq.com/tags"
	KongHQUpstreamPolicy          = "konghq.com/upstream-policy"
	KongHQWriteTimeout            = "konghq.com/write-timeout"
)
View Source
const (
	ConfigurationKongHQ        = "configuration.konghq.com"
	ConfigurationKongHQv1      = "configuration.konghq.com/v1"
	ConfigurationKongHQv1beta1 = "configuration.konghq.com/v1beta1"
	GatewayAPIVersionV1        = "gateway.networking.k8s.io/v1"
	GatewayAPIVersionV1Beta1   = "gateway.networking.k8s.io/v1beta1"
	HTTPRouteKind              = "HTTPRoute"
	IngressAPIVersion          = "networking.k8s.io/v1"
	IngressClass               = "kubernetes.io/ingress.class"
	IngressKind                = "Ingress"
	KICV2GATEWAY               = "KICV2_GATEWAY"
	KICV2INGRESS               = "KICV2_INGRESS"
	KICV3GATEWAY               = "KICV3_GATEWAY"
	KICV3INGRESS               = "KICV3_INGRESS"
	KongClusterPluginKind      = "KongClusterPlugin"
	KongConsumerKind           = "KongConsumer"
	KongConsumerGroupKind      = "KongConsumerGroup"
	KongCredType               = "kongCredType"
	KongIngressKind            = "KongIngress"
	KongPluginKind             = "KongPlugin"
	SecretKind                 = "Secret"
	SecretCADigest             = "ca.digest"
	ServiceAPIVersionv1        = "v1"
	ServiceKind                = "Service"
	UpstreamPolicyKind         = "KongUpstreamPolicy"
)

Variables

View Source
var ClassName = "kong"

ClassName is set by the CLI flag --class-name

Functions

func MarshalKongToKIC

func MarshalKongToKIC(content *file.Content, builderType string, format string) ([]byte, error)

func SerializeObjectDroppingFields

func SerializeObjectDroppingFields(obj interface{}, format string) ([]byte, error)

func WriteContentToFile

func WriteContentToFile(content *file.Content, filename string, format file.Format, yamlOrJSON string) error

Types

type Director

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

type HeadersByNameTypeAndValue added in v1.38.0

type HeadersByNameTypeAndValue []k8sgwapiv1.HTTPHeaderMatch

HeadersByNameTypeAndValue is a type to sort headers by name, type and value. This is needed to ensure that the order of headers is consistent across runs.

func (HeadersByNameTypeAndValue) Len added in v1.38.0

func (HeadersByNameTypeAndValue) Less added in v1.38.0

func (a HeadersByNameTypeAndValue) Less(i, j int) bool

func (HeadersByNameTypeAndValue) Swap added in v1.38.0

func (a HeadersByNameTypeAndValue) Swap(i, j int)

type IBuilder

type IBuilder interface {
	// contains filtered or unexported methods
}

type KICContent

type KICContent struct {
	KongIngresses        []configurationv1.KongIngress             `json:"kongIngresses,omitempty" yaml:",omitempty"`
	KongPlugins          []configurationv1.KongPlugin              `json:"kongPlugins,omitempty" yaml:",omitempty"`
	KongClusterPlugins   []configurationv1.KongClusterPlugin       `json:"clusterPlugins,omitempty" yaml:",omitempty"`
	Ingresses            []k8snetv1.Ingress                        `json:"ingresses,omitempty" yaml:",omitempty"`
	Services             []k8scorev1.Service                       `json:"services,omitempty" yaml:",omitempty"`
	Secrets              []k8scorev1.Secret                        `json:"secrets,omitempty" yaml:",omitempty"`
	KongConsumers        []configurationv1.KongConsumer            `json:"consumers,omitempty" yaml:",omitempty"`
	KongConsumerGroups   []configurationv1beta1.KongConsumerGroup  `json:"consumerGroups,omitempty" yaml:",omitempty"`
	HTTPRoutes           []k8sgwapiv1.HTTPRoute                    `json:"httpRoutes,omitempty" yaml:",omitempty"`
	KongUpstreamPolicies []configurationv1beta1.KongUpstreamPolicy `json:"upstreamPolicies,omitempty" yaml:",omitempty"`
}

KICContent represents a serialized Kong state for KIC. +k8s:deepcopy-gen=true

type KICv2GatewayAPIBuilder

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

type KICv2IngressAPIBuilder

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

type KICv3GatewayAPIBuider

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

type KICv3IngressAPIBuilder

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

Jump to

Keyboard shortcuts

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