// DeploySeedNamespace creates a namespace in the Seed cluster which is used to deploy all the control plane
// components for the Shoot cluster. Moreover, the cloud provider configuration and all the secrets will be
// stored as ConfigMaps/Secrets.
DeploySeedNamespace creates a namespace in the Seed cluster which is used to deploy all the control plane
components for the Shoot cluster. Moreover, the cloud provider configuration and all the secrets will be
stored as ConfigMaps/Secrets.
// DeploySeedNamespace creates a namespace in the Seed cluster which is used to deploy all the control plane // components for the Shoot cluster . Moreover the cloud provider configuration and all the secrets will be // stored as ConfigMaps / Secrets .
func (b *Botanist) DeploySeedNamespace(ctx context.Context) error {
	namespace := &corev1.Namespace{
		ObjectMeta: metav1.ObjectMeta{
			Name: b.Shoot.SeedNamespace,
		},
	}
	if _, err := controllerutil.CreateOrUpdate(ctx, b.K8sSeedClient.Client(), namespace, func() error {
		namespace.Annotations = map[string]string{
			v1beta1constants.DeprecatedShootUID: string(b.Shoot.Info.Status.UID),
		}
		namespace.Labels = map[string]string{
			v1beta1constants.GardenRole:              v1beta1constants.GardenRoleShoot,
			v1beta1constants.LabelSeedProvider:       b.Seed.Info.Spec.Provider.Type,
			v1beta1constants.LabelShootProvider:      b.Shoot.Info.Spec.Provider.Type,
			v1beta1constants.LabelNetworkingProvider: b.Shoot.Info.Spec.Networking.Type,
			v1beta1constants.LabelBackupProvider:     b.Seed.Info.Spec.Provider.Type,
		}
		if b.Seed.Info.Spec.Backup != nil {
			namespace.Labels[v1beta1constants.LabelBackupProvider] = b.Seed.Info.Spec.Backup.Provider
		}
		return nil
	}); err != nil {
		return err
	}
	b.SeedNamespaceObject = namespace
	return nil
}
func ( b * Botanist ) DeploySeedNamespace ( ctx context . Context ) error { namespace := & corev1 . Namespace { ObjectMeta : metav1 . ObjectMeta { Name : b . Shoot . SeedNamespace , } , } if _ , err := controllerutil . CreateOrUpdate ( ctx , b . K8sSeedClient . Client ( ) , namespace , func ( ) error { namespace . Annotations = map [ string ] string { v1beta1constants . DeprecatedShootUID : string ( b . Shoot . Info . Status . UID ) , } namespace . Labels = map [ string ] string { v1beta1constants . GardenRole : v1beta1constants . GardenRoleShoot , v1beta1constants . LabelSeedProvider : b . Seed . Info . Spec . Provider . Type , v1beta1constants . LabelShootProvider : b . Shoot . Info . Spec . Provider . Type , v1beta1constants . LabelNetworkingProvider : b . Shoot . Info . Spec . Networking . Type , v1beta1constants . LabelBackupProvider : b . Seed . Info . Spec . Provider . Type , } if b . Seed . Info . Spec . Backup != nil { namespace . Labels [ v1beta1constants . LabelBackupProvider ] = b . Seed . Info . Spec . Backup . Provider } return nil } ) ; err != nil { return err } b . SeedNamespaceObject = namespace return nil }
DeploySeedNamespace creates a namespace in the Seed cluster which is used to deploy all the control plane
components for the Shoot cluster.
DeploySeedNamespace creates a namespace in the Seed cluster which is used to deploy all the control plane components for the Shoot cluster .