-
Notifications
You must be signed in to change notification settings - Fork 929
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
doc: document the project config options #12251
doc: document the project config options #12251
Conversation
c9fecd5
to
a6a828e
Compare
@gabrielmougard can you rebase this so tests re-run now youve got the extension merged. |
a6a828e
to
8854775
Compare
@gabrielmougard I just reviewed and pushed a commit with doc updates to your branch. Please check and squash as required. |
@gabrielmougard tests are failing |
8ec2306
to
7eebf62
Compare
@ru-fu I integrated your commit |
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.
Some small changes to the config option links, and some that I only noticed after seeing the changes in context. :)
doc/authentication.md
Outdated
@@ -73,7 +73,7 @@ It's possible to restrict a TLS client to one or multiple projects. | |||
In this case, the client will also be prevented from performing global configuration changes or altering the configuration (limits, restrictions) of the projects it's allowed access to. | |||
|
|||
To restrict access, use [`lxc config trust edit <fingerprint>`](lxc_config_trust_edit.md). | |||
Set the `restricted` key to `true` and specify a list of projects to restrict the client to. | |||
Set the {config:option}`project-restricted:restricted` key to `true` and specify a list of projects to restrict the client to. |
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 doesn't refer to the restricted
option for project, but it's a field in the trust certificate. So no link here.
doc/howto/projects_confine.md
Outdated
@@ -40,7 +40,7 @@ To confine access for an existing certificate (either because the access restric | |||
|
|||
lxc config trust edit <fingerprint> | |||
|
|||
Make sure that `restricted` is set to `true` and specify the projects that the certificate should give access to under `projects`. | |||
Make sure that {config:option}`project-restricted:restricted` is set to `true` and specify the projects that the certificate should give access to under `projects`. |
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.
Again, that's the field in the certificate, not the project config option.
doc/reference/projects.md
Outdated
In the latter case, the limit usually applies to the {ref}`instance-options-limits` that are configured for each instance (either directly or via a profile), and not to the resources that are actually in use. | ||
|
||
For example, if you set the project's `limits.memory` configuration to `50GiB`, the sum of the individual values of all `limits.memory` configuration keys defined on the project's instances will be kept under 50 GiB. | ||
If you try to create an instance that would make the total sum of `limits.memory` configurations exceed 50 GiB, you will get an error. | ||
For example, if you set the project's {config:option}`project-limits:limits.memory` configuration to `50GiB`, the sum of the individual values of all {config:option}`project-limits:limits.memory` configuration keys defined on the project's instances will be kept under 50 GiB. |
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.
For example, if you set the project's {config:option}`project-limits:limits.memory` configuration to `50GiB`, the sum of the individual values of all {config:option}`project-limits:limits.memory` configuration keys defined on the project's instances will be kept under 50 GiB. | |
For example, if you set the project's {config:option}`project-limits:limits.memory` configuration to `50GiB`, the sum of the individual values of all {config:option}`instance-resource-limits:limits.memory` configuration keys defined on the project's instances will be kept under 50 GiB. |
doc/reference/projects.md
Outdated
|
||
Similarly, setting the project's `limits.cpu` configuration key to `100` means that the sum of individual `limits.cpu` values will be kept below 100. | ||
Similarly, setting the project's {config:option}`project-limits:limits.cpu` configuration key to `100` means that the sum of individual {config:option}`project-limits:limits.cpu` values will be kept below 100. |
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.
Similarly, setting the project's {config:option}`project-limits:limits.cpu` configuration key to `100` means that the sum of individual {config:option}`project-limits:limits.cpu` values will be kept below 100. | |
Similarly, setting the project's {config:option}`project-limits:limits.cpu` configuration key to `100` means that the sum of individual {config:option}`instance-resource-limits:limits.cpu` values will be kept below 100. |
doc/reference/projects.md
Outdated
`limits.processes` | integer | - | Maximum value for the sum of individual `limits.processes` configurations set on the instances of the project | ||
`limits.virtual-machines` | integer | - | Maximum number of VMs that can be created in the project | ||
- The {config:option}`project-limits:limits.cpu` configuration cannot be used if {ref}`instance-options-limits-cpu` is enabled. | ||
This means that to use {config:option}`project-limits:limits.cpu` on a project, the {config:option}`project-limits:limits.cpu` configuration of each instance in the project must be set to a number of CPUs, not a set or a range of CPUs. |
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 means that to use {config:option}`project-limits:limits.cpu` on a project, the {config:option}`project-limits:limits.cpu` configuration of each instance in the project must be set to a number of CPUs, not a set or a range of CPUs. | |
This means that to use {config:option}`project-limits:limits.cpu` on a project, the {config:option}`instance-resource-limits:limits.cpu` configuration of each instance in the project must be set to a number of CPUs, not a set or a range of CPUs. |
lxd/api_project.go
Outdated
// Only CPUs that are specified here can be used in the individual {config:option}`instance-resource-limits:limits.cpu` configurations set on the instances of the project. | ||
// --- | ||
// type: integer | ||
// shortdesc: Which CPUs to use in the project |
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.
// shortdesc: Which CPUs to use in the project | |
// shortdesc: Maximum number of CPUs to use in the project |
lxd/api_project.go
Outdated
// shortdesc: Maximum number of processes within the project | ||
"limits.processes": validate.Optional(validate.IsUint32), | ||
// lxdmeta:generate(entity=project, group=limits, key=limits.cpu) | ||
// Only CPUs that are specified here can be used in the individual {config:option}`instance-resource-limits:limits.cpu` configurations set on the instances of the project. |
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.
// Only CPUs that are specified here can be used in the individual {config:option}`instance-resource-limits:limits.cpu` configurations set on the instances of the project. | |
// This value is the maximum value for the sum of the individual {config:option}`instance-resource-limits:limits.cpu` configurations set on the instances of the project. |
lxd/api_project.go
Outdated
// shortdesc: Usage limit for the host's memory for the project | ||
"limits.memory": validate.Optional(validate.IsSize), | ||
// lxdmeta:generate(entity=project, group=limits, key=limits.processes) | ||
// This value is the maximum value for the sum of individual {config:option}`instance-resource-limits:limits.processes` configurations set on the instances of the project. |
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 value is the maximum value for the sum of individual {config:option}`instance-resource-limits:limits.processes` configurations set on the instances of the project. | |
// This value is the maximum value for the sum of the individual {config:option}`instance-resource-limits:limits.processes` configurations set on the instances of the project. |
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
7eebf62
to
73c5e60
Compare
@ru-fu updated |
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!
@gabrielmougard when you're ready for this to be reviewed and merge please mark as ready to review |
This requires this to be merged first
JIRA task : here