-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpk cloud namespace: create, list, delete #16685
Conversation
This includes a script to generate them in the future.
This includes a new Dev Override: RPK_PUBLIC_API_URL to override the public api URL used by rpk.
This first commit introduces: - Create - List - Delete
42ba286
to
e777839
Compare
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45270#018dd3e2-005a-4589-8807-1ea95459d73e ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/45270#018dd3e2-0060-4bea-97fa-7c6786d51bf9 |
res = append(res, listResponse{n.Name, n.Id}) | ||
} | ||
} | ||
sort.Slice(res, func(i, j int) bool { return strings.ToLower(res[i].Name) < strings.ToLower(res[j].Name) }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ToLower here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without it, Go will sort the uppercase letter first.
data := []string{"A", "b", "D", "c"}
sort.Slice(data, func(i, j int) bool { return data[i] < data[j] })
Will return:
[A,D,b,c]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but isn't that valid? I guess it's a matter of preference.
Also, are namespaces mixed case? I thought they were uuids formatted entirely lowercase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is valid. But here I'm sorting the names; they can use upper case and special characters. During the development, I had a case where it was sorted like:
NAME ID
Nicola's Playground [redacted]
alena's [redacted]
andrew-integration [redacted]
...
So I just did a case insensitive sort here because it looked weird to me.
b6ef79f
to
e777839
Compare
/backport v23.3.x |
This PR introduces the new
rpk cloud namespace
command.It also introduces the first use of the publicapi proto files in
rpk
and the grpc client.Authentication:
Every command under
rpk cloud namespace
triggers an authentication flow (either SSO or client credentials) if the user executing the command is not authenticated.The flags
-X cloud.client_id
and-X cloud.client_secret
are available if you want a client credential flow and avoid browser authentication.Examples:
rpk cloud namespace list
Every command has the
--format json/yaml
available.Backports Required
Release Notes
Features