mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-20 07:01:04 +00:00
Refactor code-server templates: Add secret, headless-service, scripts, persistantvolumeclaim, configmap, certificate, and service templates
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{{- if not (empty .Values.repositories) -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ printf "%s-scripts" (include "code-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "code-server.labels" . | nindent 4 }}
|
||||
data:
|
||||
repo-updater.sh: |
|
||||
#!/bin/sh
|
||||
|
||||
# update the given repository
|
||||
update() {
|
||||
if [ ! -d "$1/.git" ]
|
||||
then
|
||||
git clone "$2" "$1"
|
||||
else
|
||||
cd "$1" && git fetch && git pull "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
# list of repositories to update
|
||||
{{- range $i, $repo := .Values.repositories }}
|
||||
update "{{ $repo.name }}" "{{ $repo.url }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user