Skip to content

Commit cfa47b9

Browse files
committed
add dual-replica templates
1 parent 53e78f3 commit cfa47b9

21 files changed

+567
-44
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require (
3030
github.com/google/renameio v0.1.0
3131
github.com/imdario/mergo v0.3.16
3232
github.com/opencontainers/go-digest v1.0.0
33-
github.com/openshift/api v0.0.0-20250227152946-1ee1ef831100
33+
github.com/openshift/api v0.0.0-20250305092847-1cd9f24f0563
3434
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7
3535
github.com/openshift/library-go v0.0.0-20250129210218-fe56c2cf5d70
3636
github.com/openshift/runtime-utils v0.0.0-20230921210328-7bdb5b9c177b

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ
513513
github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM=
514514
github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk=
515515
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
516-
github.com/openshift/api v0.0.0-20250227152946-1ee1ef831100 h1:Qg0N7NUEhnlgSKOgIdFUUy7VAC9ThuXSQPzMIPnw8aE=
517-
github.com/openshift/api v0.0.0-20250227152946-1ee1ef831100/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw=
516+
github.com/openshift/api v0.0.0-20250305092847-1cd9f24f0563 h1:V1SBR8WtqHVcTDZXBQmZoP2QcI4OpChEkzSyOlzTMko=
517+
github.com/openshift/api v0.0.0-20250305092847-1cd9f24f0563/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw=
518518
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7 h1:4iliLcvr1P9EUMZgIaSNEKNQQzBn+L6PSequlFOuB6Q=
519519
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7/go.mod h1:2tcufBE4Cu6RNgDCxcUJepa530kGo5GFVfR9BSnndhI=
520520
github.com/openshift/kube-openapi v0.0.0-20230816122517-ffc8f001abb0 h1:GPlAy197Jkr+D0T2FNWanamraTdzS/r9ZkT29lxvHaA=

pkg/controller/template/render.go

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const (
4747
platformBase = "_base"
4848
platformOnPrem = "on-prem"
4949
sno = "sno"
50+
dualReplica = "dual-replica"
5051
masterRole = "master"
5152
workerRole = "worker"
5253
arbiterRole = "arbiter"
@@ -231,6 +232,10 @@ func getPaths(config *RenderConfig, platformString string) []string {
231232
platformBasedPaths = append(platformBasedPaths, sno)
232233
}
233234

235+
if hasControlPlaneTopology(config, configv1.DualReplicaTopologyMode) {
236+
platformBasedPaths = append(platformBasedPaths, dualReplica)
237+
}
238+
234239
return platformBasedPaths
235240
}
236241

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: machineconfiguration.openshift.io/v1
2+
kind: MachineConfig
3+
metadata:
4+
labels:
5+
machineconfiguration.openshift.io/role: master
6+
name: two-node-ha-extension
7+
spec:
8+
extensions:
9+
- two-node-ha

vendor/github.com/openshift/api/config/v1/types_infrastructure.go

+30-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-CustomNoUpgrade.crd.yaml

+72-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/openshift/api/config/v1/zz_generated.crd-manifests/0000_10_config-operator_01_infrastructures-Default.crd.yaml

+8-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)