garden

package
v0.0.0-...-a6f5042 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ShootProjectConfigMapSuffixCACluster is a constant for a shoot project config map with suffix 'ca-cluster'.
	ShootProjectConfigMapSuffixCACluster = "ca-cluster"
	// ShootProjectSecretSuffixCACluster is a constant for a shoot project secret with suffix 'ca-cluster'.
	// Deprecated: This constant is deprecated in favor of ShootProjectConfigMapSuffixCACluster.
	ShootProjectSecretSuffixCACluster = "ca-cluster"
	// DataKeyCertificateCA is the key in a secret or config map data holding the CA certificate.
	DataKeyCertificateCA = "ca.crt"

	// AdvertisedAddressExternal is a constant that represents the name of the external kube-apiserver address.
	AdvertisedAddressExternal = "external"
	// AdvertisedAddressInternal is a constant that represents the name of the internal kube-apiserver address.
	AdvertisedAddressInternal = "internal"
	// AdvertisedAddressUnmanaged is a constant that represents the name of the unmanaged kube-apiserver address.
	AdvertisedAddressUnmanaged = "unmanaged"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// GetProject returns a Gardener project resource by name
	GetProject(ctx context.Context, name string) (*gardencorev1beta1.Project, error)
	// GetProjectByNamespace returns a Gardener project resource by namespace
	GetProjectByNamespace(ctx context.Context, namespace string) (*gardencorev1beta1.Project, error)
	// ListProjects returns all Gardener project resources
	ListProjects(ctx context.Context, opts ...client.ListOption) (*gardencorev1beta1.ProjectList, error)

	// GetSeed returns a Gardener seed resource by name
	GetSeed(ctx context.Context, name string) (*gardencorev1beta1.Seed, error)
	// ListSeeds returns all Gardener seed resources
	ListSeeds(ctx context.Context, opts ...client.ListOption) (*gardencorev1beta1.SeedList, error)
	// GetSeedClientConfig returns the client config for a seed
	GetSeedClientConfig(ctx context.Context, name string) (clientcmd.ClientConfig, error)

	// GetShoot returns a Gardener shoot resource in a namespace by name
	GetShoot(ctx context.Context, namespace, name string) (*gardencorev1beta1.Shoot, error)
	// FindShoot tries to get exactly one shoot with the given list options.
	// If no shoot or more than one shoot is found it returns an error.
	FindShoot(ctx context.Context, opts ...client.ListOption) (*gardencorev1beta1.Shoot, error)
	// ListShoots returns all Gardener shoot resources, filtered by a list option
	ListShoots(ctx context.Context, opts ...client.ListOption) (*gardencorev1beta1.ShootList, error)
	// GetShootClientConfig returns the client config for a shoot
	GetShootClientConfig(ctx context.Context, namespace, name string) (clientcmd.ClientConfig, error)

	// GetSecretBinding returns a Gardener secretbinding resource
	GetSecretBinding(ctx context.Context, namespace, name string) (*gardencorev1beta1.SecretBinding, error)

	// GetCloudProfile returns a Gardener cloudprofile resource
	GetCloudProfile(ctx context.Context, name string) (*gardencorev1beta1.CloudProfile, error)

	// GetNamespace returns a Kubernetes namespace resource
	GetNamespace(ctx context.Context, name string) (*corev1.Namespace, error)
	// GetSecret returns a Kubernetes secret resource
	GetSecret(ctx context.Context, namespace, name string) (*corev1.Secret, error)
	// GetConfigMap returns a Kubernetes configmap resource
	GetConfigMap(ctx context.Context, namespace, name string) (*corev1.ConfigMap, error)
	// GetShootOfManagedSeed returns shoot of seed using ManagedSeed resource. An error is returned if it is not a managed seed or the referenced shoot is nil
	GetShootOfManagedSeed(ctx context.Context, name string) (*seedmanagementv1alpha1.Shoot, error)

	// ListBastions returns all Gardener bastion resources, filtered by a list option
	ListBastions(ctx context.Context, opts ...client.ListOption) (*operationsv1alpha1.BastionList, error)
	// PatchBastion patches an existing bastion to match newBastion using the merge patch strategy
	PatchBastion(ctx context.Context, newBastion, oldBastion *operationsv1alpha1.Bastion) error

	CurrentUser(ctx context.Context) (string, error)

	// RuntimeClient returns the underlying kubernetes runtime client
	// TODO: Remove this when we switched all APIs to the new gardenclient
	RuntimeClient() client.Client
}

Client returns a new client with functions to get Gardener and Kubernetes resources.

func NewClient

func NewClient(config clientcmd.ClientConfig, client client.Client, name string) Client

NewClient returns a new garden Client.

type CloudProfile

type CloudProfile gardencorev1beta1.CloudProfile

func (CloudProfile) GetOpenstackProviderConfig

func (cp CloudProfile) GetOpenstackProviderConfig() (*openstackv1alpha1.CloudProfileConfig, error)

type ProjectFilter

type ProjectFilter fields.Set

ProjectFilter restricts the list operation to the given where condition.

func (ProjectFilter) ApplyToList

func (w ProjectFilter) ApplyToList(opts *client.ListOptions)

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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