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

Add feature gate support to helm chart

Open thefirstofthe300 opened this issue 1 year ago • 3 comments

It would be really nice if the Helm chart supported feature gates. Currently, there is no way to inject a custom env value into the chart manifest so feature gates are essentially non-operable.

thefirstofthe300 avatar Apr 08 '24 09:04 thefirstofthe300

This feature is also wanted here ;p We would like to add proxy settings via Env variable to the manager deployement for pgo

jbperrin88 avatar Jun 06 '24 07:06 jbperrin88

Sounds reasonable to me to have a way to add env vars to the Helm chart -- I'm making a ticket in our backlog for it, but I'd also welcome a PR if anyone wants to take a swing at it.

benjaminjb avatar Jun 06 '24 20:06 benjaminjb

I just came across this issue when trying to enable AutoGrow volumes. I've added a PR which addresses the problem with a number of potential ways to solve.

I'd like to ask that the chart version also be disconnected from the PGO version. That will ensure that folks that use gitops tools like flux are able to pick up the change because of the bumped chart version.

jaitaiwan avatar Jun 28 '24 10:06 jaitaiwan

Hey folks I wanted to highlight patches that are something that you can use to patch the helm charts after generation using kustomize while you wait for the associated PR fix.

Here's an example patch I'm using for adding a feature flag:

patches:
- patch: |-
    - op: add
      path: /spec/template/spec/containers/0/env/-
      value:
        name: PGO_FEATURE_GATES
        value: AutoGrowVolumes=true
  target:
    group: apps
    version: v1
    kind: Deployment
    name: pgo

You can find more information about patches here. If you're using flux gitops like me then here's a link to that too in the meantime.

I also found this post very useful to understand how to modify maps and arrays.

jaitaiwan avatar Aug 30 '24 11:08 jaitaiwan