Hi everyoneI would like to share some doubt that I have with you.
I am trying to deploy kong
from their latest helm chart version
I also want to use kong.env
parameters in order to reference a mapping of my postgres secrets value instead of apply directly the values in the command. I mean, this way:
kong:
env:
pg_user: kong
pg_password:
valueFrom:
secretKeyRef:
key: kong
name: postgres
Before to deploy the chart, I have created manually the kong postgres secrets of this way:
apiVersion: v1
kind: Secret
metadata:
name: zcrm-kong-secrets
namespace: kong
type: Opaque
data:
username: <my-encoded-username-value>
password: <my-encoded-password-value>
host: <my-encoded-host-value>
database: <my-encoded-database-name-value>
So this is my helm command to deploy the chart … (I have a doubt here if I am setting correctly the secretes value in secretKeyRef)
⟩ helm install --name kong stable/kong --version 0.17.0 --set ingressController.enabled=true,proxy.loadBalancerIP=<my-ipV4-address>,image.pullPolicy=Always,postgresql.enabled=false,env.database=postgres,kong.env.pg_user.valueFrom.secretKeyRef.key=username,kong.env.pg_user.valueFrom.secretKeyRef.name=zcrm-kong-secrets,kong.env.pg_password.valueFrom.secretKeyRef.key=password,kong.env.pg_password.valueFrom.secretKeyRef.name=zcrm-kong-secrets,kong.env.pg_host.valueFrom.secretKeyRef.key=host,kong.env.pg_host.valueFrom.secretKeyRef.name=zcrm-kong-secrets,kong.env.pg_database.valueFrom.secretKeyRef.key=database,kong.env.pg_database.valueFrom.secretKeyRef.name=zcrm-kong-secrets --namespace kong
Everything looks ok, but when I check the pods status, they are in Init status, but looks like they are waiting for the db.
I have checked the pod/kong-kong-controller-c9d755c86-f4q8x
logs and I get this:
kubectl logs pod/kong-kong-controller-c9d755c86-f4q8x -n kong -c wait-for-db
Run with --v (verbose) or --vv (debug) for more details
waiting for db
Error: [PostgreSQL error] failed to retrieve server_version_num: connection refused
Does it look like the Kong container can’t reach postgres at the host that I have defined?
I have a doubt with the way in I am mapping the secrets value in the helm install
command above.
Someone know what could be happening?