Skip to content

Commit

Permalink
Add Production Templates
Browse files Browse the repository at this point in the history
In particular better handling of cluster issuers and the inclusion of
external DNS.
  • Loading branch information
spjmurray committed Jun 19, 2024
1 parent 516e476 commit 78e4c2d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/unikorn-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: Unikorn common templates to keep dependent charts in check.

type: application

version: v0.1.5
version: v0.1.6

icon: https://raw.githubusercontent.com/unikorn-cloud/assets/main/images/logos/dark-on-light/icon.png
29 changes: 22 additions & 7 deletions charts/unikorn-common/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ OTLP support.
Used to configure tracing across all components.
*/}}
{{- define "unikorn.otlp.flags" -}}
{{- $otlp := .Values.otlp }}
{{- $otlp := .Values.otlp -}}
{{- if ( and .Values.global .Values.global.otlp ) -}}
{{- $otlp = .Values.global.otlp }}
{{- end }}
{{- if $otlp }}
{{- $otlp = .Values.global.otlp -}}
{{- end -}}
{{- if $otlp -}}
{{- with $endpoint := $otlp.endpoint }}
- --otlp-endpoint={{ $endpoint }}
{{- end }}
Expand All @@ -103,11 +103,11 @@ Used to lock down APIs to specific clients.
{{- $cors := .Values.cors -}}
{{- if ( and .Values.global .Values.global.cors ) -}}
{{- $cors = .Values.global.cors -}}
{{- end }}
{{- if $cors }}
{{- end -}}
{{- if $cors -}}
{{- range $origin := $cors.allowOrigin }}
- --cors-allow-origin={{ $origin }}
{{- end }}
{{- end -}}
{{- with $maxAge := $cors.maxAge }}
- --cors-max-age={{ $maxAge }}
{{- end }}
Expand Down Expand Up @@ -137,6 +137,21 @@ This is used by Ingress resources to define the single source of TLS authority.
{{- end }}
{{- end }}

{{- define "unikorn.ingress.clusterIssuer.annotations" -}}
{{- with $issuer := (include "unikorn.ingress.clusterIssuer" .) -}}
cert-manager.io/cluster-issuer: {{ $issuer }}
{{- end }}
{{- end }}

{{/*
Unified DDNS.
*/}}
{{- define "unikorn.ingress.externalDNS" -}}
{{- if (and .Values.global .Values.global.ingress .Values.global.ingress.externalDNS) -}}
{{- .Values.global.ingress.externalDNS }}
{{- end }}
{{- end }}

{{/*
Unified X.509 authority.
This is used by services to get access to a self-signed TLS CA.
Expand Down

0 comments on commit 78e4c2d

Please sign in to comment.