Documentation ¶
Index ¶
- Constants
- func BuildOIDCKubeconfig(ctx context.Context, issuerURL, clientID string, target *v1alpha1.Target, ...) (string, error)
- func GetShootClusterNameFromKubeconfig(_ context.Context, kubeconfigBytes []byte) (string, error)
- func HasTargetSyncLabel(obj metav1.Object) bool
- type DefaultSourceClientProvider
- type ShootClient
- func (c *ShootClient) ExistsShoot(ctx context.Context, shootNamespace, shootName string) (bool, error)
- func (c *ShootClient) GetShoot(ctx context.Context, shootNamespace, shootName string) (*unstructured.Unstructured, error)
- func (c *ShootClient) GetShootAdminKubeconfig(ctx context.Context, shootName, shootNamespace string, ...) (string, metav1.Time, error)
- func (c *ShootClient) ListShoots(ctx context.Context, shootNamespace string) (*unstructured.UnstructuredList, error)
- type SourceClientProvider
- type TokenClient
- func (c *TokenClient) GetServiceAccountKubeconfig(ctx context.Context, serviceAccountName, serviceAccountNamespace string, ...) (string, metav1.Time, error)
- func (c *TokenClient) GetServiceAccountToken(ctx context.Context, serviceAccountName, serviceAccountNamespace string, ...) (string, metav1.Time, error)
- type TrivialSourceClientProvider
- func (p *TrivialSourceClientProvider) GetSourceClient(_ context.Context, _ *lsv1alpha1.TargetSync, _ client.Client, ...) (client.Client, *rest.Config, error)
- func (p *TrivialSourceClientProvider) GetSourceShootClient(_ context.Context, _ *lsv1alpha1.TargetSync, _ client.Client) (*ShootClient, error)
Constants ¶
View Source
const ( LabelKeyTargetSync = lsv1alpha1.LandscaperDomain + "/targetsync" LabelValueTargetSyncOk = "ok" )
Variables ¶
This section is empty.
Functions ¶
func BuildOIDCKubeconfig ¶
func BuildOIDCKubeconfig(ctx context.Context, issuerURL, clientID string, target *v1alpha1.Target, targetResolver targetresolver.TargetResolver) (string, error)
func GetShootClusterNameFromKubeconfig ¶
GetShootClusterNameFromKubeconfig determines the name of a Gardener shoot cluster from a given kubeconfig.
func HasTargetSyncLabel ¶
HasTargetSyncLabel returns whether an object has the targetsync label. The targets and secrets that are managed by the targetsync are marked with this label. Moreover, the setting "skipUninstallIfClusterRemoved" of deployitems is only supported for deployitems whose target is managed by the targetsync.
Types ¶
type DefaultSourceClientProvider ¶
type DefaultSourceClientProvider struct{}
func (*DefaultSourceClientProvider) GetSourceClient ¶
func (p *DefaultSourceClientProvider) GetSourceClient( ctx context.Context, targetSync *lsv1alpha1.TargetSync, targetClient client.Client, schema *runtime.Scheme) (client.Client, *rest.Config, error)
func (*DefaultSourceClientProvider) GetSourceShootClient ¶
func (p *DefaultSourceClientProvider) GetSourceShootClient( ctx context.Context, targetSync *lsv1alpha1.TargetSync, targetClient client.Client) (*ShootClient, error)
type ShootClient ¶
type ShootClient struct {
// contains filtered or unexported fields
}
func NewShootClient ¶
func NewShootClient(gardenKubeconfigBytes []byte) (*ShootClient, error)
func NewShootClientFromTarget ¶
func NewShootClientFromTarget(ctx context.Context, gardenTarget *v1alpha1.Target, targetResolver targetresolver.TargetResolver) (*ShootClient, error)
func (*ShootClient) ExistsShoot ¶
func (*ShootClient) GetShoot ¶
func (c *ShootClient) GetShoot(ctx context.Context, shootNamespace, shootName string) (*unstructured.Unstructured, error)
func (*ShootClient) GetShootAdminKubeconfig ¶
func (c *ShootClient) GetShootAdminKubeconfig(ctx context.Context, shootName, shootNamespace string, kubeconfigExpirationSeconds int64) (string, metav1.Time, error)
GetShootAdminKubeconfig returns a short-lived admin kubeconfig for the specified shoot as base64 encoded string.
func (*ShootClient) ListShoots ¶
func (c *ShootClient) ListShoots(ctx context.Context, shootNamespace string) (*unstructured.UnstructuredList, error)
ListShoots returns the list of shoot in the specified namespace
type SourceClientProvider ¶
type SourceClientProvider interface { GetSourceClient( ctx context.Context, targetSync *lsv1alpha1.TargetSync, targetClient client.Client, schema *runtime.Scheme) (client.Client, *rest.Config, error) GetSourceShootClient( ctx context.Context, targetSync *lsv1alpha1.TargetSync, targetClient client.Client) (*ShootClient, error) }
func NewDefaultSourceClientProvider ¶
func NewDefaultSourceClientProvider() SourceClientProvider
func NewTrivialSourceClientProvider ¶
func NewTrivialSourceClientProvider(sourceClient client.Client, shootClient *ShootClient) SourceClientProvider
type TokenClient ¶
type TokenClient struct {
// contains filtered or unexported fields
}
func NewTokenClient ¶
func NewTokenClient(kubeconfigBytes []byte) (*TokenClient, error)
func NewTokenClientFromTarget ¶
func NewTokenClientFromTarget(ctx context.Context, target *v1alpha1.Target, targetResolver targetresolver.TargetResolver) (*TokenClient, error)
func (*TokenClient) GetServiceAccountKubeconfig ¶
type TrivialSourceClientProvider ¶
type TrivialSourceClientProvider struct {
// contains filtered or unexported fields
}
func (*TrivialSourceClientProvider) GetSourceClient ¶
func (p *TrivialSourceClientProvider) GetSourceClient( _ context.Context, _ *lsv1alpha1.TargetSync, _ client.Client, _ *runtime.Scheme) (client.Client, *rest.Config, error)
func (*TrivialSourceClientProvider) GetSourceShootClient ¶
func (p *TrivialSourceClientProvider) GetSourceShootClient( _ context.Context, _ *lsv1alpha1.TargetSync, _ client.Client) (*ShootClient, error)
Click to show internal directories.
Click to hide internal directories.