diff --git a/pkg/asset/agent/installconfig.go b/pkg/asset/agent/installconfig.go index cc7f64f812..bec39183aa 100644 --- a/pkg/asset/agent/installconfig.go +++ b/pkg/asset/agent/installconfig.go @@ -257,6 +257,13 @@ func (a *OptionalInstallConfig) ClusterName() string { return "agent-cluster" } +func (a *OptionalInstallConfig) ClusterNamespace() string { + if a.Config != nil && a.Config.ObjectMeta.Namespace != "" { + return a.Config.ObjectMeta.Namespace + } + return "" +} + // GetBaremetalHosts gets the hosts defined for a baremetal platform. func (a *OptionalInstallConfig) GetBaremetalHosts() []*baremetal.Host { if a.Config != nil && a.Config.Platform.Name() == baremetal.Name { diff --git a/pkg/asset/agent/joiner/clusterinfo.go b/pkg/asset/agent/joiner/clusterinfo.go index 877dce2c71..8fbbfd4c53 100644 --- a/pkg/asset/agent/joiner/clusterinfo.go +++ b/pkg/asset/agent/joiner/clusterinfo.go @@ -20,6 +20,7 @@ type ClusterInfo struct { ClusterID string APIDNSName string PullSecret string + Namespace string } var _ asset.WritableAsset = (*ClusterInfo)(nil) @@ -68,6 +69,8 @@ func (ci *ClusterInfo) Generate(dependencies asset.Parents) error { return err } + ci.Namespace = "cluster0" + return nil } diff --git a/pkg/asset/agent/manifests/agentclusterinstall.go b/pkg/asset/agent/manifests/agentclusterinstall.go index 6112d5b990..9344a746e3 100644 --- a/pkg/asset/agent/manifests/agentclusterinstall.go +++ b/pkg/asset/agent/manifests/agentclusterinstall.go @@ -167,7 +167,7 @@ func (a *AgentClusterInstall) Generate(dependencies asset.Parents) error { agentClusterInstall := &hiveext.AgentClusterInstall{ ObjectMeta: metav1.ObjectMeta{ Name: getAgentClusterInstallName(installConfig), - Namespace: getObjectMetaNamespace(installConfig), + Namespace: installConfig.ClusterNamespace(), }, Spec: hiveext.AgentClusterInstallSpec{ ImageSetRef: &hivev1.ClusterImageSetReference{ diff --git a/pkg/asset/agent/manifests/agentpullsecret.go b/pkg/asset/agent/manifests/agentpullsecret.go index 3e3bd570e0..5267925b59 100644 --- a/pkg/asset/agent/manifests/agentpullsecret.go +++ b/pkg/asset/agent/manifests/agentpullsecret.go @@ -14,6 +14,8 @@ import ( "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/agent" + "github.com/openshift/installer/pkg/asset/agent/joiner" + "github.com/openshift/installer/pkg/asset/agent/workflow" "github.com/openshift/installer/pkg/validate" ) @@ -41,36 +43,54 @@ func (*AgentPullSecret) Name() string { // the asset. func (*AgentPullSecret) Dependencies() []asset.Asset { return []asset.Asset{ + &workflow.AgentWorkflow{}, + &joiner.ClusterInfo{}, &agent.OptionalInstallConfig{}, } } // Generate generates the AgentPullSecret manifest. func (a *AgentPullSecret) Generate(dependencies asset.Parents) error { + + agentWorkflow := &workflow.AgentWorkflow{} installConfig := &agent.OptionalInstallConfig{} - dependencies.Get(installConfig) + clusterInfo := &joiner.ClusterInfo{} + dependencies.Get(agentWorkflow, installConfig, clusterInfo) - if installConfig.Config != nil { - secret := &corev1.Secret{ - TypeMeta: metav1.TypeMeta{ - APIVersion: "v1", - Kind: "Secret", - }, - ObjectMeta: metav1.ObjectMeta{ - Name: getPullSecretName(installConfig), - Namespace: getObjectMetaNamespace(installConfig), - }, - StringData: map[string]string{ - pullSecretKey: installConfig.Config.PullSecret, - }, + switch agentWorkflow.Workflow { + case workflow.AgentWorkflowTypeInstall: + if installConfig.Config != nil { + a.generateSecret(installConfig.ClusterName(), installConfig.ClusterNamespace(), installConfig.Config.PullSecret) } - a.Config = secret + case workflow.AgentWorkflowTypeAddNodes: + a.generateSecret(clusterInfo.ClusterID, clusterInfo.Namespace, clusterInfo.PullSecret) + + default: + return fmt.Errorf("AgentWorkflowType value not supported: %s", agentWorkflow.Workflow) } return a.finish() } +func (a *AgentPullSecret) generateSecret(name, namespace, pullSecret string) { + secret := &corev1.Secret{ + TypeMeta: metav1.TypeMeta{ + APIVersion: "v1", + Kind: "Secret", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: getPullSecretName(name), + Namespace: namespace, + }, + StringData: map[string]string{ + pullSecretKey: pullSecret, + }, + } + a.Config = secret + +} + // Files returns the files generated by the asset. func (a *AgentPullSecret) Files() []*asset.File { if a.File != nil { diff --git a/pkg/asset/agent/manifests/agentpullsecret_test.go b/pkg/asset/agent/manifests/agentpullsecret_test.go index 195419e234..2526863566 100644 --- a/pkg/asset/agent/manifests/agentpullsecret_test.go +++ b/pkg/asset/agent/manifests/agentpullsecret_test.go @@ -13,11 +13,12 @@ import ( "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/agent" + "github.com/openshift/installer/pkg/asset/agent/joiner" + "github.com/openshift/installer/pkg/asset/agent/workflow" "github.com/openshift/installer/pkg/asset/mock" ) func TestAgentPullSecret_Generate(t *testing.T) { - cases := []struct { name string dependencies []asset.Asset @@ -25,16 +26,15 @@ func TestAgentPullSecret_Generate(t *testing.T) { expectedConfig *corev1.Secret }{ { - name: "missing install config", + name: "retrieved from cluster", dependencies: []asset.Asset{ &agent.OptionalInstallConfig{}, - }, - expectedError: "missing configuration or manifest file", - }, - { - name: "valid configuration", - dependencies: []asset.Asset{ - getValidOptionalInstallConfig(), + &workflow.AgentWorkflow{Workflow: workflow.AgentWorkflowTypeAddNodes}, + &joiner.ClusterInfo{ + ClusterID: "ostest", + Namespace: "cluster0", + PullSecret: "{\n \"auths\": {\n \"cloud.openshift.com\": {\n \"auth\": \"b3BlUTA=\",\n \"email\": \"test@redhat.com\"\n }\n }\n}", + }, }, expectedConfig: &corev1.Secret{ TypeMeta: v1.TypeMeta{ @@ -42,8 +42,34 @@ func TestAgentPullSecret_Generate(t *testing.T) { APIVersion: "v1", }, ObjectMeta: v1.ObjectMeta{ - Name: getPullSecretName(getValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Name: "ostest-pull-secret", + Namespace: "cluster0", + }, + StringData: map[string]string{ + ".dockerconfigjson": "{\n \"auths\": {\n \"cloud.openshift.com\": {\n \"auth\": \"b3BlUTA=\",\n \"email\": \"test@redhat.com\"\n }\n }\n}", + }, + }, + }, + { + name: "missing install config", + dependencies: []asset.Asset{ + &agent.OptionalInstallConfig{}, &workflow.AgentWorkflow{Workflow: workflow.AgentWorkflowTypeInstall}, &joiner.ClusterInfo{}, + }, + expectedError: "missing configuration or manifest file", + }, + { + name: "valid configuration", + dependencies: []asset.Asset{ + getValidOptionalInstallConfig(), &workflow.AgentWorkflow{Workflow: workflow.AgentWorkflowTypeInstall}, &joiner.ClusterInfo{}, + }, + expectedConfig: &corev1.Secret{ + TypeMeta: v1.TypeMeta{ + Kind: "Secret", + APIVersion: "v1", + }, + ObjectMeta: v1.ObjectMeta{ + Name: getPullSecretName(getValidOptionalInstallConfig().ClusterName()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, StringData: map[string]string{ ".dockerconfigjson": "{\n \"auths\": {\n \"cloud.openshift.com\": {\n \"auth\": \"b3BlUTA=\",\n \"email\": \"test@redhat.com\"\n }\n }\n}", diff --git a/pkg/asset/agent/manifests/clusterdeployment.go b/pkg/asset/agent/manifests/clusterdeployment.go index 2d7a1b62c2..4048095561 100644 --- a/pkg/asset/agent/manifests/clusterdeployment.go +++ b/pkg/asset/agent/manifests/clusterdeployment.go @@ -53,13 +53,13 @@ func (cd *ClusterDeployment) Generate(dependencies asset.Parents) error { }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(installConfig), - Namespace: getObjectMetaNamespace(installConfig), + Namespace: installConfig.ClusterNamespace(), }, Spec: hivev1.ClusterDeploymentSpec{ ClusterName: getClusterDeploymentName(installConfig), BaseDomain: installConfig.Config.BaseDomain, PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(installConfig), + Name: getPullSecretName(installConfig.ClusterName()), }, ClusterInstallRef: &hivev1.ClusterInstallLocalReference{ Group: "extensions.hive.openshift.io", diff --git a/pkg/asset/agent/manifests/clusterdeployment_test.go b/pkg/asset/agent/manifests/clusterdeployment_test.go index a12639b353..e98e82d2fb 100644 --- a/pkg/asset/agent/manifests/clusterdeployment_test.go +++ b/pkg/asset/agent/manifests/clusterdeployment_test.go @@ -45,13 +45,13 @@ func TestClusterDeployment_Generate(t *testing.T) { }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, Spec: hivev1.ClusterDeploymentSpec{ ClusterName: getClusterDeploymentName(getValidOptionalInstallConfig()), BaseDomain: "testing.com", PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(getValidOptionalInstallConfig()), + Name: getPullSecretName(getValidOptionalInstallConfig().ClusterName()), }, ClusterInstallRef: &hivev1.ClusterInstallLocalReference{ Group: "extensions.hive.openshift.io", diff --git a/pkg/asset/agent/manifests/clusterimageset.go b/pkg/asset/agent/manifests/clusterimageset.go index 65cfdba46f..a41b271fc3 100644 --- a/pkg/asset/agent/manifests/clusterimageset.go +++ b/pkg/asset/agent/manifests/clusterimageset.go @@ -65,7 +65,7 @@ func (a *ClusterImageSet) Generate(dependencies asset.Parents) error { } if installConfig.Config != nil { - clusterImageSet.ObjectMeta.Namespace = getObjectMetaNamespace(installConfig) + clusterImageSet.ObjectMeta.Namespace = installConfig.ClusterNamespace() } diff --git a/pkg/asset/agent/manifests/clusterimageset_test.go b/pkg/asset/agent/manifests/clusterimageset_test.go index 1f8e913589..b93312b06d 100644 --- a/pkg/asset/agent/manifests/clusterimageset_test.go +++ b/pkg/asset/agent/manifests/clusterimageset_test.go @@ -64,7 +64,7 @@ func TestClusterImageSet_Generate(t *testing.T) { expectedConfig: &hivev1.ClusterImageSet{ ObjectMeta: metav1.ObjectMeta{ Name: "openshift-was not built correctly", - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, Spec: hivev1.ClusterImageSetSpec{ ReleaseImage: currentRelease, diff --git a/pkg/asset/agent/manifests/common.go b/pkg/asset/agent/manifests/common.go index f2118eee43..781fe21699 100644 --- a/pkg/asset/agent/manifests/common.go +++ b/pkg/asset/agent/manifests/common.go @@ -18,8 +18,8 @@ func getInfraEnvName(ic *agent.OptionalInstallConfig) string { return ic.ClusterName() } -func getPullSecretName(ic *agent.OptionalInstallConfig) string { - return ic.ClusterName() + "-pull-secret" +func getPullSecretName(clusterName string) string { + return clusterName + "-pull-secret" } func getProxy(ic *agent.OptionalInstallConfig) *aiv1beta1.Proxy { @@ -30,13 +30,6 @@ func getProxy(ic *agent.OptionalInstallConfig) *aiv1beta1.Proxy { } } -func getObjectMetaNamespace(ic *agent.OptionalInstallConfig) string { - if ic.Config != nil { - return ic.Config.Namespace - } - return "" -} - func getNMStateConfigName(ic *agent.OptionalInstallConfig) string { return ic.ClusterName() } diff --git a/pkg/asset/agent/manifests/infraenv.go b/pkg/asset/agent/manifests/infraenv.go index 2106c859ff..c21c4730f6 100644 --- a/pkg/asset/agent/manifests/infraenv.go +++ b/pkg/asset/agent/manifests/infraenv.go @@ -56,16 +56,16 @@ func (i *InfraEnv) Generate(dependencies asset.Parents) error { infraEnv := &aiv1beta1.InfraEnv{ ObjectMeta: metav1.ObjectMeta{ Name: getInfraEnvName(installConfig), - Namespace: getObjectMetaNamespace(installConfig), + Namespace: installConfig.ClusterNamespace(), }, Spec: aiv1beta1.InfraEnvSpec{ ClusterRef: &aiv1beta1.ClusterReference{ Name: getClusterDeploymentName(installConfig), - Namespace: getObjectMetaNamespace(installConfig), + Namespace: installConfig.ClusterNamespace(), }, SSHAuthorizedKey: strings.Trim(installConfig.Config.SSHKey, "|\n\t"), PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(installConfig), + Name: getPullSecretName(installConfig.ClusterName()), }, NMStateConfigLabelSelector: metav1.LabelSelector{ MatchLabels: getNMStateConfigLabels(installConfig), diff --git a/pkg/asset/agent/manifests/infraenv_test.go b/pkg/asset/agent/manifests/infraenv_test.go index ca786e9b6a..8d4099d6ac 100644 --- a/pkg/asset/agent/manifests/infraenv_test.go +++ b/pkg/asset/agent/manifests/infraenv_test.go @@ -44,16 +44,16 @@ func TestInfraEnv_Generate(t *testing.T) { expectedConfig: &aiv1beta1.InfraEnv{ ObjectMeta: metav1.ObjectMeta{ Name: getInfraEnvName(getValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, Spec: aiv1beta1.InfraEnvSpec{ ClusterRef: &aiv1beta1.ClusterReference{ Name: getClusterDeploymentName(getValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, SSHAuthorizedKey: strings.Trim(testSSHKey, "|\n\t"), PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(getValidOptionalInstallConfig()), + Name: getPullSecretName(getValidOptionalInstallConfig().ClusterName()), }, NMStateConfigLabelSelector: metav1.LabelSelector{ MatchLabels: getNMStateConfigLabels(getValidOptionalInstallConfig()), @@ -70,20 +70,20 @@ func TestInfraEnv_Generate(t *testing.T) { expectedConfig: &aiv1beta1.InfraEnv{ ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getProxyValidOptionalInstallConfig()), + Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), }, Spec: aiv1beta1.InfraEnvSpec{ Proxy: getProxy(getProxyValidOptionalInstallConfig()), SSHAuthorizedKey: strings.Trim(testSSHKey, "|\n\t"), PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(getProxyValidOptionalInstallConfig()), + Name: getPullSecretName(getProxyValidOptionalInstallConfig().ClusterName()), }, NMStateConfigLabelSelector: metav1.LabelSelector{ MatchLabels: getNMStateConfigLabels(getProxyValidOptionalInstallConfig()), }, ClusterRef: &aiv1beta1.ClusterReference{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getProxyValidOptionalInstallConfig()), + Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), }, }, }, @@ -97,20 +97,20 @@ func TestInfraEnv_Generate(t *testing.T) { expectedConfig: &aiv1beta1.InfraEnv{ ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getProxyValidOptionalInstallConfig()), + Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), }, Spec: aiv1beta1.InfraEnvSpec{ Proxy: getProxy(getProxyValidOptionalInstallConfig()), SSHAuthorizedKey: strings.Trim(testSSHKey, "|\n\t"), PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(getProxyValidOptionalInstallConfig()), + Name: getPullSecretName(getProxyValidOptionalInstallConfig().ClusterName()), }, NMStateConfigLabelSelector: metav1.LabelSelector{ MatchLabels: getNMStateConfigLabels(getProxyValidOptionalInstallConfig()), }, ClusterRef: &aiv1beta1.ClusterReference{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getProxyValidOptionalInstallConfig()), + Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), }, AdditionalNTPSources: getValidAgentConfigWithAdditionalNTPSources().Config.AdditionalNTPSources, }, @@ -125,16 +125,16 @@ func TestInfraEnv_Generate(t *testing.T) { expectedConfig: &aiv1beta1.InfraEnv{ ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getProxyValidOptionalInstallConfig()), + Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), }, Spec: aiv1beta1.InfraEnvSpec{ ClusterRef: &aiv1beta1.ClusterReference{ Name: getClusterDeploymentName(getValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, SSHAuthorizedKey: strings.Trim(testSSHKey, "|\n\t"), PullSecretRef: &corev1.LocalObjectReference{ - Name: getPullSecretName(getValidOptionalInstallConfig()), + Name: getPullSecretName(getValidOptionalInstallConfig().ClusterName()), }, NMStateConfigLabelSelector: metav1.LabelSelector{ MatchLabels: getNMStateConfigLabels(getValidOptionalInstallConfig()), diff --git a/pkg/asset/agent/manifests/nmstateconfig.go b/pkg/asset/agent/manifests/nmstateconfig.go index a48aee852b..6c3cae0c14 100644 --- a/pkg/asset/agent/manifests/nmstateconfig.go +++ b/pkg/asset/agent/manifests/nmstateconfig.go @@ -98,7 +98,7 @@ func (n *NMStateConfig) Generate(dependencies asset.Parents) error { }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf(getNMStateConfigName(installConfig)+"-%d", i), - Namespace: getObjectMetaNamespace(installConfig), + Namespace: installConfig.ClusterNamespace(), Labels: getNMStateConfigLabels(installConfig), }, Spec: aiv1beta1.NMStateConfigSpec{ diff --git a/pkg/asset/agent/manifests/nmstateconfig_test.go b/pkg/asset/agent/manifests/nmstateconfig_test.go index 8e34997fb7..ba9adbfe3b 100644 --- a/pkg/asset/agent/manifests/nmstateconfig_test.go +++ b/pkg/asset/agent/manifests/nmstateconfig_test.go @@ -51,7 +51,7 @@ func TestNMStateConfig_Generate(t *testing.T) { }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprint(getNMStateConfigName(getValidOptionalInstallConfig()), "-0"), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), Labels: getNMStateConfigLabels(getValidOptionalInstallConfig()), }, Spec: aiv1beta1.NMStateConfigSpec{ @@ -84,7 +84,7 @@ func TestNMStateConfig_Generate(t *testing.T) { }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprint(getNMStateConfigName(getValidOptionalInstallConfig()), "-0"), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), Labels: getNMStateConfigLabels(getValidOptionalInstallConfig()), }, Spec: aiv1beta1.NMStateConfigSpec{ @@ -110,7 +110,7 @@ func TestNMStateConfig_Generate(t *testing.T) { }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprint(getNMStateConfigName(getValidOptionalInstallConfig()), "-1"), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), Labels: getNMStateConfigLabels(getValidOptionalInstallConfig()), }, Spec: aiv1beta1.NMStateConfigSpec{ @@ -132,7 +132,7 @@ func TestNMStateConfig_Generate(t *testing.T) { }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprint(getNMStateConfigName(getValidOptionalInstallConfig()), "-2"), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), Labels: getNMStateConfigLabels(getValidOptionalInstallConfig()), }, Spec: aiv1beta1.NMStateConfigSpec{ diff --git a/pkg/asset/agent/manifests/util_test.go b/pkg/asset/agent/manifests/util_test.go index a15ecda9f8..970bdf1928 100644 --- a/pkg/asset/agent/manifests/util_test.go +++ b/pkg/asset/agent/manifests/util_test.go @@ -454,7 +454,7 @@ func getGoodACI() *hiveext.AgentClusterInstall { goodACI := &hiveext.AgentClusterInstall{ ObjectMeta: metav1.ObjectMeta{ Name: getAgentClusterInstallName(getValidOptionalInstallConfig()), - Namespace: getObjectMetaNamespace(getValidOptionalInstallConfig()), + Namespace: getValidOptionalInstallConfig().ClusterNamespace(), }, Spec: hiveext.AgentClusterInstallSpec{ ImageSetRef: &hivev1.ClusterImageSetReference{ diff --git a/pkg/nodejoiner/addnodes.go b/pkg/nodejoiner/addnodes.go index 94a50200fe..73c21a8930 100644 --- a/pkg/nodejoiner/addnodes.go +++ b/pkg/nodejoiner/addnodes.go @@ -3,6 +3,7 @@ package nodejoiner import ( "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/agent/joiner" + "github.com/openshift/installer/pkg/asset/agent/manifests" "github.com/openshift/installer/pkg/asset/agent/workflow" "github.com/openshift/installer/pkg/asset/store" ) @@ -22,6 +23,7 @@ func NewAddNodesCommand(directory string, kubeConfig string) error { fetcher := store.NewAssetsFetcher(directory) return fetcher.FetchAndPersist([]asset.WritableAsset{ &workflow.AgentWorkflowAddNodes{}, + &manifests.AgentPullSecret{}, // To be completed }) }