Open TobyHFerguson opened 3 years ago
This moodle reference shows how to obtain the port from the database secret:
I need more than the port, I need the hostname. This article showed me how I can use the $()
construct to concatenate strings. I think the following might work:
- name: REDIS_PORT
valueFrom:
secretKeyRef:
name: redis-enterprise-database
key: port
- name: REDIS_HOST
valueFrom:
secretKeyRef:
name: redis-enterprise-database
key: service_name
- name: REDIS_ADDR
value: "$(REDIS_HOST):$(REDIS_PORT)"
At the moment the redis database's port is edited into the services.yaml file using a sed script and some kubectl get stuff.
What I want to do is to simply reference the dynamically created port number.
See here for ideas