charts/charts/stable/jetbrains-projector/templates/common.yaml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs c9cdfddee8
[multiple] Migrate to common v3 (#1077)
* [unpackerr] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [uptimerobot-prometheus] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [valheim] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [wallabag] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [whoogle] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [wikijs] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [xbackbone] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [youtubedl-material] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [baikal] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [blocky] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [comcast] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [gollum] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [kanboard] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [jetbrains-projector] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [vikunja] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>

* [leaf2mqtt] Migrate to common v3

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
2021-07-08 08:56:38 -04:00

60 lines
2.1 KiB
YAML

{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Use .Values.image.registry if it exists because of jetbrains extremely long registry */}}
{{- if .Values.image.registry -}}
{{- $_ := set .Values.image "repository" (printf "%s/%s" .Values.image.registry .Values.image.repository) -}}
{{- end -}}
{{/* Append the hardcoded volumes */}}
{{- define "jetbrains-projector.hardcodedValues" -}}
persistence:
idea-properties:
enabled: "true"
mountPath: /tmp/idea.properties
subPath: idea.properties
type: "custom"
volumeSpec:
configMap:
name: {{ printf "%v-config" (include "common.names.fullname" .) }}
{{- if .Values.sslGen.enabled }}
certs:
enabled: "true"
mountPath: /tmp/certs
type: "custom"
volumeSpec:
secret:
secretName: {{ required "a secret name is required when sslGen is enabled" .Values.sslGen.certs.secret }}
ssl-properties:
enabled: "true"
mountPath: /tmp/{{ .Values.sslGen.properties.key }}
subPath: {{ .Values.sslGen.properties.key }}
type: "custom"
volumeSpec:
secret:
secretName: {{ default (printf "%s-secrets" (include "common.names.fullname" .)) .Values.sslGen.properties.existingSecret }}
{{- end }}
{{- end -}}
{{- $_ := mergeOverwrite .Values (include "jetbrains-projector.hardcodedValues" . | fromYaml) -}}
{{/* Add the *_PROPERTIES environment variable */}}
{{- $ide := include "jetbrains-projector.ide" . }}
{{- $_ := set .Values.env (printf "%s_PROPERTIES" (upper $ide)) "/tmp/idea.properties" -}}
{{- if .Values.sslGen.enabled -}}
{{/* Add the ssl.properties env var */}}
{{- $_ := set .Values.env "ORG_JETBRAINS_PROJECTOR_SERVER_SSL_PROPERTIES_PATH" (printf "/tmp/%s" .Values.sslGen.properties.key) -}}
{{/* Add the cert file env vars */}}
{{- $_ := set .Values.env "TLS_CRT" .Values.sslGen.certs.crt -}}
{{- $_ := set .Values.env "TLS_KEY" .Values.sslGen.certs.key -}}
{{- end -}}
{{- if not .Values.image.repository -}}
{{- fail "an image is required in .Values.image.repository" -}}
{{- end -}}
{{/* Render the templates */}}
{{ include "common.all" . }}