Documentation
¶
Index ¶
- Constants
- func ComputeShootName(apiServerMeta *metav1.ObjectMeta, project string) string
- func HashAsNumber(data ...string) int
- func InjectShootManifestInGardenerStatus(status *openmcpv1alpha1.GardenerStatus, shoot *gardenv1beta1.Shoot) error
- type AuditLogAnnotations
- type GardenerConnector
- func (gc *GardenerConnector) GetShoot(ctx context.Context, as *openmcpv1alpha1.APIServer, inDeletion bool) (*gardenv1beta1.Shoot, openmcperrors.ReasonableError)
- func (gc *GardenerConnector) GetShootName(sh *gardenv1beta1.Shoot, as *openmcpv1alpha1.APIServer, ...) string
- func (gc *GardenerConnector) GetShootNameNoConfig(sh *gardenv1beta1.Shoot, as *openmcpv1alpha1.APIServer) (string, error)
- func (gc *GardenerConnector) HandleCreateOrUpdate(ctx context.Context, as *openmcpv1alpha1.APIServer, crateClient client.Client) (ctrl.Result, apiserverhandler.UpdateStatusFunc, ...)
- func (gc *GardenerConnector) HandleDelete(ctx context.Context, as *openmcpv1alpha1.APIServer, crateClient client.Client) (ctrl.Result, apiserverhandler.UpdateStatusFunc, ...)
- func (gc *GardenerConnector) Shoot_v1beta1_from_APIServer_v1alpha1(ctx context.Context, as *openmcpv1alpha1.APIServer, sh *gardenv1beta1.Shoot) error
Constants ¶
const (
GardenerDeletionConfirmationAnnotation = "confirmation.gardener.cloud/deletion"
)
Variables ¶
This section is empty.
Functions ¶
func ComputeShootName ¶
func ComputeShootName(apiServerMeta *metav1.ObjectMeta, project string) string
ComputeShootName computes the name of a shoot based on the given APIServer metadata and the project name.
func HashAsNumber ¶
HashAsNumber takes any number of strings and returns a hash value as an integer. Note that this function is not cyptographically secure.
func InjectShootManifestInGardenerStatus ¶
func InjectShootManifestInGardenerStatus(status *openmcpv1alpha1.GardenerStatus, shoot *gardenv1beta1.Shoot) error
InjectShootManifestInGardenerStatus takes a GardenerStatus pointer and a shoot object and injects the shoot manifest into the GardenerStatus. It removes some metadata fields as well as the shoot's status.
Types ¶
type AuditLogAnnotations ¶
type GardenerConnector ¶
type GardenerConnector struct { apiserverconfig.CompletedMultiGardenerConfiguration Common *apiserverconfig.CompletedCommonConfig APIServerType openmcpv1alpha1.APIServerType }
func NewGardenerConnector ¶
func NewGardenerConnector(cc *apiserverconfig.CompletedCommonConfig, cfg *apiserverconfig.CompletedMultiGardenerConfiguration, apiServerType openmcpv1alpha1.APIServerType) (*GardenerConnector, openmcperrors.ReasonableError)
func (*GardenerConnector) GetShoot ¶
func (gc *GardenerConnector) GetShoot(ctx context.Context, as *openmcpv1alpha1.APIServer, inDeletion bool) (*gardenv1beta1.Shoot, openmcperrors.ReasonableError)
GetShoot tries to fetch the corresponding shoot cluster. If there is a shoot reference in the InternalControlPlane's status, but the shoot is not found, an error is returned unless inDeletion is true. If there is no shoot reference, the function searches for a shoot with a fitting back-reference and returns that, if found. Otherwise, nil is returned.
func (*GardenerConnector) GetShootName ¶
func (gc *GardenerConnector) GetShootName(sh *gardenv1beta1.Shoot, as *openmcpv1alpha1.APIServer, gcfg *config.CompletedGardenerConfiguration) string
func (*GardenerConnector) GetShootNameNoConfig ¶
func (gc *GardenerConnector) GetShootNameNoConfig(sh *gardenv1beta1.Shoot, as *openmcpv1alpha1.APIServer) (string, error)
func (*GardenerConnector) HandleCreateOrUpdate ¶
func (gc *GardenerConnector) HandleCreateOrUpdate(ctx context.Context, as *openmcpv1alpha1.APIServer, crateClient client.Client) (ctrl.Result, apiserverhandler.UpdateStatusFunc, []openmcpv1alpha1.ComponentCondition, openmcperrors.ReasonableError)
func (*GardenerConnector) HandleDelete ¶
func (gc *GardenerConnector) HandleDelete(ctx context.Context, as *openmcpv1alpha1.APIServer, crateClient client.Client) (ctrl.Result, apiserverhandler.UpdateStatusFunc, []openmcpv1alpha1.ComponentCondition, openmcperrors.ReasonableError)
func (*GardenerConnector) Shoot_v1beta1_from_APIServer_v1alpha1 ¶
func (gc *GardenerConnector) Shoot_v1beta1_from_APIServer_v1alpha1(ctx context.Context, as *openmcpv1alpha1.APIServer, sh *gardenv1beta1.Shoot) error
Shoot_v1beta1_from_APIServer_v1alpha1 updates a v1beta1.Shoot based on a v1alpha1.APIServer. Since most fields are immutable, the values of an existing shoot will be preserved in the most cases. For the k8s version, there is a special logic in place which prevents downgrades and allows upgrades.