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

Proper array for feeding multiple vapp properties #43

Open
jhkang-esnet opened this issue Dec 19, 2024 · 0 comments
Open

Proper array for feeding multiple vapp properties #43

jhkang-esnet opened this issue Dec 19, 2024 · 0 comments

Comments

@jhkang-esnet
Copy link

Hey Rancher Federal,

We're looking to feed in multiple vappProperty entries in our downstream clusters using rancher templates. We're currently using v.0.6.1 on Rancher MCM 2.10.0 (k8s 1.30.x).

I believe on the nodeconfig-vsphere.yaml - it's expecting strings for these 4 vapp options. I believe vappProperty should be able to take in some kind of array or key:value data type. It's currently written so that the template accepts a single string:

vappIpallocationpolicy: {{ $nodepool.vappIpallocationpolicy }}
vappIpprotocol: {{ $nodepool.vappIpprotocol }}
vappProperty: {{ $nodepool.vappProperty }}
vappTransport: {{ $nodepool.vappTransport }}

I've put in this value for values.yaml:

vappProperty: ["ipaddress=ip:ds06.198.128.131.1-24", "gateway=$${gateway:ds06.198.128.131.1-24}", "dns=$${dns:ds06.198.128.131.1-24}"]

Does the chart support feeding in multiple key-value pairs into the vappProperty field? What is the expected way of feeding data into it? As it's currently written, I believe it only supports/expects a single string.

If I look at the XML values of vapp on VMware, it does support taking in multiple values under vappProperty:

<Property oe:key="guestinfo.interface.0.ip.0.address" oe:value="06.198.128.131.250"/>
<Property oe:key="guestinfo.interface.0.ip.0.netmask" oe:value="255.255.255.0"/>
<Property oe:key="guestinfo.interface.0.route.0.gateway" oe:value="198.128.131.1"/>

Could you provide guidance on what has worked for entering multiple fields? I'm also happy to commit the changes to the repo to support list structure in vappProperty.

{{- if .Values.nodepool.vappProperty }}
  vappProperty: -|
  {{- range .Values.nodepool.vappProperty }}
    - {{ . | quote }}
  {{- end }}
{{- end -}}

I have a separate ticket w/ RGS on this issue: #7589.

Thanks!

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

1 participant