shared

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessRequestServiceAccountNamespace added in v0.1.1

func AccessRequestServiceAccountNamespace() string

func Environment

func Environment() string

func ProfileK8sName

func ProfileK8sName(providerConfigName string) string

func ProviderName

func ProviderName() string

func SetAccessRequestServiceAccountNamespace added in v0.1.1

func SetAccessRequestServiceAccountNamespace(ns string)

func SetEnvironment

func SetEnvironment(env string)

func SetProviderName

func SetProviderName(name string)

func ShootK8sName

func ShootK8sName(clusterName, clusterNamespace string) string

func ShootK8sNameFromCluster

func ShootK8sNameFromCluster(c *clustersv1alpha1.Cluster) string

Types

type K8sVersion

type K8sVersion struct {
	Version    string
	Deprecated bool
}

func (*K8sVersion) DeepCopy

func (v *K8sVersion) DeepCopy() *K8sVersion

func (*K8sVersion) ToResourceRepresentation

func (v *K8sVersion) ToResourceRepresentation() *clustersv1alpha1.SupportedK8sVersion

type Landscape

type Landscape struct {
	Name     string
	Cluster  *clusters.Cluster
	Resource *providerv1alpha1.Landscape
	// contains filtered or unexported fields
}

func (*Landscape) Available

func (l *Landscape) Available() bool

func (*Landscape) DeepCopy

func (l *Landscape) DeepCopy() *Landscape

func (*Landscape) Projects

func (l *Landscape) Projects() []providerv1alpha1.ProjectData

type Profile

type Profile struct {
	RuntimeData
	ProviderConfig *providerv1alpha1.ProviderConfig
}

func (*Profile) DeepCopy

func (p *Profile) DeepCopy() *Profile

type RuntimeConfiguration

type RuntimeConfiguration struct {
	Lock *sync.RWMutex

	// not modified after creation or thread-safe
	ShootWatchManager       *threads.ThreadManager
	ShootWatch              chan event.TypedGenericEvent[*gardenv1beta1.Shoot]             // changes on the watched shoots are sent to the Cluster controller via this channel
	ReconcileLandscape      chan event.TypedGenericEvent[*providerv1alpha1.Landscape]      // sending a Landscape to this channel will trigger a reconciliation of the corresponding resource
	ReconcileProviderConfig chan event.TypedGenericEvent[*providerv1alpha1.ProviderConfig] // sending a ProviderConfig to this channel will trigger a reconciliation of the corresponding resource
	ReconcileCluster        chan event.TypedGenericEvent[*clustersv1alpha1.Cluster]        // sending a Cluster to this channel will trigger a reconciliation of the corresponding resource
	PlatformCluster         *clusters.Cluster
	// contains filtered or unexported fields
}

RuntimeConfiguration is a struct that holds the loaded ProviderConfigurations, enriched with further information gathered during runtime. It is important that the same instance is shared between the different controllers that make up the cluster provider.

func NewRuntimeConfiguration

func NewRuntimeConfiguration(platform *clusters.Cluster, swMgr *threads.ThreadManager) *RuntimeConfiguration

func (*RuntimeConfiguration) GetLandscape

func (rc *RuntimeConfiguration) GetLandscape(name string) *Landscape

func (*RuntimeConfiguration) GetLandscapeForProfile

func (rc *RuntimeConfiguration) GetLandscapeForProfile(profile *Profile) *Landscape

func (*RuntimeConfiguration) GetLandscapes

func (rc *RuntimeConfiguration) GetLandscapes() map[string]*Landscape

func (*RuntimeConfiguration) GetProfile

func (rc *RuntimeConfiguration) GetProfile(k8sName string) *Profile

func (*RuntimeConfiguration) GetProfileAndLandscape

func (rc *RuntimeConfiguration) GetProfileAndLandscape(profileK8sName string) (*Profile, *Landscape)

func (*RuntimeConfiguration) GetProfileForProviderConfiguration

func (rc *RuntimeConfiguration) GetProfileForProviderConfiguration(providerConfigName string) *Profile

func (*RuntimeConfiguration) GetProviderConfigurations

func (rc *RuntimeConfiguration) GetProviderConfigurations() map[string]*providerv1alpha1.ProviderConfig

func (*RuntimeConfiguration) SetLandscape

func (rc *RuntimeConfiguration) SetLandscape(ctx context.Context, ls *Landscape) error

func (*RuntimeConfiguration) SetProfileForProviderConfiguration

func (rc *RuntimeConfiguration) SetProfileForProviderConfiguration(providerConfigName string, profile *Profile)

func (*RuntimeConfiguration) SetProviderConfiguration

func (rc *RuntimeConfiguration) SetProviderConfiguration(name string, providerConfiguration *providerv1alpha1.ProviderConfig)

func (*RuntimeConfiguration) SetProviderConfigurations

func (rc *RuntimeConfiguration) SetProviderConfigurations(providerConfigurations map[string]*providerv1alpha1.ProviderConfig)

func (*RuntimeConfiguration) UnsetLandscape

func (rc *RuntimeConfiguration) UnsetLandscape(ctx context.Context, name string) error

UnsetLandscape removes the shoot informer for the landscape and deletes it from the internal Landscapes list, if that was successful.

func (*RuntimeConfiguration) UnsetProfilesForProviderConfiguration

func (rc *RuntimeConfiguration) UnsetProfilesForProviderConfiguration(providerConfigName string)

func (*RuntimeConfiguration) UnsetProviderConfiguration

func (rc *RuntimeConfiguration) UnsetProviderConfiguration(name string)

func (*RuntimeConfiguration) UpdateLandscapeResource

func (rc *RuntimeConfiguration) UpdateLandscapeResource(obj *providerv1alpha1.Landscape)

UpdateLandscapeResource just updates the Landscape resource in the internal Landscape object.

type RuntimeData

type RuntimeData struct {
	Project              providerv1alpha1.ProjectData
	SupportedK8sVersions []K8sVersion
}

RuntimeData holds information that has been loaded during runtime. It belongs to a specific Gardener configuration. This applies, for example, to every information received by reading a Gardener CloudProfile.

func (*RuntimeData) DeepCopy

func (rd *RuntimeData) DeepCopy() *RuntimeData

Jump to

Keyboard shortcuts

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