Skip to content
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

Added support for replication with minimal manifest #723

Merged
merged 3 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,20 @@ func MinVersionCheck(minVersion string, version string) (bool, error) {

func getClusterIDs(replica csmv1.Module) ([]string, error) {
var clusterIDs []string
if replica.Components == nil {
// if we are entering this block then it is a minimal yaml and replication is enabled and we will set default cluster as self
components := make([]csmv1.ContainerTemplate, 0)
components = append(components, csmv1.ContainerTemplate{
Name: ReplicationControllerManager,
})
replica.Components = components

replica.Components[0].Envs = append(replica.Components[0].Envs, corev1.EnvVar{
Name: "TARGET_CLUSTERS_IDS",
Value: "self", // defaults to same cluster for the replication
})

}
for _, comp := range replica.Components {
if comp.Name == ReplicationControllerManager {
for _, env := range comp.Envs {
Expand Down
18 changes: 10 additions & 8 deletions samples/minimal-samples/powermax.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ spec:
configVersion: v2.12.0
forceRemoveDriver: true
# These are the modules which are optional and can be enabled by specifying to enable/disable.
modules:
- name: authorization
# enable: Enable/Disable csm-authorization
enabled: false
# For Auth 2.0, use v2.0.0 as configVersion
configVersion: v1.11.0
- name: resiliency
enabled: false
# modules:
# - name: authorization
# # enable: Enable/Disable csm-authorization
# enabled: false
# # For Auth 2.0, use v2.0.0 as configVersion
# configVersion: v1.11.0
# - name: resiliency
# enabled: false
# - name: replication
# enabled: false
harishp8889 marked this conversation as resolved.
Show resolved Hide resolved
Loading