Skip to content

Commit

Permalink
Fix caching Redis configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
bootc committed Nov 29, 2021
1 parent cc35dd5 commit 5634761
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: netbox
version: 4.0.0
version: 4.0.1
appVersion: v3.0.11
description: IP address management (IPAM) and data center infrastructure management (DCIM) tool
home: https://github.com/bootc/netbox-chart
Expand Down
12 changes: 6 additions & 6 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ redis_tasks_password
{{/*
Name of the Secret that contains the Redis cache password
*/}}
{{- define "netbox.cacheRedis.secret" -}}
{{- define "netbox.cachingRedis.secret" -}}
{{- if .Values.redis.enabled -}}
{{ include "netbox.redis.fullname" . }}
{{- else if .Values.cacheRedis.existingSecretName -}}
{{ .Values.cacheRedis.existingSecretName }}
{{- else if .Values.cachingRedis.existingSecretName -}}
{{ .Values.cachingRedis.existingSecretName }}
{{- else -}}
{{ .Values.existingSecret | default (include "netbox.fullname" .) }}
{{- end -}}
Expand All @@ -155,11 +155,11 @@ Name of the Secret that contains the Redis cache password
{{/*
Name of the key in Secret that contains the Redis cache password
*/}}
{{- define "netbox.cacheRedis.secretKey" -}}
{{- define "netbox.cachingRedis.secretKey" -}}
{{- if .Values.redis.enabled -}}
redis-password
{{- else if .Values.cacheRedis.existingSecretName -}}
{{ .Values.cacheRedis.existingSecretKey }}
{{- else if .Values.cachingRedis.existingSecretName -}}
{{ .Values.cachingRedis.existingSecretKey }}
{{- else -}}
redis_cache_password
{{- end -}}
Expand Down
4 changes: 2 additions & 2 deletions templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ spec:
- key: {{ include "netbox.tasksRedis.secretKey" . | quote }}
path: redis_tasks_password
- secret:
name: {{ include "netbox.cacheRedis.secret" . | quote }}
name: {{ include "netbox.cachingRedis.secret" . | quote }}
items:
- key: {{ include "netbox.cacheRedis.secretKey" . | quote }}
- key: {{ include "netbox.cachingRedis.secretKey" . | quote }}
path: redis_cache_password
{{- include "netbox.extraConfig.volumes" . | nindent 12 -}}
- name: netbox-tmp
Expand Down
4 changes: 2 additions & 2 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ spec:
- key: {{ include "netbox.tasksRedis.secretKey" . | quote }}
path: redis_tasks_password
- secret:
name: {{ include "netbox.cacheRedis.secret" . | quote }}
name: {{ include "netbox.cachingRedis.secret" . | quote }}
items:
- key: {{ include "netbox.cacheRedis.secretKey" . | quote }}
- key: {{ include "netbox.cachingRedis.secretKey" . | quote }}
path: redis_cache_password
{{- include "netbox.extraConfig.volumes" . | nindent 8 -}}
- name: netbox-tmp
Expand Down
4 changes: 2 additions & 2 deletions templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ spec:
- key: {{ include "netbox.tasksRedis.secretKey" . | quote }}
path: redis_tasks_password
- secret:
name: {{ include "netbox.cacheRedis.secret" . | quote }}
name: {{ include "netbox.cachingRedis.secret" . | quote }}
items:
- key: {{ include "netbox.cacheRedis.secretKey" . | quote }}
- key: {{ include "netbox.cachingRedis.secretKey" . | quote }}
path: redis_cache_password
{{- include "netbox.extraConfig.volumes" . | nindent 8 -}}
- name: netbox-tmp
Expand Down

0 comments on commit 5634761

Please sign in to comment.