-
Notifications
You must be signed in to change notification settings - Fork 105
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
MGMT-19421: phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount #1027
MGMT-19421: phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount #1027
Conversation
@andrej1991: This pull request references MGMT-19421 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
1 similar comment
@andrej1991: This pull request references MGMT-19421 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1027 +/- ##
==========================================
- Coverage 55.67% 55.63% -0.04%
==========================================
Files 15 15
Lines 3393 3399 +6
==========================================
+ Hits 1889 1891 +2
- Misses 1311 1315 +4
Partials 193 193
|
@andrej1991: This pull request references MGMT-19421 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
/cc: @danmanor @AlonaKaplan |
src/assisted_installer_controller/assisted_installer_controller.go
Outdated
Show resolved
Hide resolved
src/assisted_installer_controller/assisted_installer_controller_test.go
Outdated
Show resolved
Hide resolved
43e807e
to
500082a
Compare
…ntrolPlaneCountit has to be further checked if changing the templates will not harm to the installation
500082a
to
fe6ba50
Compare
/cc: @pastequo @adriengentil |
/lgtm |
/retest |
@@ -11,5 +11,5 @@ data: | |||
skip-cert-verification: '{{.SkipCertVerification}}' | |||
ca-cert-path: '{{.CACertPath}}' | |||
check-cluster-version: '{{.CheckCVO}}' | |||
high-availability-mode: {{.HaMode}} | |||
control-plane-count: '{{.ControllerCount}}' |
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.
Lets name this ControlPlaneCount
like everywhere else
src/config/config.go
Outdated
@@ -73,7 +73,7 @@ func (c *Config) ProcessArgs(args []string) { | |||
flagSet.StringVar(&c.HTTPSProxy, "https-proxy", "", "A proxy URL to use for creating HTTPS connections outside the cluster") | |||
flagSet.StringVar(&c.NoProxy, "no-proxy", "", "A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying") | |||
flagSet.StringVar(&c.ServiceIPs, "service-ips", "", "All IPs of assisted service node") | |||
flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.") | |||
flagSet.IntVar(&c.ControlPlaneCount, "control-plane-count", 0, "The number of controller nodes in the cluster") |
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.
Lets change to The number of control plane nodes in the cluster
src/config/config.go
Outdated
@@ -85,6 +85,7 @@ func (c *Config) ProcessArgs(args []string) { | |||
var installerArgs string | |||
flagSet.StringVar(&installerArgs, "installer-args", "", "JSON array of additional coreos-installer arguments") | |||
h := flagSet.Bool("help", false, "Help message") | |||
highAvailability := flagSet.String("high-availability-mode", "", "WARNING: this parameter will be shortly deprecated! valid values: full/none") |
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.
Lets keep it as is for now
flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")
src/config/config.go
Outdated
@@ -123,6 +124,15 @@ func (c *Config) ProcessArgs(args []string) { | |||
utils.SetNoProxyEnv(c.NoProxy) | |||
} | |||
|
|||
if highAvailability != nil && *highAvailability != "" { |
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.
I guess once you will use flagSet.StringVar
you won't need the nil check ? also you will have "" default so yo will not need the if
at all
fe6ba50
to
3dc961f
Compare
@@ -11,5 +11,5 @@ data: | |||
skip-cert-verification: '{{.SkipCertVerification}}' | |||
ca-cert-path: '{{.CACertPath}}' | |||
check-cluster-version: '{{.CheckCVO}}' | |||
high-availability-mode: {{.HaMode}} | |||
control-plane-count: '{{.ControlPlaneCount}}' |
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.
What should ControlPlaneCount
match ?
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.
…with ControlPlaneCountin the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:ControlPlaneCount is being set to 3 if --high-availability-mode is set to fullControlPlaneCount is being set ot 1 if --high-availability-mode is set to none
3dc961f
to
46b40a8
Compare
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.
Looks good !
flagSet.StringVar(&installerArgs, "installer-args", "", "JSON array of additional coreos-installer arguments") | ||
h := flagSet.Bool("help", false, "Help message") | ||
flagSet.StringVar(&highAvailability, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.") |
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.
NIT - Probably best just keep
flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.")
as it is, in effort to avoid creating unnecessary diff that can cause confusion along the way
@@ -82,9 +82,10 @@ func (c *Config) ProcessArgs(args []string) { | |||
flagSet.BoolVar(&c.NotifyNumReboots, "notify-num-reboots", false, "indicate number of reboots should be notified as event") | |||
flagSet.StringVar(&c.CoreosImage, "coreos-image", "", "CoreOS image to install to the existing root") | |||
|
|||
var installerArgs string | |||
var highAvailability, installerArgs string |
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.
See comment below, then this is redundant
@@ -73,7 +73,7 @@ func (c *Config) ProcessArgs(args []string) { | |||
flagSet.StringVar(&c.HTTPSProxy, "https-proxy", "", "A proxy URL to use for creating HTTPS connections outside the cluster") | |||
flagSet.StringVar(&c.NoProxy, "no-proxy", "", "A comma-separated list of destination domain names, domains, IP addresses, or other network CIDRs to exclude proxying") | |||
flagSet.StringVar(&c.ServiceIPs, "service-ips", "", "All IPs of assisted service node") | |||
flagSet.StringVar(&c.HighAvailabilityMode, "high-availability-mode", "", "high-availability expectations, \"Full\" which represents the behavior in a \"normal\" cluster. Use 'None' for single-node deployment. Leave this value as \"\" for workers as we do not care about HA mode for workers.") |
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.
See comment below, we want to avoid this removal / addition diff
@andrej1991: This pull request references MGMT-19421 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.19.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrej1991, danmanor The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@andrej1991: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
[ART PR BUILD NOTIFIER] Distgit: ose-agent-installer-orchestrator |
[ART PR BUILD NOTIFIER] Distgit: ose-agent-installer-csr-approver |
phase 1 of replacing the refference HighAvailabilityMode with ControlPlaneCount
in the first stage it still accepst --high-availability-mode as a command line argument, but it is being converted to ControlPlaneCount in the following maner:
After the phase 1 of assisted-installer-agent is being merged --high-availability-mode will be fully removed from the valid parameters.