From 6a9b266751a9c3d1667b559ad8965075fde4401c Mon Sep 17 00:00:00 2001 From: David Burke Date: Wed, 26 May 2021 19:43:23 -0400 Subject: [PATCH] work check in --- Chart.yaml | 4 ++-- README.md | 4 ++-- templates/configmap.yaml | 3 +-- templates/pre-install-job.yaml | 8 ++++++-- templates/secrets.yaml | 1 - values-sample.yaml | 18 ------------------ values.yaml | 28 ++++++++++++++-------------- 7 files changed, 25 insertions(+), 41 deletions(-) delete mode 100644 values-sample.yaml diff --git a/Chart.yaml b/Chart.yaml index ffc30e9..bd485f0 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: glitchtip -description: Open source error tracking that is compatible with Sentry +name: django +description: Generic Django + Celery Helm Chart # A chart can be either an 'application' or a 'library' chart. # diff --git a/README.md b/README.md index 7e5b512..76de6a3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# GlitchTip Helm Chart +# Django Helm Chart We use this chart internally. However it's not fully documented yet nor tested in a wide range of scenarios. If you are a helm and kubernetes expert - feel free to use this and help contribute to this repo. @@ -6,5 +6,5 @@ If you are a helm and kubernetes expert - feel free to use this and help contrib # Usage 1. Add our Helm chart repo `helm repo add glitchtip https://glitchtip.gitlab.io/glitchtip-helm-chart/` -2. Review our values.yaml. At a minimum you'll need to set databaseURL and secretKey. +2. Review our values.yaml. At a minimum you'll need to set DATABASE_URL and SECRET_KEY. 3. Install the chart `helm install glitchtip/glitchtip --set databaseURL=your_db --set secretKey=random_string` diff --git a/templates/configmap.yaml b/templates/configmap.yaml index b291e1f..70f8c56 100644 --- a/templates/configmap.yaml +++ b/templates/configmap.yaml @@ -9,5 +9,4 @@ metadata: data: {{- range $k, $v := .Values.env.normal }} {{ $k }}: {{ $v | quote }} -{{- end }} - DATABASE_URL: {{ include "django.postgresql.url" . | quote }} \ No newline at end of file +{{- end }} \ No newline at end of file diff --git a/templates/pre-install-job.yaml b/templates/pre-install-job.yaml index 85f8a36..d3c2d79 100644 --- a/templates/pre-install-job.yaml +++ b/templates/pre-install-job.yaml @@ -15,6 +15,10 @@ spec: activeDeadlineSeconds: 600 template: spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} restartPolicy: Never containers: - name: pre-install-job @@ -26,10 +30,10 @@ spec: value: "False" {{- if .Values.env.secret.DATABASE_URL }} - name: DATABASE_URL - value: {{ required "env.secret.DATABASE_URL is a required value." .Values.env.secret.DATABASE_URL }} + value: {{ .Values.env.secret.DATABASE_URL }} {{- else if .Values.postgresql.enabled }} - name: DATABASE_URL value: {{ include "django.postgresql.url" . | b64enc | quote }} {{- end }} - name: SECRET_KEY - value: {{ required "secretKey is a required value." .Values.secretKey }} + value: {{ required "env.secret.SECRET_KEY is a required value." .Values.env.secret.SECRET_KEY }} diff --git a/templates/secrets.yaml b/templates/secrets.yaml index e9974f2..b8aff3f 100644 --- a/templates/secrets.yaml +++ b/templates/secrets.yaml @@ -9,7 +9,6 @@ data: {{- range $k, $v := .Values.env.secret }} {{ $k }}: {{ $v | b64enc | quote }} {{- end }} - SECRET_KEY: {{ required "secretKey is a required value." .Values.secretKey | b64enc | quote }} {{- if .Values.redis.enabled }} REDIS_URL: {{ include "django.redis.url" . | b64enc | quote }} {{- end }} diff --git a/values-sample.yaml b/values-sample.yaml deleted file mode 100644 index df6c311..0000000 --- a/values-sample.yaml +++ /dev/null @@ -1,18 +0,0 @@ -web: - hpa: - enabled: true - resources: - limits: - cpu: 1000m - memory: 512Mi - requests: - cpu: 100m - memory: 128Mi - -worker: - hpa: - enabled: true - -environmentVariables: - ENABLE_SOCIAL_AUTH: true - GLITCHTIP_DOMAIN: https://staging.glitchtip.com diff --git a/values.yaml b/values.yaml index ee44a93..cd449b2 100644 --- a/values.yaml +++ b/values.yaml @@ -3,7 +3,7 @@ # Declare variables to be passed into your templates. image: - repository: glitchtip/glitchtip + repository: glitchtip/glitchtip # Demo app, change this. tag: latest pullPolicy: Always @@ -11,10 +11,10 @@ imagePullSecrets: [] nameOverride: "" fullnameOverride: "" -secretKey: env: normal: [] secrets: [] + # SECRET_KEY: # DATABASE_URL: # REDIS_URL: @@ -38,18 +38,18 @@ web: memory: 128Mi nodeSelector: {} tolerations: [] - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app.kubernetes.io/instance - operator: In - values: - - glitchtip-prod-web - topologyKey: kubernetes.io/hostname + affinity: [] + # podAntiAffinity: + # preferredDuringSchedulingIgnoredDuringExecution: + # - weight: 100 + # podAffinityTerm: + # labelSelector: + # matchExpressions: + # - key: app.kubernetes.io/instance + # operator: In + # values: + # - glitchtip-prod-web + # topologyKey: kubernetes.io/hostname livenessProbe: failureThreshold: 5 initialDelaySeconds: 5