-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix (#2644) - Add json tags to InfrastructureRole struct #2659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
May I ask you to rebase your branch to resolve the conflict and also test this with configuring via configmap? |
I have used both - infrastructure_roles_secret_name: postgresql-infrastructure-roles-oncall
infrastructure_roles_secrets:
- secretname: "postgresql-infrastructure-roles"
userkey: "username"
passwordkey: "password"
rolekey: "roles" apiVersion: v1
data:
username: YmF0bWFu
password: anVzdGljZQ==
roles: cGdfcmVhZF9hbGxfZGF0YQ==
kind: Secret
metadata:
name: postgresql-infrastructure-roles
namespace: postgres-operator
type: Opaque
---
apiVersion: v1
data:
ironman: bWFydmVs
kind: Secret
metadata:
name: postgresql-infrastructure-roles-oncall
namespace: postgres-operator
type: Opaque
---
apiVersion: v1
kind: ConfigMap
metadata:
name: postgresql-infrastructure-roles-oncall
namespace: postgres-operator
data:
ironman: |
inrole: [pg_write_all_data]
user_flags:
- login
- superuser
--- And both got created. |
I mean configuring the operator with a configmap and put this setting in there:
And in the deployment this configmap needs to be referenced. Can you test this? Then we are good to go. Maybe you did and I've only misunderstood you. |
With the configmap approach, it is always trying to look for the secret in the default namespace - ConfigMap values - infrastructure_roles_secret_name: postgresql-infrastructure-roles-oncall
infrastructure_roles_secrets: "secretname:postgres-operator.postgresql-infrastructure-roles,userkey:username,passwordkey:password,rolekey:roles" Logs - time="2024-06-11T13:30:13Z" level=warning msg="could not get infrastructure roles: could not get infrastructure roles secret default/postgres-operator.postgresql-infrastructure-roles: secrets \"postgres-operator.postgresql-infrastructure-roles\" not found" pkg=controller Edit: infrastructure_roles_secret_name: postgresql-infrastructure-roles-oncall
infrastructure_roles_secrets: "secretname:postgres-operator/postgresql-infrastructure-roles,userkey:username,passwordkey:password,rolekey:roles" Then it is working. |
Thanks @hemakshis for testing. LGTM then 😃 |
👍 |
👍 |
Use
json
instead ofname
tags.