Skip to content

Commit 46bf2e6

Browse files
committed
chore: update personal organization name
1 parent 912eb90 commit 46bf2e6

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

internal/controller/resourcemanager/personal_organization_controller.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,12 @@ func (r *PersonalOrganizationController) Reconcile(ctx context.Context, req ctrl
5353
ObjectMeta: metav1.ObjectMeta{
5454
// Create a unique name for the personal organization.
5555
Name: fmt.Sprintf("personal-org-%s", hashPersonalOrgName(string(user.UID))),
56-
Annotations: map[string]string{
57-
"kubernetes.io/display-name": fmt.Sprintf("Personal Organization - %s %s", user.Spec.GivenName, user.Spec.FamilyName),
58-
},
5956
},
6057
}
6158

6259
_, err := controllerutil.CreateOrUpdate(ctx, r.Client, personalOrg, func() error {
6360
logger.Info("Creating or updating personal organization", "organization", personalOrg.Name)
64-
personalOrg.Annotations["kubernetes.io/display-name"] = fmt.Sprintf("%s %s's Personal Org", user.Spec.GivenName, user.Spec.FamilyName)
61+
metav1.SetMetaDataAnnotation(&personalOrg.ObjectMeta, "kubernetes.io/display-name", fmt.Sprintf("%s %s's Personal Org", user.Spec.GivenName, user.Spec.FamilyName))
6562
personalOrg.ObjectMeta.OwnerReferences = []metav1.OwnerReference{
6663
// The owner reference is used to ensure that the personal organization
6764
// is deleted when the user is deleted.

0 commit comments

Comments
 (0)