Skip to content

[quota management] Move AppWrapper quota request from label to element of AppWrapper object #377

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

Open
KPostOffice opened this issue May 16, 2023 · 4 comments

Comments

@KPostOffice
Copy link
Contributor

KPostOffice commented May 16, 2023

Currently AppWrappers must define quotas in their metadata.labels. We should think about moving these to be an element of the AppWrapper spec instead.

@metalcycling
Copy link
Collaborator

Any reason why this should be the case? It's an interesting idea, and I don't know why it was designed this way, but I wanna understand why you think it is better in the spec section

@asm582 asm582 changed the title Move AppWrapper quota request from label to element of AppWrapper object [quota management] Move AppWrapper quota request from label to element of AppWrapper object May 16, 2023
@KPostOffice
Copy link
Contributor Author

KPostOffice commented May 17, 2023

Any reason why this should be the case? It's an interesting idea, and I don't know why it was designed this way, but I wanna understand why you think it is better in the spec section

My main issue with the labels as they are now is the fact that they are free-form with just tree-name: node-name, I think it can be unclear without a well named quota tree what the label is doing. Putting them in the spec would make this more clear with something like:

...
spec:
   quotas:
      - tree: foo
        node: bar
...

or

...
spec:
   quotas:
      foo: bar
...

I think this could also be done through labels as well with something like:

metadata:
   labels:
      quota.mcad.ibm.io/tree-name: "node"

@KPostOffice
Copy link
Contributor Author

KPostOffice commented May 17, 2023

An edge case also just popped into my head that labels can't solve. If you want to specify multiple quotas within the same tree you wouldn't be able to with labels (it would require duplicate keys). I'm not sure how valid, or useful this case is though. My second example would also fail in this case.

@z103cb
Copy link
Contributor

z103cb commented May 18, 2023

I think is @KPostOffice idea has a lot of merit, quota tree use should be an optional part of the app wrapper spec. Labels seem a little to loose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants