Added missing overrides for baremetal airship-core and treasuremap

Also added bare metal phase plan for airship-core

Change-Id: I855de5206473830914edb0cc4ab8a11196135fda
This commit is contained in:
James Gu 2021-09-15 10:38:19 -06:00
parent 9c76c89d2f
commit c837ebf503
13 changed files with 211 additions and 2 deletions

View File

@ -1,9 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- ../../../../type/airship-core/ephemeral/bootstrap
- ../catalogues
namespace: target-infra
generators:
- hostgenerator

View File

@ -0,0 +1,6 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: target-infra

View File

@ -19,6 +19,12 @@ spec:
apiserverCertSANs: "[172.64.0.12, 172.63.0.12]"
ironic:
# NEWSITE_CHANGEME: Ephemeral node PXE network
deployKernelUrl: http://172.63.0.12:80/images/ipa-ubuntu-master.kernel
deployRamdiskUrl: http://172.63.0.12:80/images/ipa-ubuntu-master.initramfs
httpPort: 6180
ironicFastTrack: "false"
ironicEndpoint: http://172.63.0.12:6385/v1/
ironicInspectorEndpoint: http://172.63.0.12:5050/v1/
provisioningInterface: "eno4"
provisioningIp: "172.63.0.12"
dhcpRange: "172.63.0.31,172.63.0.126"

View File

@ -6,5 +6,8 @@ resources:
# TODO (dukov) It's recocommended to upload BareMetalHost objects separately
# otherwise nodes will hang in 'registering' state for quite a long time
- nodes
namespace: target-infra
transformers:
- ../../../../type/airship-core/ephemeral/controlplane/replacements

View File

@ -1,6 +1,12 @@
resources:
- ../kubeconfig
- ../../../type/airship-core/phases
- ../target/catalogues
transformers:
- ../../../../../airshipctl/manifests/function/clusterctl/replacements
- ../../../../../airshipctl/manifests/phases/replacements
## TODO Consider making a catalogue combined with variable substitution instead
patchesStrategicMerge:
- phase-patch.yaml

View File

@ -4,5 +4,8 @@ resources:
- nodes
- ../../../../type/airship-core/target/workers
- ../catalogues
namespace: target-infra
transformers:
- ../../../../type/airship-core/target/workers/replacements
- ../../../../type/airship-core/target/workers/replacements

View File

@ -1,9 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- ../../../../type/multi-tenant/ephemeral/bootstrap
- ../catalogues
namespace: target-infra
generators:
- hostgenerator

View File

@ -0,0 +1,6 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: target-infra

View File

@ -19,6 +19,12 @@ spec:
apiserverCertSANs: "[172.64.0.12, 172.63.0.12]"
ironic:
# NEWSITE_CHANGEME: Ephemeral node PXE network
deployKernelUrl: http://172.63.0.12:80/images/ipa-ubuntu-master.kernel
deployRamdiskUrl: http://172.63.0.12:80/images/ipa-ubuntu-master.initramfs
httpPort: 6180
ironicFastTrack: "false"
ironicEndpoint: http://172.63.0.12:6385/v1/
ironicInspectorEndpoint: http://172.63.0.12:5050/v1/
provisioningInterface: "eno4"
provisioningIp: "172.63.0.12"
dhcpRange: "172.63.0.31,172.63.0.126"

View File

@ -6,5 +6,8 @@ resources:
# TODO (dukov) It's recocommended to upload BareMetalHost objects separately
# otherwise nodes will hang in 'registering' state for quite a long time
- nodes
namespace: target-infra
transformers:
- ../../../../type/multi-tenant/ephemeral/controlplane/replacements

View File

@ -1,6 +1,12 @@
resources:
- ../kubeconfig
- ../../../type/multi-tenant/phases
- ../target/catalogues
transformers:
- ../../../../../airshipctl/manifests/function/clusterctl/replacements
- ../../../../../airshipctl/manifests/phases/replacements
## TODO Consider making a catalogue combined with variable substitution instead
patchesStrategicMerge:
- phase-patch.yaml

View File

@ -4,5 +4,8 @@ resources:
- nodes
- ../../../../type/multi-tenant/target/workers
- ../catalogues
namespace: target-infra
transformers:
- ../../../../type/multi-tenant/target/workers/replacements
- ../../../../type/multi-tenant/target/workers/replacements

View File

