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

TT-10045 feat: Add parameter for key hashing algorithm #110

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

jakub-bochenski
Copy link
Contributor

Description

Parametrize the TYK_GW_HASHKEYFUNCTION value

Related Issue

Resolves #109

Motivation and Context

See #109

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.

@caroltyk
Copy link
Collaborator

caroltyk commented Sep 6, 2023

Hi @jakub-bochenski thanks a lot for your contribution, it looks good!

The only thing I'd like to modify is to set a default value so that the chart would be backward compatible with existing values.yaml, like this

{{ .Values.gateway.hashKeyFunction | default "murmur128" }}

@jakub-bochenski
Copy link
Contributor Author

umm.. it's set in the values file already

@jakub-bochenski
Copy link
Contributor Author

@caroltyk bump?

Default values should be specified in values.yaml

In an actual chart, all static default values should live in the values.yaml,
and should not be repeated using the default command (otherwise they would be
redundant). However, the default command is perfect for computed values, which
cannot be declared inside values.yaml.

https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-default-function

@jakub-bochenski
Copy link
Contributor Author

I don't think the test failure is cause by my change

W0912 16:15:18.962970    9700 warnings.go:70] spec.template.spec.containers[0].env[38].name: duplicate name "TYK_GW_SECRET"
Error: INSTALLATION FAILED: failed post-install: job failed: BackoffLimitExceeded

@buraksekili
Copy link
Member

I don't think the test failure is cause by my change

W0912 16:15:18.962970    9700 warnings.go:70] spec.template.spec.containers[0].env[38].name: duplicate name "TYK_GW_SECRET"
Error: INSTALLATION FAILED: failed post-install: job failed: BackoffLimitExceeded

@jakub-bochenski yes, you are right. your changes will not break integration tests. let's re-run it after updating the pr. we recently merged improvements regarding bootstrapping jobs, which might be the reason for the failure.

@caroltyk
Copy link
Collaborator

@caroltyk bump?

Default values should be specified in values.yaml

In an actual chart, all static default values should live in the values.yaml,
and should not be repeated using the default command (otherwise they would be
redundant). However, the default command is perfect for computed values, which
cannot be declared inside values.yaml.

https://helm.sh/docs/chart_template_guide/functions_and_pipelines/#using-the-default-function

Thank you @jakub-bochenski . Thank you for working with us on this. The PR is approved. After some testings it can be merged for next release.

@caroltyk caroltyk changed the title feat: Add parameter for key hashing algorithm TT-10045 feat: Add parameter for key hashing algorithm Sep 12, 2023
@singhpr singhpr merged commit d1af2f8 into TykTechnologies:main Oct 9, 2023
8 of 9 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.

Unable to change key hashing algorithm
4 participants