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-10640 add support for pdb resource for gateway component #141

Closed
wants to merge 2 commits into from

Conversation

rakkhin
Copy link
Contributor

@rakkhin rakkhin commented Oct 20, 2023

Description

As described in #140 having built-in support for PodDisruptionBudget resource will reduce the amount of post-deployment work need to achieve fully highly-available solution.

Testing procedure for the changes:

  1. Deploy single node minikube cluster
  2. Deploy postgresql and redis (I found issues when deploying redis on non-control plane nodes)
  3. Add a second node to the cluster and label it with service=tyk-gateway
  4. Deploy Tyk Gateway with appropriate node selector, gateway.replicaCount set to 2, gateway.pdb.enabled set to true and gateway.pdb.minAvailable or gateway.pdb.maxUnavailable set to 1
  5. Add a third node to minikube cluster and label it with service=tyk-gateway
  6. Drain the second node and observe as Tyk Gateway pods are drained and rescheduled to the third node, one a time
  7. Un-cordon second cluster node
  8. Delete PodDisruptionBudget deployed by Tyk Gateway chart
  9. Drain the third node and observe as Tyk Gateway pods are drained and rescheduled to the second node, all at once

Related Issue

#140

Motivation and Context

It eliminates the need for manual creation of PDB resources in environments with high requirements for HA.

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.

@rakkhin rakkhin requested a review from a team as a code owner October 20, 2023 07:34
@rakkhin rakkhin requested review from komalsukhani and removed request for a team October 20, 2023 07:34
components/tyk-gateway/templates/pdb-gw.yaml Outdated Show resolved Hide resolved
components/tyk-gateway/values.yaml Outdated Show resolved Hide resolved
@komalsukhani
Copy link
Collaborator

@rakkhin PR looks great. Thank you!
One last question: Have you tested this PR? If so, can you just add details how you tested it in the PR description?

@rakkhin
Copy link
Contributor Author

rakkhin commented Oct 23, 2023

@komalsukhani I've updated the description with testing procedure.

@komalsukhani
Copy link
Collaborator

@rakkhin Thank you so much!
I will add this PR to our backlog. I'll let you know when it is scheduled for release.

Also, we don't merge the PR unless QA tests it. So once PR is scheduled for release and tested by our QA we will merge it.

@caroltyk caroltyk changed the title add support for pdb resource for gateway component TT-10649 add support for pdb resource for gateway component Nov 28, 2023
@caroltyk caroltyk changed the title TT-10649 add support for pdb resource for gateway component TT-10640 add support for pdb resource for gateway component Nov 28, 2023
@caroltyk
Copy link
Collaborator

Hi @rakkhin , thank you for the updates. This PR is scheduled for testing and release in v1.3.0 (tentatively at Jan 2024)

@komalsukhani
Copy link
Collaborator

@rakkhin Sorry for delay.
We have tested your PR. It works. Can you resolve the merge conflicts so we can merge?

Also, we have renamed tyk-mdcb-data-plane to tyk-data-plane. So you need to update values of tyk-data-plane instead.

@komalsukhani
Copy link
Collaborator

Can you also update values of tyk-control-plane chart?

@komalsukhani
Copy link
Collaborator

@rakkhin I created new PR #230 to resolve merge conflicts. Closing this PR in favour of it.
Your change will be available in the upcoming release. Thank you for your contribution.

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