-
Notifications
You must be signed in to change notification settings - Fork 1.5k
OCPBUGS-32981: baremetal: template the number of master nodes #8316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,9 @@ type TemplateData struct { | |
| // Hosts is the information needed to create the objects in Ironic. | ||
| Hosts []*baremetal.Host | ||
|
|
||
| // How many of the Hosts are control plane machines? | ||
| MasterHostCount int | ||
|
|
||
| // ProvisioningNetwork displays the type of provisioning network being used | ||
| ProvisioningNetwork string | ||
|
|
||
|
|
@@ -100,6 +103,12 @@ func GetTemplateData(config *baremetal.Platform, networks []types.MachineNetwork | |
|
|
||
| templateData.Hosts = config.Hosts | ||
|
|
||
| for _, host := range config.Hosts { | ||
| if host.IsMaster() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't the Role optional for the user to provide? I'm not aware that we default it anywhere. See https://github.com/openshift/installer/blob/master/pkg/types/baremetal/validation/platform.go#L305-L318
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in a follow-up #8322 |
||
| templateData.MasterHostCount++ | ||
| } | ||
| } | ||
|
|
||
| templateData.ProvisioningIP = config.BootstrapProvisioningIP | ||
| templateData.ProvisioningNetwork = string(config.ProvisioningNetwork) | ||
| templateData.ExternalStaticIP = config.BootstrapExternalStaticIP | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.sh.templatefiles don't get shellcheck run on them. It's better to pass this as an environment variable in the systemd service so that we don't lose linting on shell scripts.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in a follow-up #8322