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

Harbor config system project quota #367

Merged
merged 4 commits into from
Sep 1, 2023

Conversation

naitmare01
Copy link
Contributor

This PR implement the option to set default storage quotas for the projects.

This fixes #359

Signed-off-by: David Berndtsson <david.berndtsson@gmail.com>
Signed-off-by: David Berndtsson <david.berndtsson@gmail.com>
docs/resources/config_system.md Outdated Show resolved Hide resolved
@@ -78,12 +83,17 @@ func resourceConfigSystemRead(d *schema.ResourceData, m interface{}) error {
if err != nil {
return fmt.Errorf("Error getting system configuration %s", err)
}
storage := jsonData.StoragePerProject.Value

Choose a reason for hiding this comment

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

We should accept the user input for storage quota in GB and then only convert it to bytes while making the API call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I’m aware the api accept bytes. Did the converter to GB since we use it in other places as well which is an argument to DRY this part as well.

Signed-off-by: David Berndtsson <david.berndtsson@gmail.com>
Copy link
Contributor

@flbla flbla left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Florian Blampey <flbla@users.noreply.github.com>
@flbla flbla merged commit dba321d into goharbor:main Sep 1, 2023
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

harbor_config_system to accept global storage quota per project
3 participants