- update else condition on the line 239 in templates/Deployment - update st-common version from 0.1.10 to 0.1.12 on Chart.yaml file - add gitlab ci/cd pipeline to package the Helm chart into a .tgz. and Publish it to GitLab’s Helm package registry
54 lines
2.3 KiB
YAML
54 lines
2.3 KiB
YAML
{{- /*
|
|
Copyright (c) 2025 Firmansyah Nainggolan. All Rights Reserved.
|
|
SPDX-License-Identifier: APACHE-2.0
|
|
*/}}
|
|
|
|
{{- if and (include "freeradius.createTlsSecret" .) .Values.tls.autoGenerator.certmanager.enabled }}
|
|
{{- if not (eq (include "st-common.capabilities.certManager.apiVersion" .) "false") }}
|
|
{{- $releaseNamespace := include "st-common.names.namespace" . }}
|
|
{{- $clusterDomain := .Values.clusterDomain }}
|
|
{{- $fullname := include "st-common.names.fullname" . }}
|
|
{{- $serviceName := include "st-common.names.fullname" . }}
|
|
{{- $altNames := list (printf "%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc" $serviceName $releaseNamespace) (printf "%s.%s" $serviceName $releaseNamespace) $fullname }}
|
|
{{/*
|
|
{{- $altNames := list (printf "*.%s.%s.svc.%s" $serviceName $releaseNamespace $clusterDomain) (printf "%s.%s.svc" $serviceName $releaseNamespace) (printf "%s.%s" $serviceName $releaseNamespace) $fullname }}
|
|
*/}}
|
|
apiVersion: {{ include "st-common.capabilities.certManager.apiVersion" . }}
|
|
kind: Certificate
|
|
metadata:
|
|
name: {{ include "st-common.names.fullname" . }}-tls
|
|
namespace: {{ include "st-common.names.namespace" . | quote }}
|
|
{{- if .Values.commonAnnotations }}
|
|
annotations: {{- include "st-common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
{{- end }}
|
|
labels: {{- include "st-common.labels.standard" . | nindent 4 }}
|
|
{{- if .Values.commonLabels }}
|
|
{{- include "st-common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
secretName: {{ include "freeradius.tlsSecretName" . }}
|
|
issuerRef:
|
|
group: cert-manager.io
|
|
kind: {{ .Values.tls.autoGenerator.certmanager.issuerKind }}
|
|
name: {{ .Values.tls.autoGenerator.certmanager.issuerName }}
|
|
#name: letsencrypt-prd
|
|
privateKey:
|
|
algorithm: ECDSA
|
|
rotationPolicy: Always
|
|
size: 256
|
|
subject:
|
|
organizations:
|
|
- {{ .Release.Name | quote }}
|
|
organizationalUnits:
|
|
- {{ include "st-common.names.fullname" . }}
|
|
dnsNames:
|
|
- {{ .Values.ingress.hostname | quote }}
|
|
{{- range .Values.ingress.extraHosts }}
|
|
- {{ .name | quote }}
|
|
{{- end }}
|
|
{{- with $altNames }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
--- |