You've already forked reposilite-charts
Initial Commit
Some checks failed
Helm / helm-lint (push) Successful in 17s
Helm / helm-unittest (push) Successful in 17s
Markdown linter / markdown-link-checker (push) Failing after 21s
Markdown linter / markdown-lint (push) Failing after 15s
Generate README / generate-parameters (push) Successful in 28s
Some checks failed
Helm / helm-lint (push) Successful in 17s
Helm / helm-unittest (push) Successful in 17s
Markdown linter / markdown-link-checker (push) Failing after 21s
Markdown linter / markdown-lint (push) Failing after 15s
Generate README / generate-parameters (push) Successful in 28s
This commit is contained in:
75
templates/_deployment.tpl
Normal file
75
templates/_deployment.tpl
Normal file
@ -0,0 +1,75 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/* annotations */}}
|
||||
|
||||
{{- define "reposilite.deployment.annotations" -}}
|
||||
{{ include "reposilite.annotations" . }}
|
||||
{{- if .Values.deployment.annotations }}
|
||||
{{ toYaml .Values.deployment.annotations }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
|
||||
{{/* env */}}
|
||||
|
||||
{{- define "reposilite.deployment.reposilite.env" -}}
|
||||
{{- $env := .Values.deployment.reposilite.env | default list }}
|
||||
{{- if .Values.persistentVolumeClaim.enabled }}
|
||||
{{- $env = concat $env (list (dict "name" "REPOSILITE_DATA" "value" .Values.persistentVolumeClaim.path )) }}
|
||||
{{- end }}
|
||||
{{ toYaml (dict "env" $env) }}
|
||||
{{- end -}}
|
||||
|
||||
REPOSILITE_DATA
|
||||
|
||||
{{/* image */}}
|
||||
|
||||
{{- define "reposilite.deployment.images.reposilite.fqin" -}}
|
||||
{{- $registry := .Values.deployment.reposilite.image.registry -}}
|
||||
{{- $repository := .Values.deployment.reposilite.image.repository -}}
|
||||
{{- $tag := default .Chart.AppVersion .Values.deployment.reposilite.image.tag -}}
|
||||
{{- printf "%s/%s:%s" $registry $repository $tag -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* labels */}}
|
||||
|
||||
{{- define "reposilite.deployment.labels" -}}
|
||||
{{ include "reposilite.labels" . }}
|
||||
{{- if .Values.deployment.labels }}
|
||||
{{ toYaml .Values.deployment.labels }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/* serviceAccount */}}
|
||||
|
||||
{{- define "reposilite.deployment.serviceAccount" -}}
|
||||
{{- if .Values.serviceAccount.existing.enabled -}}
|
||||
{{- printf "%s" .Values.serviceAccount.existing.serviceAccountName -}}
|
||||
{{- else -}}
|
||||
{{- include "reposilite.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
||||
{{/* volumeMounts */}}
|
||||
|
||||
{{- define "reposilite.deployment.reposilite.volumeMounts" -}}
|
||||
{{- $volumeMounts := .Values.deployment.reposilite.volumeMounts | default list }}
|
||||
{{- if .Values.persistentVolumeClaim.enabled }}
|
||||
{{- $volumeMounts = concat $volumeMounts (list (dict "name" "data" "mountPath" .Values.persistentVolumeClaim.path )) }}
|
||||
{{- end }}
|
||||
{{ toYaml (dict "volumeMounts" $volumeMounts) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/* volumes */}}
|
||||
|
||||
{{- define "reposilite.deployment.volumes" -}}
|
||||
{{- $volumes := .Values.deployment.volumes | default list }}
|
||||
|
||||
{{- if and .Values.persistentVolumeClaim.enabled (not .Values.persistentVolumeClaim.existing.enabled) }}
|
||||
{{- $persistentVolumeClaimName := include "reposilite.persistentVolumeClaim.name" $ -}}
|
||||
{{- $volumes = concat $volumes (list (dict "name" "data" "persistentVolumeClaim" (dict "claimName" $persistentVolumeClaimName))) }}
|
||||
{{- end }}
|
||||
|
||||
{{ toYaml (dict "volumes" $volumes) }}
|
||||
|
||||
{{- end -}}
|
Reference in New Issue
Block a user