You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Multi-user AgnosticD deployment uses an applicationset to deploy showroom for each user. To propagate the user-specific data into the each application of the set, the list generator is used to build a yaml representation of the user data:
This doesn't work as the user data are not parsed and segmented per user, so when deploying showroom, the user data configmap contains the userdata for all the users.
Apparently the issue is that in the applicationset template, it is not possible to correctly indent the userData yaml when setting the Helm chart variable.
Possible fix
A possible (very hacky) solution for this issue consists of of playing with the indent in the applicationset template:
In the list generator:
generators:
- list:
elements:
{% for n in range(1, _user_count | int + 1 ) %}
- user: user{{ n }}
userData: |
{{ _showroom_user_data['users']['user'~n] | to_nice_yaml | indent(14)}}
{% endfor %}
(indent 14 instead of 10)
When setting the Helm value:
user_data: |
{% raw %}{{.userData}}{% endraw %}
Another fix would be to not use an applicationset, but loop through the users and user data, and deploy an Argo application per user.
The text was updated successfully, but these errors were encountered:
Describe the bug
Multi-user AgnosticD deployment uses an applicationset to deploy showroom for each user. To propagate the user-specific data into the each application of the set, the list generator is used to build a yaml representation of the user data:
agnosticd/ansible/roles_ocp_workloads/ocp4_workload_showroom/templates/applicationset.yaml.j2
Lines 9 to 16 in 25a25e5
However, when setting the userdata variable for the Helm chart, the
userData
variable is not used, but rather_showroom_user_data
agnosticd/ansible/roles_ocp_workloads/ocp4_workload_showroom/templates/applicationset.yaml.j2
Lines 76 to 77 in 25a25e5
This doesn't work as the user data are not parsed and segmented per user, so when deploying showroom, the user data configmap contains the userdata for all the users.
Apparently the issue is that in the applicationset template, it is not possible to correctly indent the
userData
yaml when setting the Helm chart variable.Possible fix
A possible (very hacky) solution for this issue consists of of playing with the indent in the applicationset template:
In the list generator:
(indent 14 instead of 10)
When setting the Helm value:
Another fix would be to not use an applicationset, but loop through the users and user data, and deploy an Argo application per user.
The text was updated successfully, but these errors were encountered: