-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[minor] Add Group Sync Operator GitOps Support (#1364)
- Loading branch information
Showing
3 changed files
with
62 additions
and
2 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
23 changes: 23 additions & 0 deletions
23
image/cli/mascli/templates/gitops/appset-configs/cluster/group-sync-operator.yaml.j2
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,23 @@ | ||
merge-key: "{{ ACCOUNT_ID }}/{{ CLUSTER_ID }}" | ||
|
||
{#- Parses the ISV groups from a string representation of a list of maps #} | ||
{#- Example: isv_groups: "name:'a1',id:'a2'; name:'a3',id:'a4'" #} | ||
{%- set group_namespace = namespace(isv_groups = []) %} | ||
{%- set group_strs = GROUP_SYNC_OPERATOR_ISV_GROUPS.split(';') %} | ||
{%- for group_str in group_strs %} | ||
{%- set group_loop = loop %} | ||
{%- set _ = group_namespace.isv_groups.append(dict()) %} | ||
{%- set pairs = group_str.split(',') %} | ||
{%- for pair in pairs %} | ||
{%- set items = pair.split(':') %} | ||
{%- set _ = group_namespace.isv_groups[group_loop.index - 1].__setitem__(items[0].strip().strip("'"), items[1].strip().strip("'")) %} | ||
{%- endfor %} | ||
{%- endfor %} | ||
|
||
group_sync_operator: | ||
cron_schedule: "{{ GROUP_SYNC_OPERATOR_CRON_SCHEDULE }}" | ||
isv_tenant_url: "{{ GROUP_SYNC_OPERATOR_ISV_TENANT_URL }}" | ||
isv_client_id: "<path:{{ SECRETS_PATH }}:{{ SECRET_KEY_ISV_CLIENT_ID }}>" | ||
isv_client_secret: "<path:{{ SECRETS_PATH }}:{{ SECRET_KEY_ISV_CLIENT_SECRET }}>" | ||
isv_groups: | ||
{{ group_namespace.isv_groups }} |