aboutsummaryrefslogtreecommitdiff
path: root/grumpy/gitolite/templates/gitolite-deployment.yaml
diff options
context:
space:
mode:
authorMax Resnick <max@ofmax.li>2020-01-01 14:18:41 -0800
committerMax Resnick <max@ofmax.li>2020-01-20 16:23:01 -0800
commit109fad80f323567d6751c9f51e20dd41582d43bf (patch)
tree66b5f0b3c5f147badfbc3f596b089baf11cb10b6 /grumpy/gitolite/templates/gitolite-deployment.yaml
parent584857f515ab6fe30530d25483869ed517e9575d (diff)
downloadgrumpy-charts-109fad80f323567d6751c9f51e20dd41582d43bf.tar.gz
add gitolite from orginal author, minor improvements
Diffstat (limited to 'grumpy/gitolite/templates/gitolite-deployment.yaml')
-rw-r--r--grumpy/gitolite/templates/gitolite-deployment.yaml96
1 files changed, 96 insertions, 0 deletions
diff --git a/grumpy/gitolite/templates/gitolite-deployment.yaml b/grumpy/gitolite/templates/gitolite-deployment.yaml
new file mode 100644
index 0000000..14aceaa
--- /dev/null
+++ b/grumpy/gitolite/templates/gitolite-deployment.yaml
@@ -0,0 +1,96 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ template "gitolite.fullname" . }}
+ labels:
+ heritage: {{ .Release.Service | quote }}
+ release: {{ .Release.Name | quote }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ component: "{{ .Release.Name }}-{{ .Values.Name }}"
+spec:
+ replicas: 1
+ strategy:
+ type: RollingUpdate
+ selector:
+ matchLabels:
+ component: "{{ .Release.Name }}-{{ .Values.Component }}"
+ template:
+ metadata:
+ labels:
+ app: {{ template "gitolite.fullname" . }}
+ heritage: {{ .Release.Service | quote }}
+ release: {{ .Release.Name | quote }}
+ chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+ component: "{{ .Release.Name }}-{{ .Values.Component }}"
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- if .Values.NodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.NodeSelector | indent 8 }}
+ {{- end }}
+ {{- if .Values.Tolerations }}
+ tolerations:
+{{ toYaml .Values.Tolerations | indent 8 }}
+ {{- end }}
+ containers:
+ - name: {{ template "gitolite.fullname" . }}
+ image: "{{ .Values.Image }}:{{ .Values.ImageTag }}"
+ #command:
+ # - tail
+ # - -f
+ # - /dev/null
+
+ imagePullPolicy: "{{ .Values.ImagePullPolicy }}"
+ env:
+ - name: SSH_KEY
+ value: "{{ default "" .Values.SSH_KEY}}"
+ - name: SSH_KEY_NAME
+ value: "{{ default "admin" .Values.SSH_KEY_NAME}}"
+ - name: UMASK
+ value: "0027"
+ ports:
+ - containerPort: {{ .Values.ContainerPort }}
+ name: ssh
+ resources:
+ requests:
+ cpu: "{{ .Values.Cpu }}"
+ memory: "{{ .Values.Memory }}"
+ volumeMounts:
+{{- if .Values.Persistence.mounts }}
+{{ toYaml .Values.Persistence.mounts | indent 12 }}
+{{- end }}
+ -
+ mountPath: /etc/ssh/keys
+ name: gitolite-ssh-keys
+ readOnly: false
+ -
+ mountPath: /var/lib/git
+ name: gitolite-git
+ readOnly: false
+ initContainers:
+ - name: setup
+ image: busybox
+ command:
+ - "chmod"
+ - "755"
+ - "/var/lib/git"
+ volumeMounts:
+ -
+ mountPath: /var/lib/git
+ name: gitolite-git
+ readOnly: false
+ volumes:
+ - name: gitolite-ssh-keys
+ persistentVolumeClaim:
+ claimName: {{ .Values.Persistence.SshKeys.ExistingClaim | default (include "gitolite.claimname.ssh-keys" .) }}
+ - name: gitolite-git
+ {{- if .Values.Persistence.Git.ExistingClaim }}
+ persistentVolumeClaim:
+ claimName: {{ .Values.Persistence.Git.ExistingClaim | default (include "gitolite.claimname.git" .) }}
+ {{- else }}
+ emptyDir: {}
+ {{- end -}}
+