Skip to content

Commit

Permalink
fix: changing to API convention from runtime (#1794)
Browse files Browse the repository at this point in the history
* fix: changing to API convention from runtime

* Delete kubefirst-kubeconfig
  • Loading branch information
johndietz authored Sep 1, 2023
1 parent 3d7620d commit 3979be7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cmd/aws/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ func createAws(cmd *cobra.Command, args []string) error {
}

if viper.GetString("flags.dns-provider") == "cloudflare" {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken
} else {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = "AWS_Placeholder"
Expand All @@ -1395,7 +1395,7 @@ func createAws(cmd *cobra.Command, args []string) error {
//dns provider secret to be stored in vault for external dns lifecycle
switch dnsProviderFlag {
case "cloudflare":
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken
default:
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = "This is not used, role used instead" //Not strictly used. We use a role in GCP but keeping this here for consistency
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/civo/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ func createCivo(cmd *cobra.Command, args []string) error {
}

if viper.GetString("flags.dns-provider") == "cloudflare" {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken
} else {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CivoToken
Expand All @@ -1263,7 +1263,7 @@ func createCivo(cmd *cobra.Command, args []string) error {
//dns provider secret to be stored in vault for external dns lifecycle
switch dnsProviderFlag {
case "cloudflare":
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken
default:
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CivoToken
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/digitalocean/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ func createDigitalocean(cmd *cobra.Command, args []string) error {
}

if viper.GetString("flags.dns-provider") == "cloudflare" {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken
} else {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = "AWS_Placeholder"
Expand All @@ -1249,7 +1249,7 @@ func createDigitalocean(cmd *cobra.Command, args []string) error {
//dns provider secret to be stored in vault for external dns lifecycle
switch dnsProviderFlag {
case "cloudflare":
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken
default:
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.DigitaloceanToken
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gcp/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ func createGCP(cmd *cobra.Command, args []string) error {
//dns provider secret to be stored in vault for external dns lifecycle
switch dnsProviderFlag {
case "cloudflare":
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken
default:
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = string(a) //Not strictly used. We use a role in GCP but keeping this here for consistency
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/vultr/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -1236,7 +1236,7 @@ func createVultr(cmd *cobra.Command, args []string) error {

if viper.GetString("flags.dns-provider") == "cloudflare" {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareOriginCaIssuerAPIToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = config.CloudflareAPIToken
} else {
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", gitopsDirectoryTokens.ExternalDNSProviderName)] = "AWS_Placeholder"
}
Expand All @@ -1248,7 +1248,7 @@ func createVultr(cmd *cobra.Command, args []string) error {
//dns provider secret to be stored in vault for external dns lifecycle
switch dnsProviderFlag {
case "cloudflare":
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareApiToken
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.CloudflareAPIToken
default:
tfEnvs[fmt.Sprintf("TF_VAR_%s_secret", strings.ToLower(dnsProviderFlag))] = config.VultrToken
}
Expand Down

0 comments on commit 3979be7

Please sign in to comment.