Skip to content
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

Create container_quota_scopes table #111

Merged
merged 1 commit into from
Oct 27, 2017
Merged

Conversation

cben
Copy link
Contributor

@cben cben commented Oct 26, 2017

https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-scopes
We don't yet store them, but should.
ContainerQuota has_many scopes, each a string (currently enum with 4 possible values Terminating, NotTerminating, BestEffort, NotBestEffort).

Didn't see any reason to choose clever serialized/json representation so went with standard has_many to new table.

See #110 for motivation having created_at/deleted_on.

https://bugzilla.redhat.com/show_bug.cgi?id=1504560

@cben
Copy link
Contributor Author

cben commented Oct 26, 2017

@zeari @gtanzillo @Fryguy please review, want to get at least schema before freeze.

Copy link

@moolitayer moolitayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@miq-bot
Copy link
Member

miq-bot commented Oct 26, 2017

This pull request is not mergeable. Please rebase and repush.

https://kubernetes.io/docs/concepts/policy/resource-quotas/#quota-scopes
We don't yet store them, but should.
ContainerQuota has_many (0 or more) container_quota_scopes.
Each scope is a string (currently enum with 4 possible values).

https://bugzilla.redhat.com/show_bug.cgi?id=1504560
@miq-bot
Copy link
Member

miq-bot commented Oct 26, 2017

Checked commit cben@c8f0a5b with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@cben
Copy link
Contributor Author

cben commented Oct 26, 2017

rebased, switched to standard timestamps

@cben
Copy link
Contributor Author

cben commented Dec 31, 2017

Note to self: I forgot to index container_quota_scopes on deleted_on field. (container_quotas and container_quota_items do have this index)

This could slow down refresh (and display) if there will be tons of archived rows.
Luckily, turns out scopes are immutable for parent container_quota's lifetime, so I'm not planning to use archiving in this table at all :happy:

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

Successfully merging this pull request may close these issues.

5 participants