Skip to content

Commit 95131f4

Browse files
committed
Allow non user-configurable properties in VM deployment
Currently, VM operator ignores any vApp properties that are not user configurable when patching with values specified in the bootstrap resources (VM metadata ConfigMap/Secret). There are some valid use-cases where users might want to patch hidden properties defined in an image. This change fixes this behavior. Fixes vmware-tanzu#181.
1 parent a95f788 commit 95131f4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/vmprovider/providers/vsphere/session/session_util.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,8 @@ func MergeExtraConfig(extraConfig []vimTypes.BaseOptionValue, newMap map[string]
4949
func GetMergedvAppConfigSpec(inProps map[string]string, vmProps []vimTypes.VAppPropertyInfo) *vimTypes.VmConfigSpec {
5050
outProps := make([]vimTypes.VAppPropertySpec, 0)
5151

52+
// Update any vApp properties if they have been specified in VM metadata.
5253
for _, vmProp := range vmProps {
53-
if vmProp.UserConfigurable == nil || !*vmProp.UserConfigurable {
54-
continue
55-
}
56-
5754
inPropValue, found := inProps[vmProp.Id]
5855
if !found || vmProp.Value == inPropValue {
5956
continue

0 commit comments

Comments
 (0)