diff --git a/cmd/openshift-install/testdata/agent/configimage/manifests/default_manifests.txt b/cmd/openshift-install/testdata/agent/configimage/manifests/default_manifests.txt index b42324e494e..76eeeee5777 100644 --- a/cmd/openshift-install/testdata/agent/configimage/manifests/default_manifests.txt +++ b/cmd/openshift-install/testdata/agent/configimage/manifests/default_manifests.txt @@ -43,6 +43,8 @@ metadata: rendezvousIP: 192.168.111.20 -- expected/agent-cluster-install.yaml -- +apiVersion: extensions.hive.openshift.io/v1beta1 +kind: AgentClusterInstall metadata: creationTimestamp: null name: ostest @@ -73,7 +75,7 @@ status: progress: totalPercentage: 0 -- expected/cluster-deployment.yaml -- -apiVersion: v1 +apiVersion: hive.openshift.io/v1 kind: ClusterDeployment metadata: creationTimestamp: null @@ -95,6 +97,8 @@ spec: name: ostest-pull-secret status: {} -- expected/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: creationTimestamp: null name: openshift-was not built correctly diff --git a/cmd/openshift-install/testdata/agent/image/configurations/baremetal_host_bmc_config.txt b/cmd/openshift-install/testdata/agent/image/configurations/baremetal_host_bmc_config.txt index f820b065cb9..fee29e83962 100644 --- a/cmd/openshift-install/testdata/agent/image/configurations/baremetal_host_bmc_config.txt +++ b/cmd/openshift-install/testdata/agent/image/configurations/baremetal_host_bmc_config.txt @@ -129,6 +129,8 @@ metadata: rendezvousIP: 192.168.111.80 -- expected/agent-cluster-install.yaml -- +apiVersion: extensions.hive.openshift.io/v1beta1 +kind: AgentClusterInstall metadata: annotations: agent-install.openshift.io/install-config-overrides: '{"platform":{"baremetal":{"hosts":[{"name":"master-0","bmc":{"username":"foo","password":"pwd1","address":"http://172.22.0.10:8000/redfish/v1/Systems/d3fe1eb9-f04c-465d-b5d6-d267f0a0059b","disableCertificateVerification":false},"role":"","bootMACAddress":"00:00:00:aa:bb:01","hardwareProfile":""},{"name":"master-1","bmc":{"username":"foo","password":"pwd2","address":"http://172.22.0.11:8000/redfish/v1/Systems/65bf6806-b634-4494-bccf-032ebdecc65d","disableCertificateVerification":false},"role":"","bootMACAddress":"00:00:00:aa:bb:02","hardwareProfile":""},{"name":"master-2","bmc":{"username":"foo","password":"pwd3","address":"http://172.22.0.12:8000/redfish/v1/Systems/ff67e706-28c4-42f6-b9a2-ce714195300a","disableCertificateVerification":false},"role":"","bootMACAddress":"00:00:00:aa:bb:03","hardwareProfile":""}],"clusterProvisioningIP":"172.22.0.3","provisioningNetwork":"Managed","provisioningNetworkInterface":"enp1s0","provisioningNetworkCIDR":"172.22.0.0/24","provisioningDHCPRange":"172.22.0.10,172.22.0.254"}}}' diff --git a/cmd/openshift-install/testdata/agent/image/configurations/external_compact.txt b/cmd/openshift-install/testdata/agent/image/configurations/external_compact.txt index 6d51e58d081..e9903ea0b46 100644 --- a/cmd/openshift-install/testdata/agent/image/configurations/external_compact.txt +++ b/cmd/openshift-install/testdata/agent/image/configurations/external_compact.txt @@ -44,6 +44,8 @@ metadata: rendezvousIP: 192.168.111.20 -- expected/agent-cluster-install.yaml -- +apiVersion: extensions.hive.openshift.io/v1beta1 +kind: AgentClusterInstall metadata: annotations: agent-install.openshift.io/install-config-overrides: '{"platform":{"external":{"platformName":"some-cloud-provider"}}}' diff --git a/cmd/openshift-install/testdata/agent/image/configurations/vsphere_no-credentials.txt b/cmd/openshift-install/testdata/agent/image/configurations/vsphere_no-credentials.txt index b4d182c82b5..ef98a48aa11 100644 --- a/cmd/openshift-install/testdata/agent/image/configurations/vsphere_no-credentials.txt +++ b/cmd/openshift-install/testdata/agent/image/configurations/vsphere_no-credentials.txt @@ -47,6 +47,8 @@ metadata: rendezvousIP: 192.168.111.20 -- expected/agent-cluster-install.yaml -- +apiVersion: extensions.hive.openshift.io/v1beta1 +kind: AgentClusterInstall metadata: creationTimestamp: null name: ostest diff --git a/cmd/openshift-install/testdata/agent/image/configurations/vsphere_with-credentials.txt b/cmd/openshift-install/testdata/agent/image/configurations/vsphere_with-credentials.txt index 82407de2b20..3d2e331b24a 100644 --- a/cmd/openshift-install/testdata/agent/image/configurations/vsphere_with-credentials.txt +++ b/cmd/openshift-install/testdata/agent/image/configurations/vsphere_with-credentials.txt @@ -65,6 +65,8 @@ metadata: rendezvousIP: 192.168.111.20 -- expected/agent-cluster-install.yaml -- +apiVersion: extensions.hive.openshift.io/v1beta1 +kind: AgentClusterInstall metadata: annotations: agent-install.openshift.io/install-config-overrides: '{"platform":{"vsphere":{"vcenters":[{"server":"vcenter.openshift.com","user":"testUser","password":"testPassword","datacenters":["testDatacenter"]}],"failureDomains":[{"name":"testfailureDomain","region":"testRegion","zone":"testZone","server":"vcenter.openshift.com","topology":{"datacenter":"testDatacenter","computeCluster":"/testDatacenter/host/testComputecluster","networks":["testNetwork"],"datastore":"/testDatacenter/datastore/testDatastore","resourcePool":"/testDatacenter/host/testComputecluster/Resources","folder":"/testDatacenter/vm/testFolder"}}]}}}' diff --git a/cmd/openshift-install/testdata/agent/image/manifests/default_manifests.txt b/cmd/openshift-install/testdata/agent/image/manifests/default_manifests.txt index 340bb0362e9..2d5daf2c653 100644 --- a/cmd/openshift-install/testdata/agent/image/manifests/default_manifests.txt +++ b/cmd/openshift-install/testdata/agent/image/manifests/default_manifests.txt @@ -44,6 +44,8 @@ metadata: rendezvousIP: 192.168.111.20 -- expected/agent-cluster-install.yaml -- +apiVersion: extensions.hive.openshift.io/v1beta1 +kind: AgentClusterInstall metadata: creationTimestamp: null name: ostest @@ -74,7 +76,7 @@ status: progress: totalPercentage: 0 -- expected/cluster-deployment.yaml -- -apiVersion: v1 +apiVersion: hive.openshift.io/v1 kind: ClusterDeployment metadata: creationTimestamp: null @@ -96,6 +98,8 @@ spec: name: ostest-pull-secret status: {} -- expected/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: creationTimestamp: null name: openshift-was not built correctly @@ -104,6 +108,8 @@ spec: releaseImage: $RELEASE_IMAGE status: {} -- expected/infraenv.yaml -- +apiVersion: agent-install.openshift.io/v1beta1 +kind: InfraEnv metadata: creationTimestamp: null name: ostest diff --git a/cmd/openshift-install/testdata/agent/unconfigured-ignition/configurations/from-ztp-manifests.txt b/cmd/openshift-install/testdata/agent/unconfigured-ignition/configurations/from-ztp-manifests.txt index 03d8ca344c9..8e3bb10dbc3 100644 --- a/cmd/openshift-install/testdata/agent/unconfigured-ignition/configurations/from-ztp-manifests.txt +++ b/cmd/openshift-install/testdata/agent/unconfigured-ignition/configurations/from-ztp-manifests.txt @@ -17,6 +17,8 @@ unconfiguredIgnCmp /etc/assisted/manifests/infraenv.yaml expected/infraenv.yaml unconfiguredIgnCmp /etc/assisted/manifests/pull-secret.yaml expected/pull-secret.yaml -- cluster-manifests/infraenv.yaml -- +apiVersion: agent-install.openshift.io/v1beta1 +kind: InfraEnv metadata: name: ostest namespace: cluster0 @@ -43,6 +45,8 @@ stringData: } -- cluster-manifests/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: name: cluster0-image-set namespace: cluster0 @@ -50,6 +54,8 @@ spec: releaseImage: $RELEASE_IMAGE -- expected/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: name: cluster0-image-set namespace: cluster0 @@ -57,6 +63,8 @@ spec: releaseImage: $RELEASE_IMAGE -- expected/infraenv.yaml -- +apiVersion: agent-install.openshift.io/v1beta1 +kind: InfraEnv metadata: creationTimestamp: null name: ostest diff --git a/cmd/openshift-install/testdata/agent/unconfigured-ignition/manifests/default_manifests.txt b/cmd/openshift-install/testdata/agent/unconfigured-ignition/manifests/default_manifests.txt index 0cd9055a8d3..ea2f762c648 100644 --- a/cmd/openshift-install/testdata/agent/unconfigured-ignition/manifests/default_manifests.txt +++ b/cmd/openshift-install/testdata/agent/unconfigured-ignition/manifests/default_manifests.txt @@ -48,6 +48,8 @@ metadata: rendezvousIP: 192.168.111.20 -- expected/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: creationTimestamp: null name: openshift-was not built correctly @@ -56,6 +58,8 @@ spec: releaseImage: $RELEASE_IMAGE status: {} -- expected/infraenv.yaml -- +apiVersion: agent-install.openshift.io/v1beta1 +kind: InfraEnv metadata: creationTimestamp: null name: ostest @@ -96,4 +100,4 @@ stringData: "auth": "c3VwZXItc2VjcmV0Cg==" } } - } \ No newline at end of file + } diff --git a/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-cluster-image-set-allowed.txt b/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-cluster-image-set-allowed.txt index c320c8b60b6..3baf1540571 100644 --- a/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-cluster-image-set-allowed.txt +++ b/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-cluster-image-set-allowed.txt @@ -14,6 +14,8 @@ unconfiguredIgnContains /etc/assisted/manifests/cluster-image-set.yaml unconfiguredIgnCmp /etc/assisted/manifests/cluster-image-set.yaml expected/cluster-image-set.yaml -- cluster-manifests/infraenv.yaml -- +apiVersion: agent-install.openshift.io/v1beta1 +kind: InfraEnv metadata: name: ostest namespace: cluster0 @@ -40,9 +42,11 @@ stringData: } -- expected/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: creationTimestamp: null name: openshift-was not built correctly spec: releaseImage: $RELEASE_IMAGE -status: {} \ No newline at end of file +status: {} diff --git a/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-infraenv.txt b/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-infraenv.txt index ee72d9892ff..7d97b180177 100644 --- a/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-infraenv.txt +++ b/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-infraenv.txt @@ -11,6 +11,8 @@ stderr 'failed to generate asset "InfraEnv Config": missing configuration or man ! exists $WORK/auth/kubeadmin-password -- cluster-manifests/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: name: cluster0-image-set namespace: cluster0 diff --git a/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-pull-secret.txt b/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-pull-secret.txt index 8c760c2c6b3..e8529e9e84e 100644 --- a/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-pull-secret.txt +++ b/cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-pull-secret.txt @@ -11,6 +11,8 @@ stderr 'failed to generate asset "Agent PullSecret": missing configuration or ma ! exists $WORK/auth/kubeadmin-password -- cluster-manifests/infraenv.yaml -- +apiVersion: agent-install.openshift.io/v1beta1 +kind: InfraEnv metadata: name: ostest namespace: cluster0 @@ -21,6 +23,8 @@ spec: sshAuthorizedKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDK6UTEydcEKzuNdPaofn8Z2DwgHqdcionLZBiPf/zIRNco++etLsat7Avv7yt04DINQd5zjxIFgG8jblaUB5E5C9ClUcMwb52GO0ay2Y9v1uBv1a4WhI3peKktAzYNk0EBMQlJtXPjRMrC9ylBPh+DsBHMu+KmDnfk7PIwyN4efC8k5kSRuPWoNdme1rz2+umU8FSmaWTHIajrbspf4GQbsntA5kuKEtDbfoNCU97o2KrRnUbeg3a8hwSjfh3u6MhlnGcg5K2Ij+zivEsWGCLKYUtE1ErqwfIzwWmJ6jnV66XCQGHf4Q1iIxqF7s2a1q24cgG2Z/iDXfqXrCIfy4P7b/Ztak3bdT9jfAdVZtdO5/r7I+O5hYhF86ayFlDWzZWP/ByiSb+q4CQbfVgK3BMmiAv2MqLHdhesmD/SmIcoOWUF6rFmRKZVFFpKpt5ATNTgUJ3JRowoXrrDruVXClUGRiCS6Zabd1rZ3VmTchaPJwtzQMdfIWISXj+Ig+C4UK0= -- cluster-manifests/cluster-image-set.yaml -- +apiVersion: hive.openshift.io/v1 +kind: ClusterImageSet metadata: name: cluster0-image-set namespace: cluster0 diff --git a/pkg/asset/agent/manifests/agentclusterinstall.go b/pkg/asset/agent/manifests/agentclusterinstall.go index 72eec6ba279..b989922cad2 100644 --- a/pkg/asset/agent/manifests/agentclusterinstall.go +++ b/pkg/asset/agent/manifests/agentclusterinstall.go @@ -173,6 +173,10 @@ func (a *AgentClusterInstall) Generate(dependencies asset.Parents) error { } agentClusterInstall := &hiveext.AgentClusterInstall{ + TypeMeta: metav1.TypeMeta{ + Kind: "AgentClusterInstall", + APIVersion: hiveext.GroupVersion.String(), + }, ObjectMeta: metav1.ObjectMeta{ Name: getAgentClusterInstallName(installConfig), Namespace: installConfig.ClusterNamespace(), diff --git a/pkg/asset/agent/manifests/clusterdeployment.go b/pkg/asset/agent/manifests/clusterdeployment.go index 00018321c9e..2d90c876914 100644 --- a/pkg/asset/agent/manifests/clusterdeployment.go +++ b/pkg/asset/agent/manifests/clusterdeployment.go @@ -10,6 +10,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" + hiveext "github.com/openshift/assisted-service/api/hiveextension/v1beta1" hivev1 "github.com/openshift/hive/apis/hive/v1" "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/agent" @@ -57,7 +58,7 @@ func (cd *ClusterDeployment) Generate(dependencies asset.Parents) error { clusterDeployment := &hivev1.ClusterDeployment{ TypeMeta: metav1.TypeMeta{ Kind: "ClusterDeployment", - APIVersion: "v1", + APIVersion: hivev1.SchemeGroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(installConfig), @@ -70,8 +71,8 @@ func (cd *ClusterDeployment) Generate(dependencies asset.Parents) error { Name: getPullSecretName(installConfig.ClusterName()), }, ClusterInstallRef: &hivev1.ClusterInstallLocalReference{ - Group: "extensions.hive.openshift.io", - Version: "v1beta1", + Group: hiveext.Group, + Version: hiveext.Version, Kind: "AgentClusterInstall", Name: getAgentClusterInstallName(installConfig), }, diff --git a/pkg/asset/agent/manifests/clusterdeployment_test.go b/pkg/asset/agent/manifests/clusterdeployment_test.go index 5025ae5bc80..a03b77ea0d4 100644 --- a/pkg/asset/agent/manifests/clusterdeployment_test.go +++ b/pkg/asset/agent/manifests/clusterdeployment_test.go @@ -44,7 +44,7 @@ func TestClusterDeployment_Generate(t *testing.T) { expectedConfig: &hivev1.ClusterDeployment{ TypeMeta: metav1.TypeMeta{ Kind: "ClusterDeployment", - APIVersion: "v1", + APIVersion: "hive.openshift.io/v1", }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getValidOptionalInstallConfig()), diff --git a/pkg/asset/agent/manifests/clusterimageset.go b/pkg/asset/agent/manifests/clusterimageset.go index 795c3e6f378..bc8a741afcb 100644 --- a/pkg/asset/agent/manifests/clusterimageset.go +++ b/pkg/asset/agent/manifests/clusterimageset.go @@ -82,6 +82,10 @@ func (a *ClusterImageSet) Generate(dependencies asset.Parents) error { func (a *ClusterImageSet) generateManifest(version, releaseImage, clusterNamespace string) error { clusterImageSet := &hivev1.ClusterImageSet{ + TypeMeta: metav1.TypeMeta{ + Kind: "ClusterImageSet", + APIVersion: hivev1.SchemeGroupVersion.String(), + }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf("openshift-%s", version), Namespace: clusterNamespace, diff --git a/pkg/asset/agent/manifests/clusterimageset_test.go b/pkg/asset/agent/manifests/clusterimageset_test.go index 22a1fbbc101..2b7c5ddebaf 100644 --- a/pkg/asset/agent/manifests/clusterimageset_test.go +++ b/pkg/asset/agent/manifests/clusterimageset_test.go @@ -41,6 +41,10 @@ func TestClusterImageSet_Generate(t *testing.T) { }, }, expectedConfig: &hivev1.ClusterImageSet{ + TypeMeta: metav1.TypeMeta{ + Kind: "ClusterImageSet", + APIVersion: "hive.openshift.io/v1", + }, ObjectMeta: metav1.ObjectMeta{ Name: "openshift-was not built correctly", }, @@ -70,6 +74,10 @@ func TestClusterImageSet_Generate(t *testing.T) { }, }, expectedConfig: &hivev1.ClusterImageSet{ + TypeMeta: metav1.TypeMeta{ + Kind: "ClusterImageSet", + APIVersion: "hive.openshift.io/v1", + }, ObjectMeta: metav1.ObjectMeta{ Name: "openshift-was not built correctly", Namespace: getValidOptionalInstallConfig().ClusterNamespace(), @@ -92,6 +100,10 @@ func TestClusterImageSet_Generate(t *testing.T) { &releaseimage.Image{}, }, expectedConfig: &hivev1.ClusterImageSet{ + TypeMeta: metav1.TypeMeta{ + Kind: "ClusterImageSet", + APIVersion: "hive.openshift.io/v1", + }, ObjectMeta: metav1.ObjectMeta{ Name: "openshift-4.16.0", Namespace: "agent-cluster", diff --git a/pkg/asset/agent/manifests/infraenv.go b/pkg/asset/agent/manifests/infraenv.go index fde8208aa3f..3136878cbad 100644 --- a/pkg/asset/agent/manifests/infraenv.go +++ b/pkg/asset/agent/manifests/infraenv.go @@ -86,6 +86,10 @@ func (i *InfraEnv) Generate(dependencies asset.Parents) error { func (i *InfraEnv) generateManifest(clusterName, clusterNamespace, sshKey, additionalTrustBundle string, proxy *types.Proxy, architecture string) error { infraEnv := &aiv1beta1.InfraEnv{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfraEnv", + APIVersion: aiv1beta1.GroupVersion.String(), + }, ObjectMeta: metav1.ObjectMeta{ Name: clusterName, Namespace: clusterNamespace, diff --git a/pkg/asset/agent/manifests/infraenv_test.go b/pkg/asset/agent/manifests/infraenv_test.go index f2d5b1f122e..88ad6859046 100644 --- a/pkg/asset/agent/manifests/infraenv_test.go +++ b/pkg/asset/agent/manifests/infraenv_test.go @@ -49,6 +49,10 @@ func TestInfraEnv_Generate(t *testing.T) { getValidAgentConfig(), }, expectedConfig: &aiv1beta1.InfraEnv{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfraEnv", + APIVersion: "agent-install.openshift.io/v1beta1", + }, ObjectMeta: metav1.ObjectMeta{ Name: getValidOptionalInstallConfig().ClusterName(), Namespace: getValidOptionalInstallConfig().ClusterNamespace(), @@ -77,6 +81,10 @@ func TestInfraEnv_Generate(t *testing.T) { getValidAgentConfig(), }, expectedConfig: &aiv1beta1.InfraEnv{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfraEnv", + APIVersion: "agent-install.openshift.io/v1beta1", + }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), @@ -106,6 +114,10 @@ func TestInfraEnv_Generate(t *testing.T) { getValidAgentConfigWithAdditionalNTPSources(), }, expectedConfig: &aiv1beta1.InfraEnv{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfraEnv", + APIVersion: "agent-install.openshift.io/v1beta1", + }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), @@ -136,6 +148,10 @@ func TestInfraEnv_Generate(t *testing.T) { getValidAgentConfig(), }, expectedConfig: &aiv1beta1.InfraEnv{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfraEnv", + APIVersion: "agent-install.openshift.io/v1beta1", + }, ObjectMeta: metav1.ObjectMeta{ Name: getClusterDeploymentName(getProxyValidOptionalInstallConfig()), Namespace: getProxyValidOptionalInstallConfig().ClusterNamespace(), @@ -173,6 +189,10 @@ func TestInfraEnv_Generate(t *testing.T) { &agentconfig.AgentConfig{}, }, expectedConfig: &aiv1beta1.InfraEnv{ + TypeMeta: metav1.TypeMeta{ + Kind: "InfraEnv", + APIVersion: "agent-install.openshift.io/v1beta1", + }, ObjectMeta: metav1.ObjectMeta{ Name: "agent-cluster", Namespace: "agent-ns", diff --git a/pkg/asset/agent/manifests/nmstateconfig.go b/pkg/asset/agent/manifests/nmstateconfig.go index df578a2db86..3f9079a30f9 100644 --- a/pkg/asset/agent/manifests/nmstateconfig.go +++ b/pkg/asset/agent/manifests/nmstateconfig.go @@ -104,7 +104,7 @@ func (n *NMStateConfig) Generate(dependencies asset.Parents) error { nmStateConfig := aiv1beta1.NMStateConfig{ TypeMeta: metav1.TypeMeta{ Kind: "NMStateConfig", - APIVersion: "agent-install.openshift.io/v1beta1", + APIVersion: aiv1beta1.GroupVersion.String(), }, ObjectMeta: metav1.ObjectMeta{ Name: fmt.Sprintf(getNMStateConfigName(installConfig)+"-%d", i), diff --git a/pkg/asset/agent/manifests/util_test.go b/pkg/asset/agent/manifests/util_test.go index 970bdf19284..bed168a9faf 100644 --- a/pkg/asset/agent/manifests/util_test.go +++ b/pkg/asset/agent/manifests/util_test.go @@ -452,6 +452,10 @@ func getAgentHostsWithBMCConfig() *agentconfig.AgentHosts { func getGoodACI() *hiveext.AgentClusterInstall { goodACI := &hiveext.AgentClusterInstall{ + TypeMeta: metav1.TypeMeta{ + Kind: "AgentClusterInstall", + APIVersion: "extensions.hive.openshift.io/v1beta1", + }, ObjectMeta: metav1.ObjectMeta{ Name: getAgentClusterInstallName(getValidOptionalInstallConfig()), Namespace: getValidOptionalInstallConfig().ClusterNamespace(),