fix: ensure the ingress class is properly set for certificate usage
Without this, switching to nginx ingress fails as the cluster issuer isn't properly configured
This commit is contained in:
@@ -149,16 +149,18 @@ func applyClusterIssuers(ctx context.Context) error {
|
|||||||
clusterIssuerValues := ClusterIssuerValues{
|
clusterIssuerValues := ClusterIssuerValues{
|
||||||
ClusterIssuers: map[string]ClusterIssuer{
|
ClusterIssuers: map[string]ClusterIssuer{
|
||||||
"letsencrypt-stag": {
|
"letsencrypt-stag": {
|
||||||
Email: letsencryptEmailStag,
|
Email: letsencryptEmailStag,
|
||||||
Enabled: letsencryptEmailStag != "",
|
Enabled: letsencryptEmailStag != "",
|
||||||
Name: "letsencrypt-stag",
|
IngressClass: getGlobalIngressClass(),
|
||||||
Server: "https://acme-staging-v02.api.letsencrypt.org/directory",
|
Name: "letsencrypt-stag",
|
||||||
|
Server: "https://acme-staging-v02.api.letsencrypt.org/directory",
|
||||||
},
|
},
|
||||||
"letsencrypt-prod": {
|
"letsencrypt-prod": {
|
||||||
Email: letsencryptEmailProd,
|
Email: letsencryptEmailProd,
|
||||||
Enabled: letsencryptEmailProd != "",
|
Enabled: letsencryptEmailProd != "",
|
||||||
Name: "letsencrypt-prod",
|
IngressClass: getGlobalIngressClass(),
|
||||||
Server: "https://acme-v02.api.letsencrypt.org/directory",
|
Name: "letsencrypt-prod",
|
||||||
|
Server: "https://acme-v02.api.letsencrypt.org/directory",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -496,7 +498,7 @@ func getComputedImagePullSecrets(appName string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getGlobalIngressClass() string {
|
func getGlobalIngressClass() string {
|
||||||
return common.PropertyGetDefault("scheduler-k3s", "global", "ingress-class", DefaultIngressClass)
|
return common.PropertyGetDefault("scheduler-k3s", "--global", "ingress-class", DefaultIngressClass)
|
||||||
}
|
}
|
||||||
|
|
||||||
func getIngressAnnotations(appName string, processType string) (map[string]string, error) {
|
func getIngressAnnotations(appName string, processType string) (map[string]string, error) {
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ func TriggerSchedulerDeploy(scheduler string, appName string, imageTag string) e
|
|||||||
},
|
},
|
||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
Network: GlobalNetwork{
|
Network: GlobalNetwork{
|
||||||
IngressClass: common.PropertyGetDefault("scheduler-k3s", "--global", "ingress-class", DefaultIngressClass),
|
IngressClass: getGlobalIngressClass(),
|
||||||
PrimaryPort: primaryPort,
|
PrimaryPort: primaryPort,
|
||||||
},
|
},
|
||||||
Secrets: map[string]string{},
|
Secrets: map[string]string{},
|
||||||
|
|||||||
Reference in New Issue
Block a user