Using read only replica for reader role #299
sidnaik-ai
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the below configuration .
however i want to pass the read replica ip also via the secret hackathon-db-read-credentials usign secret template
PQ_URL: "host={{.Host}} user={{.Role}} password={{.Password}} dbname={{.Database}}"
however i don't know easy easy way of passing the read replica ip from operator .
can i pass it in POSTGRES_URI_ARGS by setting it to read replica ip in operator k8 secret and then using
"host={{.POSTGRES_URI_ARGS}} user={{.Role}} password={{.Password}} dbname={{.Database}}"
what should i use for .POSTGRES_URI_ARGS ?
will it cause any issue if i populate POSTGRES_URI_ARG with read replica ip ? i believe its not used ?
apiVersion: db.movetokube.com/v1alpha1
kind: Postgres
metadata:
name: hackathon-db
spec:
masterRole: hackathon-db-owner
database: hackathon-db
apiVersion: db.movetokube.com/v1alpha1
kind: PostgresUser
metadata:
name: hackathon-db-reader
spec:
role: hackathon-db-reader
database: hackathon-db
privileges: "READ" # For read group privileges
secretName: hackathon-db-read-credentials
apiVersion: db.movetokube.com/v1alpha1
kind: PostgresUser
metadata:
name: hackathon-db-writer
spec:
role: hackathon-db-writer
database: hackathon-db
privileges: "WRITE" # For write group privileges
secretName: hackathon-db-write-credentials
Beta Was this translation helpful? Give feedback.
All reactions