Skip to content

Commit c2fa2bf

Browse files
Merge pull request #8068 from zaneb/cluster-manifests-gvk
OCPBUGS-29968: Generate ZTP manifests with correct Group/Version/Kind metadata
2 parents 9c8cfd4 + 5e5982d commit c2fa2bf

20 files changed

+98
-9
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ unconfiguredIgnCmp /etc/assisted/manifests/infraenv.yaml expected/infraenv.yaml
1717
unconfiguredIgnCmp /etc/assisted/manifests/pull-secret.yaml expected/pull-secret.yaml
1818

1919
-- cluster-manifests/infraenv.yaml --
20+
apiVersion: agent-install.openshift.io/v1beta1
21+
kind: InfraEnv
2022
metadata:
2123
name: ostest
2224
namespace: cluster0
@@ -43,20 +45,26 @@ stringData:
4345
}
4446

4547
-- cluster-manifests/cluster-image-set.yaml --
48+
apiVersion: hive.openshift.io/v1
49+
kind: ClusterImageSet
4650
metadata:
4751
name: cluster0-image-set
4852
namespace: cluster0
4953
spec:
5054
releaseImage: $RELEASE_IMAGE
5155

5256
-- expected/cluster-image-set.yaml --
57+
apiVersion: hive.openshift.io/v1
58+
kind: ClusterImageSet
5359
metadata:
5460
name: cluster0-image-set
5561
namespace: cluster0
5662
spec:
5763
releaseImage: $RELEASE_IMAGE
5864

5965
-- expected/infraenv.yaml --
66+
apiVersion: agent-install.openshift.io/v1beta1
67+
kind: InfraEnv
6068
metadata:
6169
creationTimestamp: null
6270
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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ unconfiguredIgnContains /etc/assisted/manifests/cluster-image-set.yaml
1414
unconfiguredIgnCmp /etc/assisted/manifests/cluster-image-set.yaml expected/cluster-image-set.yaml
1515

1616
-- cluster-manifests/infraenv.yaml --
17+
apiVersion: agent-install.openshift.io/v1beta1
18+
kind: InfraEnv
1719
metadata:
1820
name: ostest
1921
namespace: cluster0
@@ -40,9 +42,11 @@ stringData:
4042
}
4143

4244
-- expected/cluster-image-set.yaml --
45+
apiVersion: hive.openshift.io/v1
46+
kind: ClusterImageSet
4347
metadata:
4448
creationTimestamp: null
4549
name: openshift-was not built correctly
4650
spec:
4751
releaseImage: $RELEASE_IMAGE
48-
status: {}
52+
status: {}

cmd/openshift-install/testdata/agent/unconfigured-ignition/validations/missing-infraenv.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ stderr 'failed to generate asset "InfraEnv Config": missing configuration or man
1111
! exists $WORK/auth/kubeadmin-password
1212

1313
-- cluster-manifests/cluster-image-set.yaml --
14+
apiVersion: hive.openshift.io/v1
15+
kind: ClusterImageSet
1416
metadata:
1517
name: cluster0-image-set
1618
namespace: cluster0

0 commit comments

Comments
 (0)