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

Support injection for applications with statefulset but no deployment. #91

Open
snyderpa-owl opened this issue Nov 30, 2022 · 6 comments

Comments

@snyderpa-owl
Copy link

snyderpa-owl commented Nov 30, 2022

I have a fairly simple use-case but struggling to work out the series of commands to make this happen. In a dev environment with several namespaces each serving a php web app declared using a statefulset configuration, I want to reverse forward port 9003 to my local xdebug client. I expect

ktunnel inject deployment <name_of_statefulset> 9003 -v
INFO[0000] Injecting tunnel sidecar to default/owl-app  
FATA[0001] failed injecting sidecar: deployments.apps "owl-app" not found 

to use the existing statefulset or for ktunnel to provide an ktunnel inject statefulset command.

If there is a workaround or a supported way to accomplish this, help would be appreciated.

Thanks.

@omrikiei
Copy link
Owner

omrikiei commented Dec 2, 2022

Hi @snyderpa-owl, the current implementation doesn't support injecting to StatefulSets, what you can do is expose a service with the port with the ktunnel expose and then direct your php application's xdebug remote host to the address of the exposed service

@snyderpa-owl
Copy link
Author

snyderpa-owl commented Dec 2, 2022

Thanks @omrikiei here is what I am trying -- can you help me get past this?

% ktunnel expose -v xdebug 9003:9003
FATA[0001] Failed to expose local machine as a service: error creating deployment 
% ktunnel expose -v xdebug 9003     
FATA[0001] Failed to expose local machine as a service: error creating deployment 

I am able to create a simple deployment using kubectl apply so I can confirm I have correct auth and kube installation.

@omrikiei
Copy link
Owner

omrikiei commented Dec 5, 2022

@snyderpa-owl which k8s version are you using? I want to try and replicate this

@snyderpa-owl
Copy link
Author

Connected to an AWS EKS cluster I am using this:

% kubectl version  
Client Version: version.Info{Major:"1", Minor:"22+", GitVersion:"v1.22.6-eks-7d68063", GitCommit:"f24e667e49fb137336f7b064dba897beed639bad", GitTreeState:"clean", BuildDate:"2022-02-23T19:32:14Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"23+", GitVersion:"v1.23.13-eks-fb459a0", GitCommit:"55bd5d5cb7d32bc35e4e050f536181196fb8c6f7", GitTreeState:"clean", BuildDate:"2022-10-24T20:35:40Z", GoVersion:"go1.17.13", Compiler:"gc", Platform:"linux/amd64"}

@testifyqa
Copy link

Any updates on this I need something similar for a DaemonSet

@sfc-gh-plis
Copy link

That would make sense for my use-case as well

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

No branches or pull requests

4 participants