gardener

package
v0.0.0-...-bbd9c0a Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientConfigWithNamespace

func ClientConfigWithNamespace(clientConfig clientcmd.ClientConfig, namespace string) (clientcmd.ClientConfig, error)

ClientConfigWithNamespace sets a namespace to a kubeconfig client config

func GetGardenClient

func GetGardenClient(config *types.StoreConfigGardener) (client.Client, error)

func GetGardenKubeconfigPath

func GetGardenKubeconfigPath(landscapeIdentity string) string

GetGardenKubeconfigPath gets the kubeconfig path for the kubeconfig that is configured in the SwitchConfig and points to the Gardener API

func GetSeedIdentifier

func GetSeedIdentifier(landscape, seedName string) string

GetSeedIdentifier returns the Seed identifier in the form <landscape>--seed--<seed-name>

func GetShootIdentifier

func GetShootIdentifier(landscape, project, shoot string) string

GetShootIdentifier returns the Shoot identifier in the form <landscape>--shoot--<project-name>--<shoot-name>

func GetStoreConfig

func GetStoreConfig(store types.KubeconfigStore) (*types.StoreConfigGardener, error)

GetStoreConfig unmarshalls to the Gardener store config from the configuration

func IsShootedSeed

func IsShootedSeed(shoot gardencorev1beta1.Shoot) bool

IsShootedSeed determines if this Shoot is a Shooted seed based on an annotation

func ValidateGardenerStoreConfiguration

func ValidateGardenerStoreConfiguration(path *field.Path, store types.KubeconfigStore) (*string, field.ErrorList)

ValidateGardenerStoreConfiguration validates the store configuration for Gardener returns the optional landscape name as well as the error list is being tested as part of the validation test suite

Types

type GardenerResource

type GardenerResource string
const (
	GardenerResourceShoot GardenerResource = "Shoot"
	GardenerResourceSeed  GardenerResource = "Seed"
)

func ParseIdentifier

func ParseIdentifier(path string) (string, GardenerResource, string, string, string, error)

ParseIdentifier takes a kubeconfig identifier and returns the 1) the landscape identity or name 2) type of the Gardener resource (shoot/seed) 3) name of the resource 4) optionally the namespace 5) optionally the project name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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