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

Support custom node labelling for MIG automation #84

Open
RJaliliSTFC opened this issue Sep 1, 2023 · 0 comments
Open

Support custom node labelling for MIG automation #84

RJaliliSTFC opened this issue Sep 1, 2023 · 0 comments

Comments

@RJaliliSTFC
Copy link

Allow labelling for node deployments.

We are trying to deploy GPU nodes with custom labels on specific node groups so that they can have MIG enabled on deployment, removing the need to manually label each node.

We attempted to edit charts/openstack-cluster/templates/node-group/openstack-machine-template.yaml
Moving labels into template:spec, as follows;

    labels:
      {{- include "openstack-cluster.componentLabels" (list $ "worker") | nindent 4 }}
      {{ $.Values.projectPrefix }}/node-group: {{ $nodeGroup.name }}
      {{ toYaml . | nindent 6 }}
      {{- end }}
      {{- with $nodeGroup.extraLabels }}

With this code we got the error:

Error: UPGRADE FAILED: parse error at (openstack-cluster/templates/node-group/openstack-machine-template.yaml:39): undefined variable "$nodeGroup"

We also attempted to just move the pre-existing code into the template spec:

  labels:
    {{- include "openstack-cluster.componentLabels" (list $ "worker") | nindent 4 }}
    {{ $.Values.projectPrefix }}/node-group: {{ $nodeGroup.name }}

And got the error:

Error: UPGRADE FAILED: template: openstack-cluster/templates/node-group/openstack-machine-template.yaml:56:11: executing "openstack-cluster/templates/node-group/openstack-machine-template.yaml" at <include "openstack-cluster.nodegroup.mt.name" (list $ $nodeGroup)>: error calling include: template: openstack-cluster/templates/node-group/openstack-machine-template.yaml:46:17: executing "openstack-cluster.nodegroup.mt.name" at <include "openstack-cluster.nodegroup.mt.checksum" .>: error calling include: template: openstack-cluster/templates/node-group/openstack-machine-template.yaml:40:4: executing "openstack-cluster.nodegroup.mt.checksum" at <include "openstack-cluster.nodegroup.mt.spec" .>: error calling include: template: openstack-cluster/templates/node-group/openstack-machine-template.yaml:35:10: executing "openstack-cluster.nodegroup.mt.spec" at <include "openstack-cluster.componentLabels" (list $ "worker")>: error calling include: template: openstack-cluster/templates/_helpers.tpl:62:3: executing "openstack-cluster.componentLabels" at <include "openstack-cluster.commonLabels" (index . 0)>: error calling include: template: openstack-cluster/templates/_helpers.tpl:28:18: executing "openstack-cluster.commonLabels" at <include "openstack-cluster.chart" .>: error calling include: template: openstack-cluster/templates/_helpers.tpl:21:25: executing "openstack-cluster.chart" at <.Chart.Name>: can't evaluate field Chart in type []interface {}
  • Is there something simple I'm missing to get this working?
  • Is this a change you'd be happy to accept?
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