Documentation ¶
Index ¶
- Constants
- func ApplyClientConnectionConfigurationToRESTConfig(clientConnection *componentbaseconfig.ClientConnectionConfiguration, ...)
- func Decode(decoder runtime.Decoder, data []byte, into runtime.Object) error
- func GetOrCreateShootKubeconfig(ctx context.Context, c client.Client, ...) (*corev1.Secret, error)
- func NewChartRendererForShoot(version string) (chartrenderer.Interface, error)
- func NewClientForShoot(ctx context.Context, c client.Client, namespace string, opts client.Options) (*rest.Config, client.Client, error)
- func NewRESTConfigFromKubeconfig(kubeconfig []byte) (*rest.Config, error)
- func VersionInfo(vs string) (*version.Info, error)
- func VersionMajorMinor(version string) (string, error)
- type ShootClients
Constants ¶
const CAChecksumAnnotation = "checksum/ca"
CAChecksumAnnotation is a resource annotation used to store the checksum of a certificate authority.
Variables ¶
This section is empty.
Functions ¶
func ApplyClientConnectionConfigurationToRESTConfig ¶
func ApplyClientConnectionConfigurationToRESTConfig(clientConnection *componentbaseconfig.ClientConnectionConfiguration, rest *rest.Config)
ApplyClientConnectionConfigurationToRESTConfig applies the given client connection configurations to the given REST config.
func Decode ¶
Decode takes a `decoder` and decodes the provided `data` into the provided object. The underlying `into` address is used to assign the decoded object.
func GetOrCreateShootKubeconfig ¶
func GetOrCreateShootKubeconfig(ctx context.Context, c client.Client, certificateConfig secrets.CertificateSecretConfig, namespace string) (*corev1.Secret, error)
GetOrCreateShootKubeconfig gets or creates a Kubeconfig for a Shoot cluster which has a running control plane in the given `namespace`. If the CA of an existing Kubeconfig has changed, it creates a new Kubeconfig. Newly generated Kubeconfigs are applied with the given `client` to the given `namespace`.
func NewChartRendererForShoot ¶
func NewChartRendererForShoot(version string) (chartrenderer.Interface, error)
NewChartRendererForShoot creates a new chartrenderer.Interface for the shoot cluster.
func NewClientForShoot ¶
func NewClientForShoot(ctx context.Context, c client.Client, namespace string, opts client.Options) (*rest.Config, client.Client, error)
NewClientForShoot returns the rest config and the client for the given shoot namespace.
func NewRESTConfigFromKubeconfig ¶
NewRESTConfigFromKubeconfig creates a new REST config from a given Kubeconfig and returns it.
func VersionInfo ¶
VersionInfo converts the given version string to version.Info (input must be a semantic version).
func VersionMajorMinor ¶
VersionMajorMinor extracts and returns the major and the minor part of the given version (input must be a semantic version).
Types ¶
type ShootClients ¶
type ShootClients interface { Client() client.Client Clientset() kubernetes.Interface GardenerClientset() gardenerkubernetes.Interface ChartApplier() gardenerkubernetes.ChartApplier Version() *version.Info }
ShootClients bundles together several clients for the shoot cluster.
func NewClientsForShoot ¶
func NewClientsForShoot(ctx context.Context, c client.Client, namespace string, opts client.Options) (ShootClients, error)
NewClientsForShoot is a utility function that creates a new clientset and a chart applier for the shoot cluster. It uses the 'gardener' secret in the given shoot namespace. It also returns the Kubernetes version of the cluster.
func NewShootClients ¶
func NewShootClients(c client.Client, clientset kubernetes.Interface, gardenerClientset gardenerkubernetes.Interface, chartApplier gardenerkubernetes.ChartApplier, version *version.Info) ShootClients
NewShootClients creates a new shoot client interface based on the given clients.