Skip to content

Commit

Permalink
Merge pull request #2060 from amazeeio/api-redis-password
Browse files Browse the repository at this point in the history
add redis-password
  • Loading branch information
Schnitzel authored Jul 10, 2020
2 parents 112a7e4 + b0612ed commit afee1f7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .lagoon.secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ parameters:
description: Password used for connecting to the keycloak-db
generate: expression
from: "[a-zA-Z0-9]{32}"
- name: API_REDIS_PASSWORD
description: Password used for connecting to the api-redis
generate: expression
from: "[a-zA-Z0-9]{32}"
- name: SAFE_BRANCH
description: Which branch this belongs to, special chars replaced with dashes
required: true
Expand Down Expand Up @@ -99,3 +103,9 @@ objects:
name: opendistro-security-cookie-password
stringData:
OPENDISTRO_SECURITY_COOKIE_PASSWORD: ${OPENDISTRO_SECURITY_COOKIE_PASSWORD}
- kind: Secret
apiVersion: v1
metadata:
name: api-redis-password
stringData:
API_REDIS_PASSWORD: ${API_REDIS_PASSWORD}
5 changes: 5 additions & 0 deletions services/api-redis/.lagoon.app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ objects:
value: ${SERVICE_NAME}
- name: CRONJOBS
value: ${CRONJOBS}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: api-redis-password
key: API_REDIS_PASSWORD
resources:
requests:
cpu: 10m
Expand Down
2 changes: 2 additions & 0 deletions services/api-redis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-lagoon}/redis

ENV REDIS_PASSWORD=admin
5 changes: 5 additions & 0 deletions services/api/.lagoon.app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ objects:
secretKeyRef:
name: api-db-password
key: API_DB_PASSWORD
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: api-redis-password
key: API_REDIS_PASSWORD
- name: SERVICE_NAME
value: ${SERVICE_NAME}
- name: CRONJOBS
Expand Down
3 changes: 2 additions & 1 deletion services/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ ENV NODE_ENV=production \
ELASTICSEARCH_HOST=logs-db-service:9200 \
ELASTICSEARCH_URL=http://logs-db-service:9200 \
KEYCLOAK_API_CLIENT_SECRET=39d5282d-3684-4026-b4ed-04bbc034b61a \
HARBOR_ADMIN_PASSWORD=admin
HARBOR_ADMIN_PASSWORD=admin \
REDIS_PASSWORD=admin

# The API is not very resilient to sudden mariadb restarts which can happen when the api and mariadb are starting
# at the same time. So we have a small entrypoint which waits for mariadb to be fully ready.
Expand Down

0 comments on commit afee1f7

Please sign in to comment.