diff --git a/manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml b/manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml new file mode 100644 index 000000000..80844afc6 --- /dev/null +++ b/manifests/site/test-bootstrap/ephemeral/bootstrap/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - ../../../../type/test-bootstrap diff --git a/manifests/site/test-bootstrap/ephemeral/kustomization.yaml b/manifests/site/test-bootstrap/ephemeral/kustomization.yaml deleted file mode 100644 index 8572e662f..000000000 --- a/manifests/site/test-bootstrap/ephemeral/kustomization.yaml +++ /dev/null @@ -1,2 +0,0 @@ -resources: - - ../../../type/test-bootstrap diff --git a/pkg/bootstrap/isogen/command.go b/pkg/bootstrap/isogen/command.go index 124f06f8c..c471e545e 100644 --- a/pkg/bootstrap/isogen/command.go +++ b/pkg/bootstrap/isogen/command.go @@ -54,7 +54,7 @@ func GenerateBootstrapIso(settings *environment.AirshipCTLSettings) error { // TODO (dukov) replace with the appropriate function once it's available // in document module - root, err := globalConf.CurrentContextEntryPoint(config.Ephemeral, "") + root, err := globalConf.CurrentContextEntryPoint(config.Ephemeral, config.BootstrapPhase) if err != nil { return err } diff --git a/pkg/bootstrap/isogen/command_test.go b/pkg/bootstrap/isogen/command_test.go index 35bc6b843..881181879 100644 --- a/pkg/bootstrap/isogen/command_test.go +++ b/pkg/bootstrap/isogen/command_test.go @@ -59,7 +59,7 @@ func (mc *mockContainer) GetID() string { } func TestBootstrapIso(t *testing.T) { - bundle, err := document.NewBundleByPath("testdata/primary/site/test-site/ephemeral") + bundle, err := document.NewBundleByPath("testdata/primary/site/test-site/ephemeral/bootstrap") require.NoError(t, err, "Building Bundle Failed") tempVol, cleanup := testutil.TempDir(t, "bootstrap-test") diff --git a/pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/kustomization.yaml b/pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/bootstrap/kustomization.yaml similarity index 100% rename from pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/kustomization.yaml rename to pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/bootstrap/kustomization.yaml diff --git a/pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/secret.yaml b/pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/bootstrap/secret.yaml similarity index 100% rename from pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/secret.yaml rename to pkg/bootstrap/isogen/testdata/primary/site/test-site/ephemeral/bootstrap/secret.yaml diff --git a/pkg/cluster/initinfra/infra.go b/pkg/cluster/initinfra/infra.go index 0d187e8f7..6f4fb2819 100644 --- a/pkg/cluster/initinfra/infra.go +++ b/pkg/cluster/initinfra/infra.go @@ -69,7 +69,7 @@ func (infra *Infra) Deploy() error { return err } - kustomizePath, err := globalConf.CurrentContextEntryPoint(infra.ClusterType, config.Initinfra) + kustomizePath, err := globalConf.CurrentContextEntryPoint(infra.ClusterType, config.InitinfraPhase) if err != nil { return err } diff --git a/pkg/config/constants.go b/pkg/config/constants.go index 9695dc04e..2b30752ed 100644 --- a/pkg/config/constants.go +++ b/pkg/config/constants.go @@ -24,7 +24,8 @@ const ( // Constants related to Phases const ( - Initinfra = "initinfra" + InitinfraPhase = "initinfra" + BootstrapPhase = "bootstrap" ) // AllClusterTypes holds cluster types diff --git a/pkg/remote/remote_direct.go b/pkg/remote/remote_direct.go index a4166a1e0..2dc86eeb1 100644 --- a/pkg/remote/remote_direct.go +++ b/pkg/remote/remote_direct.go @@ -98,7 +98,7 @@ func (a *Adapter) initializeAdapter(settings *environment.AirshipCTLSettings) er return config.ErrMissingConfig{What: "RemoteDirect options not defined in bootstrap config"} } - bundlePath, err := cfg.CurrentContextEntryPoint(config.Ephemeral, "") + bundlePath, err := cfg.CurrentContextEntryPoint(config.Ephemeral, config.BootstrapPhase) if err != nil { return err } diff --git a/pkg/remote/testdata/base/manifests/site/test-site/ephemeral/baremetal.yaml b/pkg/remote/testdata/base/manifests/site/test-site/ephemeral/bootstrap/baremetal.yaml similarity index 100% rename from pkg/remote/testdata/base/manifests/site/test-site/ephemeral/baremetal.yaml rename to pkg/remote/testdata/base/manifests/site/test-site/ephemeral/bootstrap/baremetal.yaml diff --git a/pkg/remote/testdata/base/manifests/site/test-site/ephemeral/kustomization.yaml b/pkg/remote/testdata/base/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml similarity index 100% rename from pkg/remote/testdata/base/manifests/site/test-site/ephemeral/kustomization.yaml rename to pkg/remote/testdata/base/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml diff --git a/pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/baremetal.yaml b/pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/bootstrap/baremetal.yaml similarity index 100% rename from pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/baremetal.yaml rename to pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/bootstrap/baremetal.yaml diff --git a/pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/kustomization.yaml b/pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml similarity index 100% rename from pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/kustomization.yaml rename to pkg/remote/testdata/emptyurl/manifests/site/test-site/ephemeral/bootstrap/kustomization.yaml