Skip to content

Commit

Permalink
OCPEDGE-1311: add two node openshift deployment
Browse files Browse the repository at this point in the history
Add new deployment type to the assisted service
called two node with arbiter(TNA)
  • Loading branch information
qJkee committed Feb 17, 2025
1 parent f06b712 commit c5dc4ec
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
12 changes: 12 additions & 0 deletions internal/installcfg/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ func (i *installConfigBuilder) getBasicInstallConfig(cluster *common.Cluster) (*
SSHKey: cluster.SSHPublicKey,
}

if cfg.ControlPlane.Replicas == 2 {
cfg.Arbiter = struct {
Hyperthreading string `json:"hyperthreading,omitempty"`
Name string `json:"name"`
Replicas int `json:"replicas"`
}{
Hyperthreading: i.getHypethreadingConfiguration(cluster, "master"),
Name: string(models.HostRoleArbiter),
Replicas: 1,
}
}

cfg.Networking.NetworkType = networkType

for _, network := range cluster.ClusterNetworks {
Expand Down
5 changes: 5 additions & 0 deletions internal/installcfg/installcfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ type InstallerConfigBaremetal struct {
Name string `json:"name"`
Replicas int `json:"replicas"`
} `json:"controlPlane"`
Arbiter struct {
Hyperthreading string `json:"hyperthreading,omitempty"`
Name string `json:"name"`
Replicas int `json:"replicas"`
} `json:"arbiter"`
Platform Platform `json:"platform"`
BootstrapInPlace *BootstrapInPlace `json:"bootstrapInPlace,omitempty"`
FIPS bool `json:"fips"`
Expand Down
5 changes: 4 additions & 1 deletion models/host_role.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6609,6 +6609,7 @@ definitions:
- 'master'
- 'worker'
- 'bootstrap'
- 'arbiter'

host-validation-id:
type: string
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c5dc4ec

Please sign in to comment.