Skip to content
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

feat: more flexibility for defining corsAllowedHeaders and oidc.issuer #186

Conversation

devops-42
Copy link
Contributor

Description

This PR introduces the usage of the common.tplvalues.render helper function to give more flexibility when deploying the chart in multiple environments.

References

No reference yet.

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above] -> No doc section available for the deployment template
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected -> No unittests available, but tested manually

…nd oidc issuer when deploying the chart in multiple environments
@devops-42 devops-42 requested review from a team as code owners January 20, 2025 11:08
Copy link

linux-foundation-easycla bot commented Jan 20, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@whoisxx
Copy link
Contributor

whoisxx commented Jan 24, 2025

Thank you for the PR!
Is there a specific need to use Go templates in corsAllowedOrigins or issuer, or are you suggesting it for improvement?

@devops-42
Copy link
Contributor Author

Thank you for the PR! Is there a specific need to use Go templates in corsAllowedOrigins or issuer, or are you suggesting it for improvement?

I suggest it for improvement: We'd like to include the chart asva subchart to deploy it in different environments. Parts of the URI strings for corsAllowedOrigins and issuer may vary.
Using the Go template like proposed in this PR would simplify our deployments: We would only need to maintain one values file having templated URI strings for corsAllowedOrigins and issuer in the according configuration section. An example configuration would look like this.

values.yaml:

http:
  corsAllowedOrigins: 
     - 'http://my.cors.{{ .Values.deploy.env }}.domain.tld'
     - 'https://my.cors.{{ .Values.deploy.env }}.domain.tld'

Assuming, the chart would be deployed in a staging environment, the according part in the deployment.yaml would be rendered like this:

[...]
- name: OPENFGA_HTTP_CORS_ALLOWED_ORIGINS
  value: http://my.cors.staging.domain.tld,https://my.cors.staging.domain.tld
[...]

whoisxx
whoisxx previously approved these changes Jan 27, 2025
@rhamzeh rhamzeh changed the title [Enhancement] More flexibility for defining corsAllowedHeaders and oidc.issuer feat: more flexibility for defining corsAllowedHeaders and oidc.issuer Jan 28, 2025
@devops-42 devops-42 requested a review from a team as a code owner January 29, 2025 08:29
@devops-42 devops-42 dismissed stale reviews from jeremy-albuixech and whoisxx via a0a6963 January 30, 2025 10:08
@jeremy-albuixech jeremy-albuixech merged commit c39438a into openfga:main Jan 31, 2025
4 checks passed
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.

3 participants