openfga / helm-charts

Official Helm charts for the OpenFGA project.
https://openfga.dev
Apache License 2.0
24 stars 37 forks source link

feat: include "extraEnvVars" as part of the migration job #135

Closed Oscmage closed 6 months ago

Oscmage commented 6 months ago

Description

From reading the code I see no way of providing the same extraEnvVars as done to the deployment for the migration job. The only way I can see is to directly add datastore.uri as part of the values file which is not something we want since it is a secret and something we want to commit to a git repository. It is from what I've found (please correct me if so) not possible to to use something like ExternalSecret to load the value dynamically rather than hardcoding it in the values file.

I'd like to be able to do something like

We are currently running this version of the chart in production and it works just fine.

openfga:
  extraEnvVars:
    - name: OPENFGA_DATASTORE_URI
      valueFrom:
        secretKeyRef:
          name: openfga-external-secrets
          key: OPENFGA_DATASTORE_URI

but it is currently not picked up by the migration job.

References

How it is done in the deployment file:

https://github.com/openfga/helm-charts/blob/40ea4e1936efb04da540d1d2afe7e6375eedda3f/charts/openfga/templates/deployment.yaml#L326

Review Checklist

linux-foundation-easycla[bot] commented 6 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

Oscmage commented 6 months ago

@ewanharris Make sense, thanks!

Oscmage commented 6 months ago

Resolved merge conflict due to other changes.

jon-whit commented 6 months ago

@Oscmage please don't forget to bump the chartVersion.

Oscmage commented 6 months ago

@Oscmage please don't forget to bump the chartVersion.

Sorry might have gotten lost in the merge.

@jon-whit Do you mean charts/openfga/Chart.yaml version? Did that change now.