@ -0,0 +1,155 @@
apiVersion: airshipit.org/v1alpha1
kind: PhasePlan
metadata:
name: deploy-baremetal
description: "Phase plan for airship-core deployment on bare metals"
phases:
# Deploy ephemeral node using redfish with iso
- name: remotedirect-ephemeral
# Wait for apiserver to become available
# Scripts for this phase placed in manifests/function/phase-helpers/wait_node/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-node
- name: kubectl-wait-node-ephemeral
# Waiting for any pods to be available
# Scripts for this phase placed in manifests/function/phase-helpers/wait_pods_any/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-pods-any
- name: kubectl-wait-pods-any-ephemeral
# Deploy calico using tigera operator
- name: initinfra-networking-ephemeral
# Wait for Calico to be deployed using tigera
# Scripts for this phase placed in manifests/function/phase-helpers/wait_tigera/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait_tigera
- name: kubectl-wait-tigera-ephemeral
# Deploy metal3.io components to ephemeral node
- name: initinfra-ephemeral
# Getting pods as debug information"
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-ephemeral
# Deploy cluster-api components to ephemeral node
- name: clusterctl-init-ephemeral
# Waiting for clusterapi pods to come up
# Scripts for this phase placed in manifests/function/phase-helpers/wait_deploy/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-deploy
- name: kubectl-wait-deploy-ephemeral
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-ephemeral
# Create target k8s cluster resources
- name: controlplane-ephemeral
# List all nodes in target cluster
# Scripts for this phase placed in manifests/function/phase-helpers/get_node/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-node
- name: kubectl-get-node-target
# List all pods in target cluster
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-target
# Deploy calico using tigera operator
- name: initinfra-networking-target
# Wait for Calico to be deployed using tigera
# Scripts for this phase placed in manifests/function/phase-helpers/wait_tigera/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-tigera
- name: kubectl-wait-tigera-target
# Deploy infra to cluster
- name: initinfra-target
# List all pods
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-target
# Annotate node for hostconfig-operator
# Scripts for this phase placed in manifests/function/phase-helpers/annotate_node_for_hostconfig_operator/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-annotate-node-for-hostconfig-operator
- name: kubectl-annotate-node-for-hostconfig-operator-target
# Deploy CAPI components to target cluster
- name: clusterctl-init-target
# Waiting for pods to be ready
# Scripts for this phase placed in manifests/function/phase-helpers/wait_pods_ready/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-pods-ready
- name: kubectl-wait-pods-ready-target
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-target
# Move Cluster Object to Target Cluster
- name: clusterctl-move
# Waiting for pods to be ready
# Scripts for this phase placed in manifests/function/phase-helpers/wait_pods_ready/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-pods-ready
- name: kubectl-wait-pods-ready-target
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-target
# Wait till crds are created
# Scripts for this phase placed in manifests/function/phase-helpers/wait_cluster/
# 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
# Power off Ephemeral baremetal host avoid DHCP conflict
- name: power-off-ephemeral
# (TODO) Need to add manifests for controlplane-target phase
# Create target k8s cluster resources
# - name: controlplane-target
# List all nodes in target cluster
# Scripts for this phase placed in manifests/function/phase-helpers/get_node/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-node
- name: kubectl-get-node-target
# List all pods in target cluster
# Scripts for this phase placed in manifests/function/phase-helpers/get_pods/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-get-pods
- name: kubectl-get-pods-target
# Deploy worker node
- name: workers-target
# Waiting for node to be provisioned
# Scripts for this phase placed in manifests/function/phase-helpers/wait_label_node/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-wait-label-node
- name: kubectl-wait-label-node-target
# Annotate node for hostconfig-operator
# Scripts for this phase placed in manifests/function/phase-helpers/annotate_node_for_hostconfig_operator/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-annotate-node-for-hostconfig-operator
- name: kubectl-annotate-node-for-hostconfig-operator-target
# Deploy workload
- name: workload-target
# Ensure we can reach ingress controller default backend
# Scripts for this phase placed in manifests/function/phase-helpers/check_ingress_ctrl/
# To get ConfigMap for this phase, execute `airshipctl phase render --source config -k ConfigMap`
# and find ConfigMap with name kubectl-check-ingress-ctrl
- name: kubectl-check-ingress-ctrl-target
# (TODO) Need to verify these phases
# - name: lma-infra
# - name: lma-stack
# - name: lma-configs
# - name: deliver-network-policy
validation:
kindsToSkip:
- Clusterctl
- VariableCatalogue
- StorageCatalogue
---
apiVersion: airshipit.org/v1alpha1
kind: PhasePlan
metadata:
name: iso
validation:
kindsToSkip:
- RemoteDirectConfiguration
- VariableCatalogue
- StorageCatalogue