Skip to content

Commit 3dc204e

Browse files
committed
Set TypeMeta data for agent cluster-manifests
1 parent ac3ac89 commit 3dc204e

File tree

17 files changed

+84
-6
lines changed

17 files changed

+84
-6
lines changed

cmd/openshift-install/testdata/agent/configimage/manifests/default_manifests.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ metadata:
4343
rendezvousIP: 192.168.111.20
4444

4545
-- expected/agent-cluster-install.yaml --
46+
apiVersion: extensions.hive.openshift.io/v1beta1
47+
kind: AgentClusterInstall
4648
metadata:
4749
creationTimestamp: null
4850
name: ostest
@@ -73,7 +75,7 @@ status:
7375
progress:
7476
totalPercentage: 0
7577
-- expected/cluster-deployment.yaml --
76-
apiVersion: v1
78+
apiVersion: hive.openshift.io/v1
7779
kind: ClusterDeployment
7880
metadata:
7981
creationTimestamp: null
@@ -95,6 +97,8 @@ spec:
9597
name: ostest-pull-secret
9698
status: {}
9799
-- expected/cluster-image-set.yaml --
100+
apiVersion: hive.openshift.io/v1
101+
kind: ClusterImageSet
98102
metadata:
99103
creationTimestamp: null
100104
name: openshift-was not built correctly

cmd/openshift-install/testdata/agent/image/configurations/baremetal_host_bmc_config.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ metadata:
129129
rendezvousIP: 192.168.111.80
130130

131131
-- expected/agent-cluster-install.yaml --
132+
apiVersion: extensions.hive.openshift.io/v1beta1
133+
kind: AgentClusterInstall
132134
metadata:
133135
annotations:
134136
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"}}}'

cmd/openshift-install/testdata/agent/image/configurations/external_compact.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ metadata:
4444
rendezvousIP: 192.168.111.20
4545

4646
-- expected/agent-cluster-install.yaml --
47+
apiVersion: extensions.hive.openshift.io/v1beta1
48+
kind: AgentClusterInstall
4749
metadata:
4850
annotations:
4951
agent-install.openshift.io/install-config-overrides: '{"platform":{"external":{"platformName":"some-cloud-provider"}}}'

cmd/openshift-install/testdata/agent/image/configurations/vsphere_no-credentials.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ metadata:
4747
rendezvousIP: 192.168.111.20
4848

4949
-- expected/agent-cluster-install.yaml --
50+
apiVersion: extensions.hive.openshift.io/v1beta1
51+
kind: AgentClusterInstall
5052
metadata:
5153
creationTimestamp: null
5254
name: ostest

cmd/openshift-install/testdata/agent/image/configurations/vsphere_with-credentials.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ metadata:
6565
rendezvousIP: 192.168.111.20
6666

6767
-- expected/agent-cluster-install.yaml --
68+
apiVersion: extensions.hive.openshift.io/v1beta1
69+
kind: AgentClusterInstall
6870
metadata:
6971
annotations:
7072
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"}}]}}}'

cmd/openshift-install/testdata/agent/image/manifests/default_manifests.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ metadata:
4444
rendezvousIP: 192.168.111.20
4545

4646
-- expected/agent-cluster-install.yaml --
47+
apiVersion: extensions.hive.openshift.io/v1beta1
48+
kind: AgentClusterInstall
4749
metadata:
4850
creationTimestamp: null
4951
name: ostest
@@ -74,7 +76,7 @@ status:
7476
progress:
7577
totalPercentage: 0
7678
-- expected/cluster-deployment.yaml --
77-
apiVersion: v1
79+
apiVersion: hive.openshift.io/v1
7880
kind: ClusterDeployment
7981
metadata:
8082
creationTimestamp: null
@@ -96,6 +98,8 @@ spec:
9698
name: ostest-pull-secret
9799
status: {}
98100
-- expected/cluster-image-set.yaml --
101+
apiVersion: hive.openshift.io/v1
102+
kind: ClusterImageSet
99103
metadata:
100104
creationTimestamp: null
101105
name: openshift-was not built correctly
@@ -104,6 +108,8 @@ spec:
104108
releaseImage: $RELEASE_IMAGE
105109
status: {}
106110
-- expected/infraenv.yaml --
111+
apiVersion: agent-install.openshift.io/v1beta1
112+
kind: InfraEnv
107113
metadata:
108114
creationTimestamp: null
109115
name: ostest

cmd/openshift-install/testdata/agent/unconfigured-ignition/configurations/from-ztp-manifests.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,26 @@ stringData:
4343
}
4444

4545
-- cluster-manifests/cluster-image-set.yaml --
46+
apiVersion: hive.openshift.io/v1
47+
kind: ClusterImageSet
4648
metadata:
4749
name: cluster0-image-set
4850
namespace: cluster0
4951
spec:
5052
releaseImage: $RELEASE_IMAGE
5153

5254
-- expected/cluster-image-set.yaml --
55+
apiVersion: hive.openshift.io/v1
56+
kind: ClusterImageSet
5357
metadata:
5458
name: cluster0-image-set
5559
namespace: cluster0
5660
spec:
5761
releaseImage: $RELEASE_IMAGE
5862

5963
-- expected/infraenv.yaml --
64+
apiVersion: agent-install.openshift.io/v1beta1
65+
kind: InfraEnv
6066
metadata:
6167
creationTimestamp: null
6268
name: ostest

cmd/openshift-install/testdata/agent/unconfigured-ignition/manifests/default_manifests.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ metadata:
4848
rendezvousIP: 192.168.111.20
4949

5050
-- expected/cluster-image-set.yaml --
51+
apiVersion: hive.openshift.io/v1
52+
kind: ClusterImageSet
5153
metadata:
5254
creationTimestamp: null
5355
name: openshift-was not built correctly
@@ -56,6 +58,8 @@ spec:
5658
releaseImage: $RELEASE_IMAGE
5759
status: {}
5860
-- expected/infraenv.yaml --
61+
apiVersion: agent-install.openshift.io/v1beta1
62+
kind: InfraEnv
5963
metadata:
6064
creationTimestamp: null
6165
name: ostest
@@ -96,4 +100,4 @@ stringData:
96100
"auth": "c3VwZXItc2VjcmV0Cg=="
97101
}
98102
}
99-
}
103+
}

cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-cluster-image-set-allowed.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ stringData:
4040
}
4141

4242
-- expected/cluster-image-set.yaml --
43+
apiVersion: hive.openshift.io/v1
44+
kind: ClusterImageSet
4345
metadata:
4446
creationTimestamp: null
4547
name: openshift-was not built correctly
4648
spec:
4749
releaseImage: $RELEASE_IMAGE
48-
status: {}
50+
status: {}

pkg/asset/agent/manifests/agentclusterinstall.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ func (a *AgentClusterInstall) Generate(dependencies asset.Parents) error {
173173
}
174174

175175
agentClusterInstall := &hiveext.AgentClusterInstall{
176+
TypeMeta: metav1.TypeMeta{
177+
Kind: "AgentClusterInstall",
178+
APIVersion: hiveext.GroupVersion.String(),
179+
},
176180
ObjectMeta: metav1.ObjectMeta{
177181
Name: getAgentClusterInstallName(installConfig),
178182
Namespace: installConfig.ClusterNamespace(),

0 commit comments

Comments
 (0)