Documentation ¶
Index ¶
- func ClientConfigWithNamespace(clientConfig clientcmd.ClientConfig, namespace string) (clientcmd.ClientConfig, error)
- func GetGardenClient(config *types.StoreConfigGardener) (client.Client, error)
- func GetGardenKubeconfigPath(landscapeIdentity string) string
- func GetSeedIdentifier(landscape, seedName string) string
- func GetShootIdentifier(landscape, project, shoot string) string
- func GetStoreConfig(store types.KubeconfigStore) (*types.StoreConfigGardener, error)
- func IsManagedSeed(shoot gardencorev1beta1.Shoot) bool
- func ValidateGardenerStoreConfiguration(path *field.Path, store types.KubeconfigStore) (*string, field.ErrorList)
- type GardenerResource
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 ¶
GetGardenKubeconfigPath gets the kubeconfig path for the kubeconfig that is configured in the SwitchConfig and points to the Gardener API
func GetSeedIdentifier ¶
GetSeedIdentifier returns the Seed identifier in the form <landscape>--seed--<seed-name>
func GetShootIdentifier ¶
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 IsManagedSeed ¶
func IsManagedSeed(shoot gardencorev1beta1.Shoot) bool
IsManagedSeed 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 ¶
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