diff options
| author | Max Resnick <max@ofmax.li> | 2021-10-09 23:07:53 -0700 |
|---|---|---|
| committer | Max Resnick <max@ofmax.li> | 2021-10-09 23:28:41 -0700 |
| commit | bda8a1c25070678e6efd22003e398691404c832f (patch) | |
| tree | 6ad3711b08bf3f8f3ad3577e97243402bad64b79 /grumpy/gitsnapshot/templates | |
| parent | b2630dfd176884f9b33be88f2033b84a1c4dd7cd (diff) | |
| download | grumpy-charts-bda8a1c25070678e6efd22003e398691404c832f.tar.gz | |
feat: switch to kustomize from helm
Diffstat (limited to 'grumpy/gitsnapshot/templates')
| -rw-r--r-- | grumpy/gitsnapshot/templates/NOTES.txt | 21 | ||||
| -rw-r--r-- | grumpy/gitsnapshot/templates/_helpers.tpl | 56 | ||||
| -rw-r--r-- | grumpy/gitsnapshot/templates/cronjob.yaml | 58 | ||||
| -rw-r--r-- | grumpy/gitsnapshot/templates/secrets.yaml | 9 | ||||
| -rw-r--r-- | grumpy/gitsnapshot/templates/tests/test-connection.yaml | 15 |
5 files changed, 0 insertions, 159 deletions
diff --git a/grumpy/gitsnapshot/templates/NOTES.txt b/grumpy/gitsnapshot/templates/NOTES.txt deleted file mode 100644 index 8213fc9..0000000 --- a/grumpy/gitsnapshot/templates/NOTES.txt +++ /dev/null @@ -1,21 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "gitsnapshot.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "gitsnapshot.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "gitsnapshot.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "gitsnapshot.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl port-forward $POD_NAME 8080:80 -{{- end }} diff --git a/grumpy/gitsnapshot/templates/_helpers.tpl b/grumpy/gitsnapshot/templates/_helpers.tpl deleted file mode 100644 index 8b854e5..0000000 --- a/grumpy/gitsnapshot/templates/_helpers.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "gitsnapshot.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "gitsnapshot.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "gitsnapshot.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "gitsnapshot.labels" -}} -app.kubernetes.io/name: {{ include "gitsnapshot.name" . }} -helm.sh/chart: {{ include "gitsnapshot.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "gitsnapshot.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "gitsnapshot.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/grumpy/gitsnapshot/templates/cronjob.yaml b/grumpy/gitsnapshot/templates/cronjob.yaml deleted file mode 100644 index 553a2ce..0000000 --- a/grumpy/gitsnapshot/templates/cronjob.yaml +++ /dev/null @@ -1,58 +0,0 @@ -apiVersion: batch/v1beta1 -kind: CronJob -metadata: - name: {{ include "gitsnapshot.fullname" . }} - labels: -{{ include "gitsnapshot.labels" . | indent 4 }} -spec: - schedule: "*/60 * * * *" - selector: - matchLabels: - app.kubernetes.io/name: {{ include "gitsnapshot.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - jobTemplate: - metadata: - labels: - app.kubernetes.io/name: {{ include "gitsnapshot.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - spec: - template: - spec: - restartPolicy: Never - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 10 }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - command: - - gitsnap - - backup - - /var/lib/git/repositories - - privategit - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - volumeMounts: - - mountPath: /var/lib/git - name: gitolite-storage - readOnly: false - env: - - name: AWS_DEFAULT_REGION - valueFrom: - secretKeyRef: - name: aws-s3-secret - key: AWS_DEFAULT_REGION - - name: AWS_SECRET_ACCESS_KEY - valueFrom: - secretKeyRef: - name: aws-s3-secret - key: AWS_SECRET_ACCESS_KEY - - name: AWS_ACCESS_KEY_ID - valueFrom: - secretKeyRef: - name: aws-s3-secret - key: AWS_ACCESS_KEY_ID - volumes: - - name: gitolite-storage - persistentVolumeClaim: - claimName: gitolite-storage diff --git a/grumpy/gitsnapshot/templates/secrets.yaml b/grumpy/gitsnapshot/templates/secrets.yaml deleted file mode 100644 index b8b42d1..0000000 --- a/grumpy/gitsnapshot/templates/secrets.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: aws-s3-secret -type: Opaque -stringData: - AWS_DEFAULT_REGION: {{ .Values.secrets.awsRegion }} - AWS_SECRET_ACCESS_KEY: {{ .Values.secrets.accessKey }} - AWS_ACCESS_KEY_ID: {{ .Values.secrets.accessKeyId }} diff --git a/grumpy/gitsnapshot/templates/tests/test-connection.yaml b/grumpy/gitsnapshot/templates/tests/test-connection.yaml deleted file mode 100644 index 189529f..0000000 --- a/grumpy/gitsnapshot/templates/tests/test-connection.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: "{{ include "gitsnapshot.fullname" . }}-test-connection" - labels: -{{ include "gitsnapshot.labels" . | indent 4 }} - annotations: - "helm.sh/hook": test-success -spec: - containers: - - name: wget - image: busybox - command: ['wget'] - args: ['{{ include "gitsnapshot.fullname" . }}:{{ .Values.service.port }}'] - restartPolicy: Never |