kongconfig

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBModeFromRoot

func DBModeFromRoot(r Root) (dpconf.DBMode, error)

func KongVersionFromRoot

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

func RouterFlavorFromRoot

func RouterFlavorFromRoot(r Root) (dpconf.RouterFlavor, error)

Types

type KongStartUpOptions

type KongStartUpOptions struct {
	DBMode       dpconf.DBMode
	RouterFlavor dpconf.RouterFlavor
	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