I need to add several users to a new group template
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: group-devops-template
objects:
- apiVersion: user.openshift.io/v1
kind: Group
metadata:
name: ${GROUP_NAME}
users: ["${USER_NAMES}"] # <--- here the issue
#- user1
#- user2
#- user3
parameters:
- name: GROUP_NAME
description: Password used for Redis authentication
- name: USER_NAMES
description: user or users to add
The nightmare happens when I process the template with the values.
oc process -f grup_template3 -p GROUP_NAME=admin_devops -p USER_NAMES=["user1","user2","user3"] | oc create -f -
And here my questions:
- How to specify the list correctly in the above template
- How to specify correctly the list of values: ["user1","user2","user3"]
The final group with the desired users should like this:
oc get groups admin_devops -o yaml
apiVersion: user.openshift.io/v1
kind: Group
metadata:
name: admin_devops
users:
- user1
- user2
- user3
Any idea about how to achieve this?
Thank you for the help