Skip to content

Commit

Permalink
[skip ci] feat: add redis
Browse files Browse the repository at this point in the history
  • Loading branch information
ambersun1234 committed Sep 11, 2024
1 parent 66c1937 commit 7d01de6
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 2 deletions.
7 changes: 5 additions & 2 deletions charts/agh3/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ dependencies:
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 13.0.0
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 20.1.0
- name: common
repository: https://charts.bitnami.com/bitnami
version: 2.19.1
- name: postfix
repository: https://charts.lkc-lab.com
version: 0.1.1
digest: sha256:3b310df8d762e892d379638b90599237b16e36db6c0a48a60bd9fd5102b501cc
generated: "2024-05-27T19:28:29.196989+08:00"
digest: sha256:fb6ba056468f47e486b96134dccb3de190f3525da983e7413f352b5bd6051982
generated: "2024-09-11T12:52:01.457922+08:00"
4 changes: 4 additions & 0 deletions charts/agh3/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ dependencies:
version: 13.0.0
repository: https://charts.bitnami.com/bitnami
condition: rabbitmq.internal.enabled
- name: redis
version: 20.1.0
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
- name: common
version: 2.19.1
repository: https://charts.bitnami.com/bitnami
Expand Down
24 changes: 24 additions & 0 deletions charts/agh3/templates/base/redis-secret.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.redis.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.redis.secret.secretName }}
labels:
{{- include "AGH3.labels" . | nindent 4 }}
type: Opaque
stringData:
password: {{
default
.Values.redis.secret.password
(
include "specify-password"
(
dict
"domain" (default .Values.ingress.host "app.argushack.com")
"token" .Values.keygen.apiToken
"prefix" .Values.redis.secret.secretName
)
)
| quote
}}
{{- end }}
9 changes: 9 additions & 0 deletions charts/agh3/templates/captain/captain-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.redis.enabled }}
- name: REDIS_URL
value: "agh3-redis-master.$(NAMESPACE).svc.cluster.local:6379"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.redis.secret.secretName }}
key: password
{{- end }}
{{- if .Values.captain.secret.superadmin.enabled }}
- name: SUPERADMIN_PASSWORD
valueFrom:
Expand Down
26 changes: 26 additions & 0 deletions charts/agh3/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,32 @@ minio:
- "s3:GetObject"
usersExistingSecrets:
- agh-minio-users-secret
## @section Redis parameters
##
redis:
## @param redis.enabled Enable internal redis
enabled: true
## @skip redis.fullnameOverride
fullnameOverride: redis # remapping chart bitnami/redis -> redis
image:
## @param redis.image.repository Internal Redis image repository
## @param redis.image.tag Internal Redis image tag (immutable tags are recommended)
## @param redis.image.pullPolicy Internal Redis image pull policy
## @param redis.image.pullSecrets Specify docker-registry secret names as an array
repository: docker/bitnami/redis
tag: 6-alpine
pullPolicy: IfNotPresent
pullSecrets: []
secret:
## @param redis.secret.secretName Name of the generated secret
## @param redis.secret.password Redis password
secretName: agh-redis-secret
password: ""
auth:
## @skip redis.auth.existingPasswordSecret
## @skip redis.auth.existingSecretPasswordKey
existingPasswordSecret: agh-redis-secret
existingSecretPasswordKey: password
## @section RabbitMQ parameters
##
rabbitmq:
Expand Down

0 comments on commit 7d01de6

Please sign in to comment.