Skip to content

Conversation

@dklenke
Copy link
Contributor

@dklenke dklenke commented Apr 10, 2025

Description

Adds helm value global.postgres.unsetConnectionEnvVars which allows user to not set any of the following environment variables

TYK_DB_STORAGE_MAIN_TYPE
TYK_DB_STORAGE_MAIN_CONNECTIONSTRING
TYK_DB_STORAGE_ANALYTICS_TYPE
TYK_DB_STORAGE_ANALYTICS_CONNECTIONSTRING
TYK_DB_STORAGE_UPTIME_TYPE
TYK_DB_STORAGE_UPTIME_CONNECTIONSTRING

Related Issue

Closes #403

Motivation and Context

As described in the issue using a postgres database with table sharding currently requires TYK_DB_STORAGE_ANALYTICS_TYPE to be unset.

Test Coverage For This Change

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)
  • Documentation updates or improvements.

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If PRing from your fork, don't come from your master!
  • Make sure you are making a pull request against our master branch (left side). Also, it would be best if you started your change off our latest master.
  • My change requires a change to the documentation.
    • I have manually updated the README(s)/documentation accordingly.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@dklenke dklenke requested a review from a team as a code owner April 10, 2025 12:56
@dklenke dklenke requested review from komalsukhani and removed request for a team April 10, 2025 12:56
@dklenke
Copy link
Contributor Author

dklenke commented Apr 10, 2025

I can add similar options to the other component charts to allow the umbrella chart to better use this setting if that is desired.

@dklenke
Copy link
Contributor Author

dklenke commented Apr 29, 2025

Kustomize will have to do for now :)

helmCharts:
  - name: tyk-dashboard
    releaseName: tyk-dashboard
    version: 3.0.0
    repo: https://helm.tyk.io/public/helm/charts/
    valuesFile: values.yml

patches:
  - target:
      kind: Deployment
      name: dashboard-tyk-dashboard
    patch: |
      apiVersion: apps/v1
      kind: Deployment
      metadata:
        name: dashboard-tyk-dashboard
      spec:
        template:
          spec:
            containers:
            - name: dashboard-tyk-dashboard
              env:
                - name: TYK_DB_STORAGE_ANALYTICS_TYPE
                  $patch: delete

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.

Support for postgres databases with table sharding

1 participant