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

ocp4_workload_showroom: multi-user AgnosticD deployment is broken #7785

Open
btison opened this issue Apr 3, 2024 · 1 comment
Open

ocp4_workload_showroom: multi-user AgnosticD deployment is broken #7785

btison opened this issue Apr 3, 2024 · 1 comment

Comments

@btison
Copy link
Contributor

btison commented Apr 3, 2024

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:

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(10)}}
{% endfor %}

However, when setting the userdata variable for the Helm chart, the userData variable is not used, but rather _showroom_user_data

user_data: |-
{{ _showroom_user_data | to_nice_yaml | indent(16) }}

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.

@newgoliath
Copy link
Collaborator

Per the README.adoc, do not use this feature until we revisit after summit. Use the helm install path.

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

No branches or pull requests

2 participants