added chart
This commit is contained in:
parent
537e43a9f4
commit
f94c26e29b
17 changed files with 542 additions and 0 deletions
4
charts/django-nginx-uwsgi/0.4.4/templates/NOTES.txt
Normal file
4
charts/django-nginx-uwsgi/0.4.4/templates/NOTES.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
This chart "{{ template "name" . }}" details a deploy which contains three pods:
|
||||
1. Application
|
||||
2. Nginx container
|
||||
2. Proxy to SQL instance of GCE
|
||||
24
charts/django-nginx-uwsgi/0.4.4/templates/_helpers.tpl
Normal file
24
charts/django-nginx-uwsgi/0.4.4/templates/_helpers.tpl
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{{/* vim: set filetype=mustache: */}}
|
||||
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "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).
|
||||
*/}}
|
||||
{{- define "fullname" -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default release name truncated at 63 chars.
|
||||
*/}}
|
||||
{{- define "releasename" -}}
|
||||
{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
{{- if .Values.cronjob.enabled }}
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-migrations
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
concurrencyPolicy: Forbid
|
||||
failedJobsHistoryLimit: 1
|
||||
successfulJobsHistoryLimit: 1
|
||||
schedule: "{{ .Values.cronjob.schedule }}"
|
||||
suspend: {{ .Values.cronjob.suspend }}
|
||||
jobTemplate:
|
||||
spec:
|
||||
backoffLimit: 1
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- args:
|
||||
{{- if .Values.cronjob.migrations.enabled }}
|
||||
- launch-migrations
|
||||
{{- else }}
|
||||
- echo
|
||||
- "Job done"
|
||||
{{- end }}
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ .Release.Name }}
|
||||
- secretRef:
|
||||
name: {{ .Release.Name }}
|
||||
env:
|
||||
{{- if .Values.app.deployment.pgBouncer.enabled }}
|
||||
- name: DATABASE_HOST
|
||||
value: {{ .Values.global.cloudSql.host }}
|
||||
- name: DATABASE_PORT
|
||||
value: "{{ .Values.global.configMap.databasePort }}"
|
||||
{{- end }}
|
||||
{{- if .Values.global.databaseController.secret.shared }}
|
||||
- name: DATABASE_NAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.global.databaseController.secret.name }}-{{ .Release.Name }}
|
||||
key: database-name
|
||||
- name: DATABASE_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.global.databaseController.secret.name }}-{{ .Release.Name }}
|
||||
key: database-user
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.global.databaseController.secret.name }}-{{ .Release.Name }}
|
||||
key: database-password
|
||||
{{- end }}
|
||||
image: {{ .Values.global.image.uwsgi }}:{{ .Values.global.image.tag }}
|
||||
imagePullPolicy: Always
|
||||
name: {{ .Release.Name }}-migrations
|
||||
resources:
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 100Mi
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue