mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 03:28:43 +00:00
add helm with postgres + docs
This commit is contained in:
@@ -30,7 +30,6 @@ heritage: {{ .Release.Service }}
|
||||
{{ include "infisical.common.metaLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "infisical.labels" -}}
|
||||
{{ include "infisical.matchLabels" . }}
|
||||
{{ include "infisical.common.metaLabels" . }}
|
||||
@@ -57,3 +56,52 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "infisical.postgresService" -}}
|
||||
{{- if .Values.postgresql.fullnameOverride -}}
|
||||
{{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-postgresql" .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "infisical.postgresDBConnectionString" -}}
|
||||
{{- $dbUsername := .Values.postgresql.auth.username -}}
|
||||
{{- $dbPassword := .Values.postgresql.auth.password -}}
|
||||
{{- $dbName := .Values.postgresql.auth.database -}}
|
||||
{{- $serviceName := include "infisical.postgresService" . -}}
|
||||
{{- printf "postgresql://%s:%s@%s:5432/%s" $dbUsername $dbPassword $serviceName $dbName -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a fully qualified redis name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "infisical.redis.fullname" -}}
|
||||
{{- if .Values.redis.fullnameOverride -}}
|
||||
{{- .Values.redis.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.redis.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.redis.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "infisical.redisServiceName" -}}
|
||||
{{- if .Values.redis.fullnameOverride -}}
|
||||
{{- printf "%s-master" .Values.redis.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-master" .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{- define "infisical.redisConnectionString" -}}
|
||||
{{- $password := .Values.redis.auth.password -}}
|
||||
{{- $serviceName := include "infisical.redisServiceName" . -}}
|
||||
{{- printf "redis://default:%s@%s:6379" $password "redis-master" -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user