Skip to content

Commit

Permalink
Fix Group Creation Description (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
spjmurray authored Oct 7, 2024
1 parent 8cdeb91 commit 771e327
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ Then create groups to link services to roles:
kubectl unikorn create group \
--namespace unikorn-identity \
--organization system \
--name region-managers \
--description "Services that can operate on compute regions" \
--name region-services \
--description "Services that require access to regions for infrastructure provisioning." \
--role infra-manager-service \
--user unikorn-kubernetes \
--user unikorn-baremetal
--user unikorn-compute
```

> [!NOTE]
Expand Down
10 changes: 10 additions & 0 deletions pkg/cmd/create/create_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ func (o *createGroupOptions) execute(ctx context.Context, cli client.Client) err
},
}

annotations := map[string]string{}

if o.description != "" {
annotations[constants.DescriptionAnnotation] = o.description
}

if len(annotations) > 0 {
group.Annotations = annotations
}

if err := cli.Create(ctx, group); err != nil {
return err
}
Expand Down

0 comments on commit 771e327

Please sign in to comment.