fix: correct issues in certificate generation

This commit is contained in:
Jose Diaz-Gonzalez
2024-01-23 06:18:25 -05:00
parent a9e6e96697
commit c8f5ad9029
3 changed files with 8 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ const (
type ProcessWeb struct {
Domains []string `yaml:"domains,omitempty"`
PortMaps []ProcessPortMap `yaml:"port_maps,omitempty"`
TLS bool `yaml:"tls"`
TLS ProcessTls `yaml:"tls"`
}
type ProcessResourcesMap struct {

View File

@@ -1,6 +1,6 @@
{{- $processName := "PROCESS_NAME" }}
{{- $config := .Values.processes.PROCESS_NAME }}
{{- if and $config.web.tls $config.domains }}
{{- if and $config.web.tls.enabled $config.web.domains }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
@@ -16,7 +16,7 @@ metadata:
spec:
issuerRef:
kind: ClusterIssuer
name: {{ $config.tls.issuer_name }}
name: {{ $config.web.tls.issuer_name }}
secretName: tls-{{ $.Values.global.app_name }}-{{ $processName }}
secretTemplate:
annotations:
@@ -24,9 +24,8 @@ spec:
labels:
app.kubernetes.io/name: {{ $.Values.global.app_name }}-{{ $processName }}
app.kubernetes.io/part-of: {{ $.Values.global.app_name }}
status: {}
dnsNames:
{{- range $config.domains }}
{{- range $config.web.domains }}
- {{ . }}
{{- end }}
{{- end }}

View File

@@ -378,7 +378,10 @@ func TriggerSchedulerDeploy(scheduler string, appName string, imageTag string) e
processValues.Web = ProcessWeb{
Domains: domains,
PortMaps: []ProcessPortMap{},
TLS: tls,
TLS: ProcessTls{
Enabled: tls,
IssuerName: issuerName,
},
}
processValues.ProcessType = ProcessType_Web
for _, portMap := range portMaps {