postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

Apply template on all keys of operatorconfiguration

Open LordGaav opened this issue 1 year ago • 1 comments

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 avatar Apr 14 '24 12:04 LordGaav

:+1:

FxKu avatar Apr 24 '24 06:04 FxKu

👍

idanovinda avatar May 10 '24 14:05 idanovinda

Thanks @LordGaav for your contribution.

FxKu avatar May 10 '24 14:05 FxKu