diff --git a/charts/objecttypen/Chart.yaml b/charts/objecttypen/Chart.yaml index ba413fd..0348113 100644 --- a/charts/objecttypen/Chart.yaml +++ b/charts/objecttypen/Chart.yaml @@ -3,5 +3,12 @@ name: objecttypen description: API om object definities te beheren type: application -version: 1.0.5 -appVersion: 2.1.0 +version: 1.1.0 +appVersion: 2.2.0 + +dependencies: + - name: redis + version: 17.3.14 + repository: https://charts.bitnami.com/bitnami + tags: + - redis diff --git a/charts/objecttypen/templates/configmap.yaml b/charts/objecttypen/templates/configmap.yaml index 6d9632d..e5bfa11 100644 --- a/charts/objecttypen/templates/configmap.yaml +++ b/charts/objecttypen/templates/configmap.yaml @@ -8,6 +8,15 @@ data: DJANGO_SETTINGS_MODULE: {{ .Values.settings.djangoSettingsModule | toString | quote }} ENVIRONMENT: {{ .Values.settings.environment | default (include "objecttypen.fullname" .) }} ALLOWED_HOSTS: "{{ include "objecttypen.fullname" . }},{{ include "objecttypen.fullname" . }}.{{ .Release.Namespace }},{{ .Values.settings.allowedHosts | replace " " "" | toString }}" + {{- if .Values.tags.redis }} + CACHE_DEFAULT: {{ printf "%s-master.%s:6379/0" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }} + CACHE_AXES: {{ printf "%s-master.%s:6379/0" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }} + CACHE_OIDC: {{ printf "%s-master.%s:6379/0" (include "common.names.fullname" .Subcharts.redis) .Release.Namespace | toString | quote }} + {{ else }} + CACHE_DEFAULT: {{ .Values.settings.cache.default | toString | quote }} + CACHE_AXES: {{ .Values.settings.cache.axes | toString | quote }} + CACHE_OIDC: {{ .Values.settings.cache.oidc | toString | quote }} + {{- end }} DB_NAME: {{ .Values.settings.database.name | toString | quote }} DB_HOST: {{ .Values.settings.database.host | toString | quote }} DB_USER: {{ .Values.settings.database.username | toString | quote }} diff --git a/charts/objecttypen/values.yaml b/charts/objecttypen/values.yaml index c49c6fa..77265af 100644 --- a/charts/objecttypen/values.yaml +++ b/charts/objecttypen/values.yaml @@ -1,3 +1,6 @@ +tags: + redis: true + replicaCount: 1 image: @@ -186,6 +189,16 @@ settings: sentry: dsn: "" + # Cache settings, when the redis subchart is enabled these settings will be ignored and caching will default to the redis subchart services. + cache: + # e.g.: + # default: openforms-redis-master-0:6379/0 + # axes: openforms-redis-master-0:6379/0 + # oidc: openforms-redis-master-0:6379/0 + default: "" + axes: "" + oidc: "" + debug: false twoFactorAuthentication: @@ -200,3 +213,19 @@ settings: processes: '' maxRequests: '' harakiri: '' + +################## +# Redis subchart # +################## + +redis: + architecture: standalone + auth: + enabled: false + master: + persistence: + enabled: false + resources: + requests: + cpu: 10m + memory: 20Mi