kongconfig

package
v2.12.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBModeFromRoot

func DBModeFromRoot(r Root) (string, error)

func KongVersionFromRoot

func KongVersionFromRoot(r Root) (kong.Version, error)

func RouterFlavorFromRoot added in v2.10.0

func RouterFlavorFromRoot(r Root, kongVersion kong.Version) (string, error)

Types

type KongStartUpOptions added in v2.10.0

type KongStartUpOptions struct {
	DBMode       string
	RouterFlavor string
	Version      kong.Version
}

KongStartUpOptions includes start up configurations of Kong that could change behavior of Kong Ingress Controller. The fields are extracted from results of Kong gateway configuration root.

func ValidateRoots

func ValidateRoots(roots []Root, skipCACerts bool) (*KongStartUpOptions, error)

ValidateRoots checks if all provided kong roots are the same given that we only care about the fact that the following fields are the same: - database setting - router flavor - kong version.

type Root

type Root map[string]any

Root represents Kong Gateway configuration root.

func GetRoots

func GetRoots(
	ctx context.Context,
	setupLog logr.Logger,
	retries uint,
	retryDelay time.Duration,
	kongClients []*adminapi.Client,
) ([]Root, error)

GetRoots fetches all the configuration roots using the provided kong clients.

func (Root) Key

func (kr Root) Key(skipCACerts bool) string

func (Root) Validate

func (kr Root) Validate(skipCACerts bool) error

Jump to

Keyboard shortcuts

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