Skip to content

Apply template on all keys of operatorconfiguration #2608

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

Merged
merged 1 commit into from
May 10, 2024

Conversation

LordGaav
Copy link
Contributor

This allows one to specify go templates in every setting applied to the OperatorConfiguration. This in turn allows me to do something like this:

global:
    s3:
        endpoint: https://s3.example.com
        access_key_id: xxx
        secret_access_key: xxx
        bucket: xxx
postgres-operator:
    configLogicalBackup:
        logical_backup_s3_endpoint: '{{ .Values.global.s3.endpoint }}'
        logical_backup_s3_access_key_id: '{{ .Values.global.s3.access_key_id }}'
        logical_backup_s3_secret_access_key: '{{ .Values.global.s3.secret_access_key }}'
        logical_backup_s3_bucket: '{{ .Values.global.s3.bucket }}'
some-other-chart:
    some-other-key: '{{ .Values.global.s3.bucket }}'

I applied tpl to all keys, because even though I only required logical backup for my use case, I see no reason to not add this to all keys.

@LordGaav LordGaav force-pushed the add-tpl-on-all-operator-config branch from 1cbec11 to b1d7319 Compare April 14, 2024 12:53
@FxKu FxKu added this to the 1.12.0 milestone Apr 24, 2024
@FxKu
Copy link
Member

FxKu commented Apr 24, 2024

👍

1 similar comment
@idanovinda
Copy link
Member

👍

@FxKu FxKu merged commit 8ee5231 into zalando:master May 10, 2024
1 check passed
@FxKu
Copy link
Member

FxKu commented May 10, 2024

Thanks @LordGaav for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants