Skip to content

Commit f261a71

Browse files
committed
Added two node control-plane node replacement test.
1 parent dd409e8 commit f261a71

33 files changed

+6082
-252
lines changed

go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ require (
5353
github.com/lestrrat/go-jsschema v0.0.0-20181205002244-5c81c58ffcc3
5454
github.com/lithammer/dedent v1.1.0
5555
github.com/mattn/go-sqlite3 v1.14.30
56+
github.com/metal3-io/baremetal-operator/apis v0.11.0
5657
github.com/metallb/frr-k8s v0.0.15
5758
github.com/microsoftgraph/msgraph-sdk-go v1.81.0
5859
github.com/onsi/ginkgo/v2 v2.23.3
@@ -78,7 +79,7 @@ require (
7879
github.com/spf13/pflag v1.0.6-0.20210604193023-d5e0c0615ace
7980
github.com/spf13/viper v1.8.1
8081
github.com/stretchr/objx v0.5.2
81-
github.com/stretchr/testify v1.10.0
82+
github.com/stretchr/testify v1.11.1
8283
github.com/tecbiz-ch/nutanix-go-sdk v0.1.15
8384
github.com/tidwall/gjson v1.18.0
8485
github.com/tidwall/pretty v1.2.0
@@ -100,9 +101,9 @@ require (
100101
gopkg.in/src-d/go-git.v4 v4.13.1
101102
gopkg.in/yaml.v2 v2.4.0
102103
gopkg.in/yaml.v3 v3.0.1
103-
k8s.io/api v0.33.4
104+
k8s.io/api v0.33.5
104105
k8s.io/apiextensions-apiserver v0.33.4
105-
k8s.io/apimachinery v0.33.4
106+
k8s.io/apimachinery v0.33.5
106107
k8s.io/apiserver v0.33.4
107108
k8s.io/cli-runtime v0.33.4
108109
k8s.io/client-go v0.33.4
@@ -398,7 +399,7 @@ require (
398399
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
399400
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.29 // indirect
400401
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16 // indirect
401-
sigs.k8s.io/controller-runtime v0.19.0 // indirect
402+
sigs.k8s.io/controller-runtime v0.21.0 // indirect
402403
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
403404
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 // indirect
404405
sigs.k8s.io/kustomize/api v0.19.0 // indirect

go.sum

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
707707
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
708708
github.com/mattn/go-sqlite3 v1.14.30 h1:bVreufq3EAIG1Quvws73du3/QgdeZ3myglJlrzSYYCY=
709709
github.com/mattn/go-sqlite3 v1.14.30/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
710+
github.com/metal3-io/baremetal-operator/apis v0.11.0 h1:sYxjnObegWnDyz028m5Rc6gVYxbSLlvjOAqo6Iq1vOE=
711+
github.com/metal3-io/baremetal-operator/apis v0.11.0/go.mod h1:T0v/wKeJeUfVFeTq1sihv76IZEE2Bn+hqKkh5kGMxA4=
710712
github.com/metallb/frr-k8s v0.0.15 h1:6M3UGhovX1EFoaSGjrRD7djUAx3w2I+g81FH8OVtHkM=
711713
github.com/metallb/frr-k8s v0.0.15/go.mod h1:TjrGoAf+v00hYGlI8jUdyDxY5udMAOs2GWwrvLWnA4E=
712714
github.com/microsoft/kiota-abstractions-go v1.9.3 h1:cqhbqro+VynJ7kObmo7850h3WN2SbvoyhypPn8uJ1SE=
@@ -986,8 +988,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
986988
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
987989
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
988990
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
989-
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
990-
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
991+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
992+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
991993
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
992994
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
993995
github.com/tecbiz-ch/nutanix-go-sdk v0.1.15 h1:ZT5I6OFGswvMceujUE10ZXPNnT5UQIW9gAX4FEFK6Ds=
@@ -1592,8 +1594,8 @@ sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.29 h1:qiifAaaBqV3d/EcN9dKJaJI
15921594
sigs.k8s.io/cloud-provider-azure/pkg/azclient v0.0.29/go.mod h1:ZFAt0qF1kR+w8nBVJK56s6CFvLrlosN1i2c+Sxb7LBk=
15931595
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16 h1:Fm/Yjv4nXjUtJ90uXKSKwPwaTWYuDFMhDNNOd77PlOg=
15941596
sigs.k8s.io/cloud-provider-azure/pkg/azclient/configloader v0.0.16/go.mod h1:+kl90flu4+WCP6HBGVYbKVQR+5ztDzUNrWJz8rsnvRU=
1595-
sigs.k8s.io/controller-runtime v0.19.0 h1:nWVM7aq+Il2ABxwiCizrVDSlmDcshi9llbaFbC0ji/Q=
1596-
sigs.k8s.io/controller-runtime v0.19.0/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4=
1597+
sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
1598+
sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
15971599
sigs.k8s.io/gateway-api v1.2.1 h1:fZZ/+RyRb+Y5tGkwxFKuYuSRQHu9dZtbjenblleOLHM=
15981600
sigs.k8s.io/gateway-api v1.2.1/go.mod h1:EpNfEXNjiYfUJypf0eZ0P5iXA9ekSGWaS1WgPaM42X0=
15991601
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
apiVersion: metal3.io/v1alpha1
2+
kind: BareMetalHost
3+
metadata:
4+
finalizers:
5+
- baremetalhost.metal3.io
6+
labels:
7+
installer.openshift.io/role: control-plane
8+
name: {NAME}
9+
namespace: openshift-machine-api
10+
spec:
11+
architecture: x86_64
12+
automatedCleaningMode: metadata
13+
bmc:
14+
address: redfish+https://{IP}:8000/redfish/v1/Systems/{UUID}
15+
credentialsName: {CREDENTIALS_NAME}
16+
disableCertificateVerification: true
17+
bootMACAddress: {BOOT_MAC_ADDRESS}
18+
bootMode: UEFI
19+
customDeploy:
20+
method: install_coreos
21+
hardwareProfile: unknown
22+
online: true
23+
rootDeviceHints:
24+
deviceName: /dev/sda
25+
userData:
26+
name: master-user-data-managed
27+
namespace: openshift-machine-api
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: machine.openshift.io/v1beta1
2+
kind: Machine
3+
metadata:
4+
annotations:
5+
metal3.io/BareMetalHost: openshift-machine-api/{NODE_NAME}
6+
finalizers:
7+
- machine.machine.openshift.io
8+
labels:
9+
machine.openshift.io/cluster-api-cluster: ostest-{MACHINE_HASH}
10+
machine.openshift.io/cluster-api-machine-role: master
11+
machine.openshift.io/cluster-api-machine-type: master
12+
name: {MACHINE_NAME}
13+
namespace: openshift-machine-api
14+
spec:
15+
authoritativeAPI: MachineAPI
16+
metadata: {}
17+
providerSpec:
18+
value:
19+
apiVersion: baremetal.cluster.k8s.io/v1alpha1
20+
customDeploy:
21+
method: install_coreos
22+
hostSelector: {}
23+
image:
24+
checksum: ""
25+
url: ""
26+
kind: BareMetalMachineProviderSpec
27+
metadata:
28+
creationTimestamp: null
29+
userData:
30+
name: master-user-data-managed

0 commit comments

Comments
 (0)