Skip to content

More granular control on kubefwd resync behavior #277

@benfiola

Description

@benfiola

Background

I'm trying to set up a local development environment - and part of that process includes starting a minikube cluster. It'd be great to automatically launch kubefwd in the background and have it automatically forward all current and future services to my machine for easy access.

Problem

On launch, if kubefwd fails to find matching pods for created services - it'll wait 5 minutes before attempting to re-sync these services.

I attempted to work around this by starting kubefwd in the background while periodically pushing new annotations to all of my services in the hopes that it'd trigger a resync. However, it looks like the update handler for service resources currently is a no-op

Potential Solutions

  • Modify the update handler to call SyncPortForwards(true) though this will probably also require the some sort of debounce logic that exists elsewhere.
  • Make the resync interval configurable (from its hardcoded value of 5 minutes.

If either of these sound good, I'm more than happy to write a PR to implement it. Also, thanks for writing kubefwd - it's really useful!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions