diff --git a/charts/unikorn-common/Chart.yaml b/charts/unikorn-common/Chart.yaml index 573f946..3afbfef 100644 --- a/charts/unikorn-common/Chart.yaml +++ b/charts/unikorn-common/Chart.yaml @@ -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 diff --git a/charts/unikorn-common/templates/_helpers.tpl b/charts/unikorn-common/templates/_helpers.tpl index bc6e5cb..ed495d1 100644 --- a/charts/unikorn-common/templates/_helpers.tpl +++ b/charts/unikorn-common/templates/_helpers.tpl @@ -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 }} @@ -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 }} @@ -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.