-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update role with new quay_organization_prune module
- Loading branch information
Hervé Quatremain
committed
Nov 23, 2024
1 parent
92cc2c5
commit 2b5050c
Showing
10 changed files
with
111 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,7 @@ The following list gives a short descriptions of the variables: | |
* `quay_validate_certs`: Whether to allow insecure connections to the API. | ||
* `quay_org_name`: Name of the organization to create. | ||
* `quay_org_email`: Email address to associate with the organization. | ||
* `quay_org_auto_prune_method`: Method to use for the auto-pruning tags policy. | ||
* `quay_org_auto_prune_value`: Number or period of time to keep tags. | ||
* `quay_org_prune`: List of auto-pruning tags policies for the organization. | ||
* `quay_org_users`: List of user accounts to create. | ||
* `quay_org_robots`: List of robot accounts to create in the organization. | ||
* `quay_org_teams`: List of the teams to create in the organization. | ||
|
@@ -87,16 +86,20 @@ Example Playbook | |
# Organization name and email | ||
quay_org_name: production | ||
quay_org_email: [email protected] | ||
# Organization auto-prune policy | ||
quay_org_auto_prune_method: tags | ||
quay_org_auto_prune_value: 15 | ||
# Proxy cache | ||
quay_org_cache_registry: quay.io/sclorg | ||
quay_org_cache_expiration: 259200 | ||
# Quota | ||
quay_org_quota: 1.5 TiB | ||
quay_org_warning_pct: 90 | ||
quay_org_reject_pct: 97 | ||
# Organization auto-pruning tags policies | ||
quay_org_prune: | ||
- method: tags | ||
value: 15 | ||
tag_pattern: nightly | ||
- method: date | ||
value: 5w | ||
# User accounts to create | ||
quay_org_users: | ||
- username: lvasquez | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
# quay_org_validate_certs: false | ||
# quay_org_name: production | ||
# quay_org_email: [email protected] | ||
# quay_org_auto_prune_method: date | ||
# quay_org_auto_prune_value: 4w | ||
# quay_org_cache_registry: quay.io/sclorg | ||
# quay_org_cache_insecure: false | ||
# quay_org_cache_username: "" | ||
|
@@ -17,6 +15,12 @@ | |
# quay_org_quota: 1.5 TiB | ||
# quay_org_warning_pct: 90 | ||
# quay_org_reject_pct: 97 | ||
# quay_org_prune: | ||
# - method: tags | ||
# value: 25 | ||
# - method: date | ||
# value: 1w | ||
# tag_pattern: nightly | ||
# quay_org_users: | ||
# - username: lvasquez | ||
# email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
- name: Ensure the auto-pruning policies for the organization exist | ||
infra.quay_configuration.quay_organization_prune: | ||
namespace: "{{ quay_org_name }}" | ||
method: "{{ item['method'] }}" | ||
value: "{{ item['value'] }}" | ||
tag_pattern: "{{ item['tag_pattern'] | default(omit) }}" | ||
tag_pattern_matches: "{{ item['tag_pattern_matches'] | default(omit) }}" | ||
state: present | ||
quay_token: "{{ quay_org_token | default(omit) }}" | ||
quay_username: "{{ quay_org_username | default(omit) }}" | ||
quay_password: "{{ quay_org_password | default(omit) }}" | ||
quay_host: "{{ quay_org_host | default(omit) }}" | ||
validate_certs: "{{ quay_org_validate_certs | default(omit) }}" | ||
loop: "{{ quay_org_prune }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,13 +13,17 @@ | |
quay_org_token: vgfH9zH5q6eV16Con7SvDQYSr0KPYQimMHVehZv7 | ||
quay_org_name: production | ||
quay_org_email: [email protected] | ||
quay_org_auto_prune_method: tags | ||
quay_org_auto_prune_value: 15 | ||
quay_org_cache_registry: public.ecr.aws/nginx | ||
quay_org_cache_expiration: 345600 | ||
quay_org_quota: 500 GiB | ||
quay_org_warning_pct: 80 | ||
quay_org_reject_pct: 90 | ||
quay_org_prune: | ||
- method: tags | ||
value: 25 | ||
- method: date | ||
value: 1w | ||
tag_pattern: nightly | ||
quay_org_users: | ||
- username: lvasquez | ||
email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,14 +8,18 @@ | |
quay_org_validate_certs: false | ||
quay_org_name: testorg | ||
quay_org_email: [email protected] | ||
quay_org_auto_prune_method: tags | ||
quay_org_auto_prune_value: 15 | ||
quay_org_cache_registry: public.ecr.aws/nginx | ||
quay_org_cache_expiration: 345600 | ||
quay_org_cache_insecure: true | ||
quay_org_quota: 1.5 TiB | ||
quay_org_warning_pct: 90 | ||
quay_org_reject_pct: 97 | ||
quay_org_prune: | ||
- method: tags | ||
value: 25 | ||
- method: date | ||
value: 1w | ||
tag_pattern: nightly | ||
quay_org_users: | ||
- username: testuser1 | ||
email: [email protected] | ||
|