diff --git a/charts/agh3/Chart.lock b/charts/agh3/Chart.lock index b5432552..296ef470 100644 --- a/charts/agh3/Chart.lock +++ b/charts/agh3/Chart.lock @@ -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" diff --git a/charts/agh3/Chart.yaml b/charts/agh3/Chart.yaml index bcb54f98..e194fac1 100644 --- a/charts/agh3/Chart.yaml +++ b/charts/agh3/Chart.yaml @@ -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 diff --git a/charts/agh3/templates/base/redis-secret.yml b/charts/agh3/templates/base/redis-secret.yml new file mode 100644 index 00000000..89eef2e3 --- /dev/null +++ b/charts/agh3/templates/base/redis-secret.yml @@ -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 }} diff --git a/charts/agh3/templates/captain/captain-deployment.yml b/charts/agh3/templates/captain/captain-deployment.yml index 2b85a534..ce717f1e 100644 --- a/charts/agh3/templates/captain/captain-deployment.yml +++ b/charts/agh3/templates/captain/captain-deployment.yml @@ -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: diff --git a/charts/agh3/values.yaml b/charts/agh3/values.yaml index 362a679f..d61af82e 100644 --- a/charts/agh3/values.yaml +++ b/charts/agh3/values.yaml @@ -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: