Skip to content

Commit 43c45a0

Browse files
parikshithbnirs
authored andcommitted
remove cluster names from sample config
We dont need users to specify cluster names anymore since managed cluster names will be auto detected and hub cluster name will always be hub. Also removed cluster name lookup from envfile since drenv conf will not have cluster names anymore. These changes are due to feature added in ramen/e2e: - RamenDR/ramen#1866 Signed-off-by: Parikshith <parikshithb@gmail.com>
1 parent a199ddb commit 43c45a0

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

pkg/config/config.go

-6
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,8 @@ func ReadConfig(filename string) (*types.Config, error) {
6262

6363
type Sample struct {
6464
CommandName string
65-
HubName string
6665
HubKubeconfig string
67-
PrimaryName string
6866
PrimaryKubeconfig string
69-
SecondaryName string
7067
SecondaryKubeconfig string
7168
}
7269

@@ -97,11 +94,8 @@ func createFile(name string, content []byte) error {
9794
func defaultSample(commandName string) *Sample {
9895
return &Sample{
9996
CommandName: commandName,
100-
HubName: "hub",
10197
HubKubeconfig: "hub/config",
102-
PrimaryName: "primary",
10398
PrimaryKubeconfig: "primary/config",
104-
SecondaryName: "secondary",
10599
SecondaryKubeconfig: "secondary/config",
106100
}
107101
}

pkg/config/envfile.go

-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,8 @@ func sampleFromEnvFile(envFile, commandName string) (*Sample, error) {
5151
}
5252
return &Sample{
5353
CommandName: commandName,
54-
HubName: envConfig.Ramen.Hub,
5554
HubKubeconfig: envConfig.KubeconfigPath(envConfig.Ramen.Hub),
56-
PrimaryName: envConfig.Ramen.Clusters[0],
5755
PrimaryKubeconfig: envConfig.KubeconfigPath(envConfig.Ramen.Clusters[0]),
58-
SecondaryName: envConfig.Ramen.Clusters[1],
5956
SecondaryKubeconfig: envConfig.KubeconfigPath(envConfig.Ramen.Clusters[1]),
6057
}, nil
6158
}

pkg/config/sample.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
# clusters names and path to the kubeconfig file.
66
clusters:
77
hub:
8-
name: {{.HubName}}
98
kubeconfig: {{.HubKubeconfig}}
109
c1:
11-
name: {{.PrimaryName}}
1210
kubeconfig: {{.PrimaryKubeconfig}}
1311
c2:
14-
name: {{.SecondaryName}}
1512
kubeconfig: {{.SecondaryKubeconfig}}
1613

1714
## Git repository for test command.

0 commit comments

Comments
 (0)