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

Enable pattern defined pod target #2128

Closed
Dill-Dall opened this issue Dec 19, 2023 · 2 comments
Closed

Enable pattern defined pod target #2128

Dill-Dall opened this issue Dec 19, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Dill-Dall
Copy link

Dill-Dall commented Dec 19, 2023

Cheers :)
Just been looking into mirrord and, thought I should have meanings already...

What do I want:
Feature for pattern matched pod names.

Why:
Pods are auto suffixed, meaning the mirrord.config would need to be updated with a new pod every time

This is kind of relevant, especially when issue -> metalbear-co/mirrord-intellij#219 exist. Where the plugin can't select pod interactively.

{
    "target": {
        "path": {
        # would like the option of defining  di-spring-boot-starter-.* 
        # and mirroring the first match, or mirroring all the matches.
            "pod": "di-spring-boot-starter-5c478ff597-c99pg"
        },
        "namespace": "di-spring-boot-starter"
    },
    "feature": {
        "network": {
            "incoming": {
                "mode": "steal",
                "http_filter": {
                    "header_filter": "X-Playground: thomas"
                }
            },
            "outgoing": true
        },
        "fs" : "read",
        "env" : true
    }

}

Caveat: I´m not sure how one cleanly does debugging when running multiple pods at the same time using mirrord. Can one mirror all the pods at the same time? So that one always catch the request?

@Dill-Dall Dill-Dall added the enhancement New feature or request label Dec 19, 2023
@Razz4780
Copy link
Contributor

Razz4780 commented Dec 19, 2023

Hi!

Seems to me that you can possibly target a deployment instead of the pod. When targeting a deployment, mirrord will impersonate a random pod belonging to it. Does this fix your issue?

About mirroring all of the pods at the same time - it is possible with the operator, which is part of mirrord for Teams (licensed). When running mirrord with the operator, targeting a deployment does exactly this (mirrors all pods instead of a random one).

@Dill-Dall
Copy link
Author

It sure did :) Now I think I've been turned over to mirrord as the defacto k8s debugging tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants