Skip to content

Commit

Permalink
Remove resource_group from secrets.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kahun committed May 29, 2023
1 parent 8941b43 commit 434ee10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions pkg/commons/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ type AWS struct {
}

type AZURE struct {
Credentials AzureCredentials `yaml:"credentials"`
ResourceGroup string `yaml:"resource_group"`
Credentials AzureCredentials `yaml:"credentials"`
}

type GCP struct {
Expand Down
12 changes: 2 additions & 10 deletions pkg/commons/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,7 @@ func EnsureSecretsFile(descriptorFile DescriptorFile, vaultPassword string) erro
if len(credentials) > 0 {
creds := convertStringMapToInterfaceMap(credentials)
creds = convertMapKeysToSnakeCase(creds)
if descriptorFile.InfraProvider == "azure" {
secretMap[descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds, "resource_group": descriptorFile.ClusterID}
} else {
secretMap[descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds}
}
secretMap[descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds}
}

if len(externalRegistry) > 0 {
Expand Down Expand Up @@ -236,11 +232,7 @@ func EnsureSecretsFile(descriptorFile DescriptorFile, vaultPassword string) erro
edited = true
creds := convertStringMapToInterfaceMap(credentials)
creds = convertMapKeysToSnakeCase(creds)
if descriptorFile.InfraProvider == "azure" {
secretMap["secrets"][descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds, "resource_group": descriptorFile.ClusterID}
} else {
secretMap["secrets"][descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds}
}
secretMap["secrets"][descriptorFile.InfraProvider] = map[string]interface{}{"credentials": creds}
}

if secretMap["secrets"]["external_registry"] == nil && len(externalRegistry) > 0 {
Expand Down

0 comments on commit 434ee10

Please sign in to comment.