Skip to content

Add valueFrom capability for PostgreSQL parameters #1672

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

Closed

Conversation

bleleve
Copy link

@bleleve bleleve commented Nov 4, 2021

Hi,

This PR allow the use of valueFrom into spec.postgresql.parameters, e.g.:

apiVersion: acid.zalan.do/v1
kind: postgresql
metadata:
  name: my-cluster
spec:
  ...
  postgresql:
    version: '13'
    parameters:
      'custom.my_setting_1':
        value: 'TEST'
      'custom.my_setting_2':
        valueFrom:
          configMapKeyRef:
            name: custom-pg-config
            key: MY_SETTING_2	
      'custom.my_setting_3':
        valueFrom:
          secretKeyRef:
            name: custom-pg-secrets
            key: MY_SETTING_3	  
  ...

It is useful in the context of a CI/CD, and also in combination with the PR #1667.

Best regards.

bleleve pushed a commit to hexa-solutions/postgres-operator that referenced this pull request Nov 4, 2021
@bleleve bleleve marked this pull request as ready for review November 5, 2021 01:36
@FxKu
Copy link
Member

FxKu commented Nov 16, 2021

@bleleve like I said in #1667 at the moment there's no intention to change the type of the parameters field from map[string]string to map[string]Object. Maybe we can think of another way to pass custom config options to Postgres config...

@bleleve
Copy link
Author

bleleve commented Nov 16, 2021

Hi @FxKu,

There is no problem, I have adapted the operator to my needs, it is up to you to take what seems relevant to you.

Take care of yourself.

@FxKu
Copy link
Member

FxKu commented Apr 4, 2022

I believe, #1794 goes in this direction as well, so I'm closing this PR.

@FxKu FxKu closed this Apr 4, 2022
@FxKu FxKu added this to the 1.8 milestone Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants