From 51a5f0e2761bfbfe24f0c0dd16fc6dbdff9e0547 Mon Sep 17 00:00:00 2001 From: David Burke Date: Wed, 2 Jun 2021 17:33:09 -0400 Subject: [PATCH] Update ingress service name to be web --- README.md | 6 +++--- templates/web/ingress.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c0a152c..b03756a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A generic Django (plus Celery) Helm chart. This chart supports a web plus optional celery and beat deployments. Be prepared to extend it as necessary. -Django settings will be managed by environment variables. `os.getenv` is fine. `django-environ` is nice as well. This chart expects SECRET_KEY and DATABASE_URL variables. +Django settings will be managed by environment variables. `django-environ` works well for this and can parse the DATABASE_URL connection string. This chart expects SECRET_KEY and DATABASE_URL variables. Kubernetes works best when it is able to determine application health. You Django app should have a `/_health/` view such as @@ -22,8 +22,8 @@ urlpatterns = [ # Usage 1. Add our Helm chart repo `helm repo add django https://burke-software.gitlab.io/django-helm-chart/` -2. Review our values.yaml. At a minimum you'll need to set SECRET_KEY. -3. Install the chart `helm install burke-software/django --set databaseURL=your_db --set secretKey=random_string` +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` # Tips diff --git a/templates/web/ingress.yaml b/templates/web/ingress.yaml index c9f7e0f..c38766c 100644 --- a/templates/web/ingress.yaml +++ b/templates/web/ingress.yaml @@ -49,7 +49,7 @@ spec: backend: {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} service: - name: {{ $fullName }} + name: {{ $fullName }}-web port: number: {{ $svcPort }} {{- else }}