settingsutil

package
v1.17.9 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext deprecated

func FromContext(ctx context.Context) *v1.Settings

Deprecated: potentially unsafe panic

func GenerateNamespacesToWatch added in v1.17.9

func GenerateNamespacesToWatch(settings *v1.Settings, namespaces kubernetes.KubeNamespaceList) ([]string, error)

GenerateNamespacesToWatch generates the list of namespaces to watch based on : - If `watchNamespaces` is defined, return it and do not consider `watchNamespaceSelectors` - If `watchNamespaces` and `watchNamespaceSelectors` are not defined, return `watchNamespaces` for backward compatibility - If `watchNamespaces` is not defined and `watchNamespaceSelectors` is defined, return all namespaces that match the `watchNamespaceSelectors` In every case, the `discoveryNamespace` (defaults to `gloo-system`) is appended to the list of namespaces

func GetNamespacesToWatch added in v1.17.9

func GetNamespacesToWatch(settings *v1.Settings) []string

GetNamespacesToWatch returns the list of namespaces to watch based on the last run of `GenerateNamespacesToWatch`

func IsAllNamespaces

func IsAllNamespaces(watchNs []string) bool

func IsAllNamespacesFromSettings

func IsAllNamespacesFromSettings(settings *v1.Settings) bool

func MaybeFromContext added in v1.3.22

func MaybeFromContext(ctx context.Context) *v1.Settings

func NamespaceWatched added in v1.17.9

func NamespaceWatched(settings *v1.Settings, namespace kubernetes.KubeNamespace) (bool, error)

NamespaceWatched returns true if the namespace passed will be watched based on the current settings object's `watchNamespaces` and `watchNamespaceSelectors` fields

func UpdateNamespacesToWatch added in v1.17.9

func UpdateNamespacesToWatch(settings *v1.Settings, namespaces kubernetes.KubeNamespaceList) (bool, error)

UpdateNamespacesToWatch generates and updated the list of namespaces to watch and returns true if updated

func WithSettings

func WithSettings(ctx context.Context, settings *v1.Settings) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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