feat: add letsencrypt support
This commit is contained in:
@@ -395,8 +395,21 @@ data:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: make this configurable
|
issuerName := "letsencrypt-stag"
|
||||||
|
server := getComputedLetsencryptServer(appName)
|
||||||
|
if server == "prod" || server == "production" {
|
||||||
|
issuerName = "letsencrypt-prod"
|
||||||
|
} else if server != "stag" && server != "staging" {
|
||||||
|
return fmt.Errorf("Invalid letsencrypt server config: %s", server)
|
||||||
|
}
|
||||||
|
|
||||||
tls := false
|
tls := false
|
||||||
|
if issuerName == "letsencrypt-stag" {
|
||||||
|
tls = getGlobalLetsencryptEmailStag() != ""
|
||||||
|
}
|
||||||
|
if issuerName == "letsencrypt-prod" {
|
||||||
|
tls = getGlobalLetsencryptEmailProd() != ""
|
||||||
|
}
|
||||||
|
|
||||||
domains := []string{}
|
domains := []string{}
|
||||||
if deployment, ok := deployments["web"]; ok {
|
if deployment, ok := deployments["web"]; ok {
|
||||||
@@ -451,7 +464,7 @@ data:
|
|||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
TLS: tls,
|
TLS: tls,
|
||||||
},
|
},
|
||||||
IssuerName: "letsencrypt-prod",
|
IssuerName: issuerName,
|
||||||
ProcessType: "web",
|
ProcessType: "web",
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user