See changelog
This commit is contained in:
parent
af39eedea8
commit
74288199f6
9
CHANGELOG.md
Normal file
9
CHANGELOG.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
No release is stable. Do not use in production.
|
||||
|
||||
# Unreleased
|
||||
|
||||
# 1.0.0
|
||||
|
||||
- Add volume mounts
|
||||
- Latest major postgres/redis versions
|
||||
- Rename preInstall to migrateJob
|
|
@ -1,9 +1,9 @@
|
|||
dependencies:
|
||||
- name: postgresql
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 12.1.15
|
||||
version: 15.5.16
|
||||
- name: redis
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 17.3.18
|
||||
digest: sha256:51da30e025c538b229b1cfaba062c53dea8bf3f520fca460c6afc294c58bdc76
|
||||
generated: "2023-02-22T20:26:38.305910383-05:00"
|
||||
version: 19.6.1
|
||||
digest: sha256:5e21575062cdcef4e947b4f89741e95138d93207f91d5074d53397d9c414f0a1
|
||||
generated: "2024-07-15T13:58:06.767935373-04:00"
|
||||
|
|
|
@ -14,7 +14,7 @@ type: application
|
|||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
version: 0.3.1
|
||||
version: 1.0.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application.
|
||||
|
@ -22,10 +22,10 @@ appVersion: 1.0.0
|
|||
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: ~12.1.2
|
||||
version: ^15.5.16
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: postgresql.enabled
|
||||
- name: redis
|
||||
version: ~17.3.11
|
||||
version: ^19.6.1
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: redis.enabled
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# Django Helm Chart
|
||||
|
||||
A generic Django (plus Celery) Helm chart.
|
||||
A generic Django (plus Celery) Helm chart demonstration. Do not use directly in production.
|
||||
|
||||
Contributions are welcome as merge requests. Please only open issues that you'd like to implement yourself or fund. Do not open support or feature requests. This chart is **not** intended to cover every use case with Django and Helm. It's a personal project that you are welcome to view and fork. Breaking changes to your workflow may happen at any time and without warning.
|
||||
Contributions may be accepted as merge requests. Be respectful of my time. I will not review if I do not have time. Fork the project instead. Please only open issues that you'd like to implement yourself or fund. Do not open support or feature requests. This chart is **not** intended to cover every use case with Django and Helm. It's a personal project that you are welcome to view and fork. Breaking changes to your workflow may happen at any time and without warning.
|
||||
|
||||
# Preparing your Django app
|
||||
|
||||
|
@ -39,6 +39,8 @@ Remember that Kubernetes "args" are Docker's CMD (or command). Pretty confusing!
|
|||
|
||||
# Usage
|
||||
|
||||
Use only for demonstration purposes. Fork the repo for production.
|
||||
|
||||
1. Add our Helm chart repo `helm repo add django https://gitlab.com/api/v4/projects/26807467/packages/helm/stable`
|
||||
2. Review our values.yaml. At a minimum you'll need to set env.secret.SECRET_KEY and env.secret.DATABASE_URL.
|
||||
3. Install the chart `helm install your-app django/django -f your-values.yml`
|
||||
|
@ -56,6 +58,7 @@ I suggest either
|
|||
- Keep them in a values.yml file in a private repo
|
||||
- Make use of --reuse-values and --set
|
||||
- Keep them in a non helm chart managed service
|
||||
- Use the opentofu helm provider, with a secure state backend or encrypted state.
|
||||
|
||||
## Deploying in CI
|
||||
|
||||
|
@ -69,3 +72,5 @@ Maintaining this chart takes time. Considering supporting it by
|
|||
- Check out [GlitchTip](https://glitchtip.com) error tracking, which is where this project started
|
||||
|
||||
Commercial support is available - email info@burkesoftware.com
|
||||
|
||||
If you want the scope of this project to include more, such as better merge request review or stable releases. You should consider forking it, talk to me about being a maintainer, or fund it.
|
||||
|
|
Binary file not shown.
BIN
charts/postgresql-15.5.16.tgz
Normal file
BIN
charts/postgresql-15.5.16.tgz
Normal file
Binary file not shown.
Binary file not shown.
BIN
charts/redis-19.6.1.tgz
Normal file
BIN
charts/redis-19.6.1.tgz
Normal file
Binary file not shown.
|
@ -62,6 +62,10 @@ spec:
|
|||
{{- end }}
|
||||
- configMapRef:
|
||||
name: {{ include "django.fullname" . }}
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.beat.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -74,5 +78,9 @@ spec:
|
|||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{- if .Values.preInstall.enabled -}}
|
||||
{{- if .Values.migrationJob.enabled -}}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "django.fullname" . }}
|
||||
name: {{ include "django.fullname" . }}-migrate
|
||||
labels:
|
||||
{{- include "django.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
|
@ -13,8 +13,12 @@ metadata:
|
|||
checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||
tag: "{{ .Values.image.tag }}"
|
||||
spec:
|
||||
activeDeadlineSeconds: {{ default 900 .Values.preInstall.activeDeadlineSeconds }}
|
||||
activeDeadlineSeconds: {{ default 900 .Values.migrationJob.activeDeadlineSeconds }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/component: migrate-job
|
||||
{{- include "django.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
|
@ -25,15 +29,15 @@ spec:
|
|||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: pre-install-job
|
||||
- name: migrate-job
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.preInstall.resources }}
|
||||
resources: {{ toYaml .Values.preInstall.resources | nindent 12 }}
|
||||
{{- if .Values.migrationJob.resources }}
|
||||
resources: {{ toYaml .Values.migrationJob.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
command: ["./manage.py","migrate"]
|
||||
command: {{ .Values.migrationJob.command | default (list "./manage.py" "migrate") | toJson }}
|
||||
env:
|
||||
- name: DEBUG
|
||||
value: "False"
|
||||
|
@ -45,7 +49,7 @@ spec:
|
|||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "django.postgresql.fullname" . }}
|
||||
name: {{ default (include "django.postgresql.fullname" .) .Values.postgresql.auth.existingSecret }}
|
||||
key: postgres-password
|
||||
{{- end }}
|
||||
- name: SECRET_KEY
|
||||
|
@ -57,4 +61,12 @@ spec:
|
|||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "django.fullname" . }}
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -83,6 +83,10 @@ spec:
|
|||
{{- end }}
|
||||
- configMapRef:
|
||||
name: {{ include "django.fullname" . }}
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.web.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -95,3 +99,7 @@ spec:
|
|||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
|
@ -66,6 +66,10 @@ spec:
|
|||
{{- end }}
|
||||
- configMapRef:
|
||||
name: {{ include "django.fullname" . }}
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml . | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- with .Values.worker.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -78,4 +82,8 @@ spec:
|
|||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -11,14 +11,14 @@ imagePullSecrets: []
|
|||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
preInstall:
|
||||
migrationJob:
|
||||
enabled: true
|
||||
command: [] # Default ./manage.py migrate
|
||||
activeDeadlineSeconds: 900
|
||||
resources:
|
||||
limits: {}
|
||||
requests: {}
|
||||
|
||||
|
||||
env:
|
||||
normal: {}
|
||||
secret: {}
|
||||
|
@ -27,6 +27,8 @@ env:
|
|||
# REDIS_URL:
|
||||
|
||||
existingSecret: ""
|
||||
extraVolumeMounts: []
|
||||
extraVolumes: []
|
||||
|
||||
web:
|
||||
replicaCount: 2
|
||||
|
|
Loading…
Reference in a new issue