Skip to content

Commit

Permalink
Merge pull request #1 from unikorn-cloud/client_certificate
Browse files Browse the repository at this point in the history
Add Generic Client Certificate Flags
  • Loading branch information
spjmurray authored Aug 12, 2024
2 parents 78e4c2d + 7d37e4f commit 35eb2fd
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
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.6
version: v0.1.7

icon: https://raw.githubusercontent.com/unikorn-cloud/assets/main/images/logos/dark-on-light/icon.png
26 changes: 26 additions & 0 deletions charts/unikorn-common/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,23 @@ where you want to use ACME, but don't want to make is widely structed by browser
{{- end }}
{{- end }}
{{/*
Unified X.509 client certificate.
This is used by services to authenticate against identity in order to grant an
oauth2 token for use with other services.
*/}}
{{- define "unikorn.clientCertificate.secretNamespace" -}}
{{- if (and .Values.clientCertificate .Values.clientCertificate.secretNamespace) -}}
{{- .Values.clientCertificate.secretNamespace }}
{{- end }}
{{- end }}
{{- define "unikorn.clientCertificate.secretName" -}}
{{- if (and .Values.clientCertificate .Values.clientCertificate.secretName) -}}
{{- .Values.clientCertificate.secretName }}
{{- end }}
{{- end }}
{{/*
Unified service definitions.
These are typically used by services that rely on other services to function
Expand Down Expand Up @@ -230,3 +247,12 @@ As all components use the same client libraries, they have the same flags.
- --region-ca-secret-name={{ $name }}
{{- end }}
{{- end }}
{{- define "unikorn.clientCertificate.flags" -}}
{{- with $namespace := ( include "unikorn.clientCertificate.secretNamespace" . ) }}
- --client-certificate-namespace={{ $namespace }}
{{- end }}
{{- with $name := ( include "unikorn.clientCertificate.secretName" . ) }}
- --client-certificate-name={{ $name }}
{{- end }}
{{- end }}

0 comments on commit 35eb2fd

Please sign in to comment.