diff --git a/README.md b/README.md index 2313e8c..b80c46e 100644 --- a/README.md +++ b/README.md @@ -284,7 +284,7 @@ python3 manage.py axes_reset_username [USERNAME] To temporary disable privacy mode to see the blocked ip in the log you can login to the container and add the following setting: -```bas +```bash echo "AXES_SENSITIVE_PARAMETERS = []" >>settings.py ``` diff --git a/charts/wger/Chart.yaml b/charts/wger/Chart.yaml index 0b55cad..4c5ce8e 100644 --- a/charts/wger/Chart.yaml +++ b/charts/wger/Chart.yaml @@ -1,6 +1,6 @@ --- apiVersion: v2 -version: 0.2.0 +version: 0.2.1-rc.1 appVersion: latest name: wger description: A Helm chart for Wger installation on Kubernetes diff --git a/charts/wger/templates/_helpers.tpl b/charts/wger/templates/_helpers.tpl index 9f675e9..96a41df 100644 --- a/charts/wger/templates/_helpers.tpl +++ b/charts/wger/templates/_helpers.tpl @@ -36,7 +36,7 @@ environment: value: "{{ .Release.Name }}-postgres" - name: DJANGO_DB_PORT value: {{ int .Values.postgres.service.port | quote }} - # django cache + # cache - name: DJANGO_CACHE_BACKEND value: "django_redis.cache.RedisCache" - name: DJANGO_CACHE_LOCATION @@ -45,6 +45,8 @@ environment: value: "django_redis.client.DefaultClient" - name: DJANGO_CACHE_TIMEOUT value: {{ int .Values.app.django.cache.timeout | default "1296000" | quote }} + - name: EXERCISE_CACHE_TTL + value: "18000" # django general {{- if .Values.ingress.enabled }} - name: SITE_URL @@ -103,8 +105,6 @@ environment: - name: GUNICORN_CMD_ARGS value: "--timeout 240 --workers 4 --worker-class gthread --threads 3 --forwarded-allow-ips * --proxy-protocol True --access-logformat='%(h)s %(l)s %({client-ip}i)s %(l)s %({x-real-ip}i)s %(l)s %({x-forwarded-for}i)s %(l)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\"' --access-logfile - --error-logfile -" {{- end }} - - name: EXERCISE_CACHE_TTL - value: "18000" # Users won't be able to contribute to exercises if their account age is # lower than this amount in days. - name: MIN_ACCOUNT_AGE_TO_TRUST @@ -135,10 +135,6 @@ environment: value: {{ .Values.celery.syncVideos | default "True" | quote }} - name: DOWNLOAD_INGREDIENTS_FROM value: {{ .Values.celery.ingredientsFrom | default "WGER" | quote }} - - name: CELERY_BROKER - value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" - - name: CELERY_BACKEND - value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" {{- end }} {{- end }} diff --git a/charts/wger/templates/deployment.yaml b/charts/wger/templates/deployment.yaml index 884251b..e65719c 100644 --- a/charts/wger/templates/deployment.yaml +++ b/charts/wger/templates/deployment.yaml @@ -74,6 +74,15 @@ spec: secretKeyRef: name: "redis" key: "redis-password" + - name: CELERY_BROKER + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + {{- else }} + - name: CELERY_BROKER + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" {{- end }} {{- if .Values.celery.flower.enabled }} - name: CELERY_FLOWER_PASSWORD @@ -245,6 +254,15 @@ spec: secretKeyRef: name: "redis" key: "redis-password" + - name: CELERY_BROKER + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + {{- else }} + - name: CELERY_BROKER + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" {{- end }} {{- if .Values.celery.flower.enabled }} - name: CELERY_FLOWER_PASSWORD @@ -305,6 +323,15 @@ spec: secretKeyRef: name: "redis" key: "redis-password" + - name: CELERY_BROKER + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + {{- else }} + - name: CELERY_BROKER + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" {{- end }} - name: CELERY_FLOWER_PASSWORD valueFrom: @@ -426,6 +453,15 @@ spec: secretKeyRef: name: "redis" key: "redis-password" + - name: CELERY_BROKER + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://:$(DJANGO_CACHE_CLIENT_PASSWORD)@{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + {{- else }} + - name: CELERY_BROKER + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" + - name: CELERY_BACKEND + value: "redis://{{ .Release.Name }}-redis:{{ int .Values.redis.service.serverPort }}/2" {{- end }} {{- if .Values.celery.flower.enabled }} - name: CELERY_FLOWER_PASSWORD diff --git a/example/prod_values.yaml b/example/prod_values.yaml index 72ec03e..2694c25 100644 --- a/example/prod_values.yaml +++ b/example/prod_values.yaml @@ -50,7 +50,7 @@ app: - name: FROM_EMAIL value: "fit@example.com" - name: DJANGO_ADMINS - value: "SysAdmin, admin@test.com + value: "SysAdmin, admin@test.com" - name: GUNICORN_CMD_ARGS value: "--timeout 240 --workers 2 --worker-class gthread --threads 3 --forwarded-allow-ips * --proxy-protocol True --access-logformat='%(h)s %(l)s %({client-ip}i)s %(l)s %({x-real-ip}i)s %(l)s %({x-forwarded-for}i)s %(l)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\"' --access-logfile - --error-logfile -"