-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
viz: Add HA Option through CLI #5470
Conversation
This PR adds `--ha` flag for `viz install` which overrides with the `values-ha.yaml` of the viz chart. This PR adds these functions in `pkg/charts` so that the same can be re-used elsewhere. Signed-off-by: Tarun Pothulapati <[email protected]>
// MergeMaps returns the merge result of two maps | ||
func MergeMaps(a, b map[string]interface{}) map[string]interface{} { | ||
out := make(map[string]interface{}, len(a)) | ||
for k, v := range a { | ||
out[k] = v | ||
} | ||
for k, v := range b { | ||
if v, ok := v.(map[string]interface{}); ok { | ||
if bv, ok := out[k]; ok { | ||
if bv, ok := bv.(map[string]interface{}); ok { | ||
out[k] = MergeMaps(bv, v) | ||
continue | ||
} | ||
} | ||
} | ||
out[k] = v | ||
} | ||
return out | ||
} |
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.
Seems like this should depend #5433 since it adds the same function?
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.
Yes 👍
Signed-off-by: Tarun Pothulapati <[email protected]>
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.
👍
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.
LGTM, all tests passed locally
Signed-off-by: Tarun Pothulapati <[email protected]>
This PR adds
--ha
flag forviz install
which overrides withthe
values-ha.yaml
of the viz chart. This PR adds these functionsin
pkg/charts
so that the same can be re-used elsewhere.Testing
Signed-off-by: Tarun Pothulapati [email protected]