Skip to content

Commit b6dd46b

Browse files
committed
Populate HardwareRef when creating workflows
The latest version of tink adds a HardwareRef field to workflows that enables Hardware data to be exposed to the workflow's template during rendering. Signed-off-by: Chris Doherty <chris.doherty4@gmail.com>
1 parent 6ef4508 commit b6dd46b

File tree

3 files changed

+10
-21
lines changed

3 files changed

+10
-21
lines changed

config/default/kustomization.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@ commonLabels:
1111
cluster.x-k8s.io/provider: infrastructure-tinkerbell
1212

1313
resources:
14-
- namespace.yaml
14+
- namespace.yaml
1515

1616
bases:
17-
- ../crd
18-
- ../rbac
19-
- ../manager
20-
- ../webhook
21-
- ../certmanager
17+
- ../crd
18+
- ../rbac
19+
- ../manager
20+
- ../webhook
21+
- ../certmanager
2222

2323
patchesStrategicMerge:
24-
- manager_image_patch.yaml
25-
- manager_pull_policy.yaml
26-
- manager_webhook_patch.yaml
27-
- webhookcainjection_patch.yaml
24+
- manager_image_patch.yaml
25+
- manager_webhook_patch.yaml
26+
- webhookcainjection_patch.yaml
2827

2928
vars:
3029
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR

config/default/manager_pull_policy.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

controllers/machine.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ func (mrc *machineReconcileContext) createWorkflow(hardware *tinkv1.Hardware) er
675675
},
676676
Spec: tinkv1.WorkflowSpec{
677677
TemplateRef: mrc.tinkerbellMachine.Name,
678+
HardwareRef: hardware.Name,
678679
HardwareMap: map[string]string{"device_1": hardware.Spec.Metadata.Instance.ID},
679680
},
680681
}

0 commit comments

Comments
 (0)