Description of problem: Currently, only cloud-init data are added to the template scripts tab, user will wonder why there are no ssh-key and sysprep data showing there. Such as for a windows template, user may want the sysprep configured in the template, so they won't provider the sysprep file every time while they creating their windows VM. Version-Release number of selected component (if applicable): CNV 4.11 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Now it has the ssh-key and sysprep in the template's scripts tab, but it's not like the VM's scripts tab. It's trying to add an existing secret instead of adding new ssh-key or sysprep file.
@yzamir Yes, this is the desired behavior. In VM and wizard, we can choose from creating new secret/sysprep just for that single VM or selecting an existing one in the same namespace. We decided in the template to don't let the user create new secret/sysprep but just choose existing ones. It's not really feasible to enable the user to create n equal secrets/syspreps resources that can be simply shared across namespaces.
(In reply to Ugo Palatucci from comment #2) > @yzamir > > Yes, this is the desired behavior. > In VM and wizard, we can choose from creating new secret/sysprep just for > that single VM or selecting an existing one in the same namespace. > We decided in the template to don't let the user create new secret/sysprep > but just choose existing ones. > It's not really feasible to enable the user to create n equal > secrets/syspreps resources that can be simply shared across namespaces. It's by design, only when you create a VM we allow to create a new secret just for the VM we do not support this feature in the templates overview. for the future: when working with templates, we currently do not allow to create a new services/secrets/routes... using the template. when we will allow to add additional objects to a template, it may be nice to allow to add new secrets for ssh and sysprep
Okay working on that. Recently we fixed the bug regarding template with multiple objects ( https://bugzilla.redhat.com/show_bug.cgi?id=2060499 ) so now we can continue with this.
Verified on v4.12.0-109
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: OpenShift Virtualization 4.12.0 Images security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2023:0408