-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
OLS-1622: Document token quota feature #91500
base: lightspeed-docs-main
Are you sure you want to change the base?
Conversation
@rh-tokeefe: This pull request references OLS-1622 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
@rh-tokeefe: This pull request references OLS-1622 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
🤖 Fri Apr 04 16:32:01 - Prow CI generated the docs preview: |
@rh-tokeefe: This pull request references OLS-1622 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
---- | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
quota_handlers: |
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.
ConfigMaps uses a data
property to hold these contents.
Each entry has a key and a value, it can be either like a property or a file.
Below we define the config as a file. The OLS pod can mount this configmap as a volume and access the file within. The CR OLSConfig can refer to this configmap as quota settings.
apiVersion: v1
kind: ConfigMap
metadata:
name: quota-limit
namespace: openshift-lightspeed
data:
quota_handlers.conf: |
storage:
host: <IP_address> <1>
port: "5432"
dbname: <database_name>
user: <user_name>
password_path: <file_containing_database_password>
ssl_mode: disable
limiters:
- name: user_monthly_limits
type: user_limiter
initial_quota: 100000 <2>
quota_increase: 10
period: 30 days
- name: cluster_monthly_limits
type: cluster_limiter
quota_increase: 1000000 <3>
period: 30 days
scheduler:
period: 300 <4>
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.
this ^ makes sense, thank you @raptorsun
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.
@raptorsun and @tisnik I've pushed a change to the PR. Please let me know that you think. Thanks!
@rh-tokeefe: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
[id="ols-activating-token-quota-limits_{context}"] | ||
= Activating token quota limits | ||
|
||
Activate token quota limits for the {ols-long} Service by defining key-value pairs in the `ConfigMap` resource. The {ols-long} pod mounts the `ConfigMap` resource as a volume, enabling access to the file stored within it. The `OLSConfig` Custom Resource (CR) references the `ConfigMap` resource to obtain the quota limit information. |
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.
shouldn't we say:
Service by defining key-value pairs in the quota-limit
instance of the ConfigMap
resource.
?
Or can we not assured it will be named this way?
We're editing the configmap instance, instead of creating it which leads me to believe the configmap is automatically created. If so, we should know what the name is no?
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.
Thank you @JoaoFula. I'll confirm with @tisnik if I should use quota-limit
. I'm not sure if it will always be referred to that way, but in this example it could be.
You also bring up a good point about hte ConfigMap. When I wrote this, I was assuming that a ConfigMap already existed. I don't think a ConfigMap is automatically generated, but I'll also have to check with Pavel on that, too.
@tisnik does it make sense to add a step to create the ConfigMap? I believe this is the syntax to do so: oc create configmap <configmap-name> --from-file=<path-to-file>
Affects:
lightspeed-main
This PR is part of the standalone doc set for the Lightspeed project. Kathryn is aware that this content applies for a product that is part of a Developer Preview release. The project is seeking feedback from early adopters.
PR must be CP'd back to the lightspeed-docs-1.0 branch.
Version(s): 1.0
Issue: https://issues.redhat.com/browse/OLS-1622
Link to docs preview:
https://91500--ocpdocs-pr.netlify.app/openshift-lightspeed/latest/configure/ols-configuring-openshift-lightspeed.html#ols-tokens-and-token-quota-limits_ols-configuring-openshift-lightspeed
QE review:
Additional information: