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

refactor: Split the agent and api controllers #446

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

jonstacks
Copy link
Collaborator

What

Splits the agent and API controllers into their own managers and k8s deployments. This separates the data path from the API configuration path so that one or the other can easily be turned on or off and scaled independently. This also helps with providing an upgrade path from the ngrok Ingress Controller to the new ngrok operator.

How

  • Move the helm make commands into the Helm Chart
  • The main manager is now the API manager.
  • Remove the tunnel controller and driver from the api manager
  • Create a new agent manager which has only the tunnel controller
  • Wire it all up in helm with some basic options. This is the MVP part, we can go through and add additional options for the agent deployment like a separate PDB, different image tag, etc as we go

Breaking Changes

There should not be. This should be a passive change.

@jonstacks jonstacks self-assigned this Oct 11, 2024
@jonstacks jonstacks requested a review from a team as a code owner October 11, 2024 13:57
@github-actions github-actions bot added documentation Improvements or additions to documentation area/controller Issues dealing with the controller area/helm-chart Issues dealing with the helm chart labels Oct 11, 2024
cmd/agent/main.go Outdated Show resolved Hide resolved
docs/deployment-guide/migrating.md Show resolved Hide resolved

### Overview

Previously, in the ngrok Ingress Controller, the Tunnel Controller(non leader-elected) ran under the same manager as the rest of the API controllers(leader-elected). This did not allow users to independetly scale the data forwarding and API management features. Going forward, we will be splitting the Tunnel Controller into its own manager so that it can be scaled independently of the rest of the controllers. This will allow users to scale the data forwarding and API management features independently.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I like the historical context, but I feel that the history should come after the present.

Perhaps this paragraph can be 2 paragraphs:

  1. The current architectural intent with 2 deployments
  2. The historical reasoning

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that format. This will change again once we include the bindings forwarder. I think I'm going to leave it for now since it will get changed soon and reword it for current state once we have the bindings piece

Splits the agent and API controllers into their own managers and k8s
deployments. This separates the data path from the API configuration
path so that one or the other can easily be turned on or off and scaled
independently.
@jonstacks jonstacks merged commit b566f6b into ngrok:main Oct 15, 2024
8 checks passed
@jonstacks jonstacks deleted the agent-api-split branch October 15, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controller Issues dealing with the controller area/helm-chart Issues dealing with the helm chart documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants