diff --git a/manifests/function/bootstrap/replacements/remotedirect-vars.yaml b/manifests/function/bootstrap/replacements/remotedirect-vars.yaml index 9580398e3..c3d5f70ce 100644 --- a/manifests/function/bootstrap/replacements/remotedirect-vars.yaml +++ b/manifests/function/bootstrap/replacements/remotedirect-vars.yaml @@ -34,3 +34,12 @@ replacements: kind: BaremetalManager name: PowerOffEphemeral fieldrefs: ["spec.hostSelector.name%EPHEMERAL_NODE%"] +- source: + objref: + name: versions-remotedirect + fieldref: spec.remotedirect.node + target: + objref: + kind: BaremetalManager + name: EjectVirtualMediaEphemeral + fieldrefs: ["spec.hostSelector.name%EPHEMERAL_NODE%"] diff --git a/manifests/phases/executors.yaml b/manifests/phases/executors.yaml index 8f616fd7b..2071ae2a6 100644 --- a/manifests/phases/executors.yaml +++ b/manifests/phases/executors.yaml @@ -238,6 +238,17 @@ spec: name: EPHEMERAL_NODE --- apiVersion: airshipit.org/v1alpha1 +kind: BaremetalManager +metadata: + name: EjectVirtualMediaEphemeral + labels: + airshipit.org/deploy-k8s: "false" +spec: + operation: eject-virtual-media + hostSelector: + name: EPHEMERAL_NODE +--- +apiVersion: airshipit.org/v1alpha1 kind: GenericContainer metadata: name: iso-cloud-init-data diff --git a/manifests/phases/phases.yaml b/manifests/phases/phases.yaml index 987e8121b..c6a37d703 100644 --- a/manifests/phases/phases.yaml +++ b/manifests/phases/phases.yaml @@ -268,6 +268,16 @@ config: --- apiVersion: airshipit.org/v1alpha1 kind: Phase +metadata: + name: eject-virtual-media-ephemeral +config: + executorRef: + apiVersion: airshipit.org/v1alpha1 + kind: BaremetalManager + name: EjectVirtualMediaEphemeral +--- +apiVersion: airshipit.org/v1alpha1 +kind: Phase metadata: name: kubectl-wait-node-ephemeral clusterName: ephemeral-cluster diff --git a/manifests/type/gating/phases/plan.yaml b/manifests/type/gating/phases/plan.yaml index 2bd617dda..b785bf685 100644 --- a/manifests/type/gating/phases/plan.yaml +++ b/manifests/type/gating/phases/plan.yaml @@ -95,6 +95,8 @@ phases: # To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap` # and find ConfigMap with name kubectl-wait-cluster - name: kubectl-wait-cluster-target + # Eject virtual media Ephemeral baremetal host to ensure it can reused. + - name: eject-virtual-media-ephemeral # Power off Ephemeral baremetal host avoid DHCP conflict - name: power-off-ephemeral # Create target k8s cluster resources