Add `policy` resources
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the existing namespace resource commands and their policy getters and setters. Compare those operations with the proposed pulsarctl policies [policy-property] [action] [options] [resource-entity] syntax, including namespace and topic entities. Done means policy operations are organized under the new resource without duplicated namespace and topic handling.
Written by the indexing model from the issue text.
Description
Motivation
Currently we have some many commands under namespace resource. It introduces a few inconveniences.
- We have too many getters and setters. It is really hard to people to find the right command, especially these policy operations are coupled with CRUD operations on namespaces.
- Each time we introduce a name field in the policy. We have to add new getter and setter in the command.
- We are introduce a topic-level policy in Pulsar. It means that we might need to add the operations under
topicresource as well. It results in duplicated code.
Proposal
I am proposing introducing a policy resource for handling operations to policies at both namespace or topic level.
The proposed command syntax is described as followings:
pulsarctl policies [policy-property] [action] [options] [resource-entity]
policy-propertyis thepropertywithin the policy, such asbacklog-quotas,subscribe-rate.actionis the operation can be applied on thepolicy-property, e.g.getandset.optionsare the options for the action.resource-entitycan be a namespace or a topic (if we support topic-level policy)
The examples of the commands using this syntax are listed as follows:
- get backlog quotas from a namespace
pulsarctl policies backlog-quota get tenant/ns
- get backlog quotas from a topic
pulsarctl policies backlog-quota get tenant/ns/topic
- Dominant language
- Go
- Stars
- 169
- Forks
- 68
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from streamnative/pulsarctl
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
streamnative/pulsarctl#2070 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
streamnative/pulsarctl#1703 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
streamnative/pulsarctl#1623 · 1 reaction ·
-
streamnative/pulsarctl#1604 · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
streamnative/pulsarctl#1527 ·
All issues in streamnative/pulsarctl
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100