Skip to content

Commit

Permalink
Test without any tenant annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
robertvolkmann committed Nov 21, 2024
1 parent bfa57a2 commit 99db619
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkg/admission/validator/shoot.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ func (s *shoot) validateShoot(ctx context.Context, shoot *core.Shoot) error {
// Provider validation
fldPath := field.NewPath("spec", "provider")

_, ok := shoot.Annotations[tag.ClusterTenant]
if !ok {
return field.Required(field.NewPath("metadata", "annotations"), fmt.Sprintf("cluster must be annotated with a tenant using the annotations: %s", tag.ClusterTenant))
}

// InfrastructureConfig
infraConfigFldPath := fldPath.Child("infrastructureConfig")

Expand Down Expand Up @@ -152,10 +147,6 @@ func (s *shoot) validateShootUpdate(ctx context.Context, oldShoot, shoot *core.S
}
}

if shoot.Annotations[tag.ClusterTenant] != oldShoot.Annotations[tag.ClusterTenant] {
return field.Forbidden(field.NewPath("metadata", "annotations"), "tenant annotation of a shoot is immutable")
}

return s.validateShoot(ctx, shoot)
}

Expand Down

0 comments on commit 99db619

Please sign in to comment.