diff --git a/internal/controller/cluster.go b/internal/controller/cluster.go index 3c1387a9..01d5ed90 100644 --- a/internal/controller/cluster.go +++ b/internal/controller/cluster.go @@ -285,6 +285,7 @@ func (clctrl *ClusterController) CreateTokens(kind string) interface{} { MetaphorDevelopmentIngressURL: fmt.Sprintf("metaphor-development.%s", fullDomainName), MetaphorStagingIngressURL: fmt.Sprintf("metaphor-staging.%s", fullDomainName), MetaphorProductionIngressURL: fmt.Sprintf("metaphor-production.%s", fullDomainName), + OriginIssuerIsEnabled: cl.CloudflareAuth.OriginCaIssuerKey != "", } return metaphorTemplateTokens } diff --git a/internal/router/api/v1/cluster.go b/internal/router/api/v1/cluster.go index 78f0289f..a4daea7c 100644 --- a/internal/router/api/v1/cluster.go +++ b/internal/router/api/v1/cluster.go @@ -327,6 +327,7 @@ func PostCreateCluster(c *gin.Context) { clusterDefinition.GoogleAuth = cluster.GoogleAuth clusterDefinition.K3sAuth = cluster.K3sAuth clusterDefinition.GitAuth = cluster.GitAuth + clusterDefinition.CloudflareAuth = cluster.CloudflareAuth } } diff --git a/pkg/providerConfigs/detokenize.go b/pkg/providerConfigs/detokenize.go index 86213192..21e03f7a 100644 --- a/pkg/providerConfigs/detokenize.go +++ b/pkg/providerConfigs/detokenize.go @@ -303,6 +303,7 @@ func detokenizeGitopsMetaphor(tokens *MetaphorTokenValues) filepath.WalkFunc { newContents = strings.ReplaceAll(newContents, "", tokens.MetaphorDevelopmentIngressURL) newContents = strings.ReplaceAll(newContents, "", tokens.MetaphorProductionIngressURL) newContents = strings.ReplaceAll(newContents, "", tokens.MetaphorStagingIngressURL) + newContents = strings.ReplaceAll(newContents, "", fmt.Sprintf("%t", tokens.OriginIssuerIsEnabled)) err = os.WriteFile(path, []byte(newContents), 0) if err != nil { diff --git a/pkg/providerConfigs/types.go b/pkg/providerConfigs/types.go index a2c56eb5..cb1def5b 100644 --- a/pkg/providerConfigs/types.go +++ b/pkg/providerConfigs/types.go @@ -109,4 +109,5 @@ type MetaphorTokenValues struct { MetaphorDevelopmentIngressURL string MetaphorProductionIngressURL string MetaphorStagingIngressURL string + OriginIssuerIsEnabled bool }