-
Notifications
You must be signed in to change notification settings - Fork 169
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
Document port_forward usage with charts that deploy multiple pods #454
Comments
@nathanperkins did you ever find a solution to this? |
I think this is functionality missing from Right now, the Because of this, there is no way to specify which pod should be port forwarded. I think The best workaround for this is to add your own Here's a working example for the Pyroscope operator: helm_resource('pyroscope',
chart='grafana/pyroscope',
release_name='pyroscope',
namespace="pyroscope",
flags=[
'--create-namespace'
])
k8s_resource(workload='pyroscope',
extra_pod_selectors={'statefulset.kubernetes.io/pod-name': 'pyroscope-0'},
discovery_strategy='selectors-only',
port_forwards="4040:4040") This port-forwards the pyroscope pod, instead of picking the default pyroscope-agent pod. Note that I also tried using Hope that helps anybody else encountering this problem! |
The above solution does result in the port being forwarded to the correct pod, but it has a secondary effect of de-associating the other pods from the resource for other functionality. In my case, the other deployments (which sometimes share an image with the main deployment, and are associated as such using image_deps and image_keys) will no longer receive live_updates and are no longer included in the merged log stream for that resource. I've so far failed to find any solution when working with helm_resource which allows me to get port forwards landed at the correct pod while still keeping other functionality with the other pods. There doesn't seem to be any reasonable way to separate out the deployments into separate resources within the confines of k8s_custom_deploy (tilt-dev/tilt#5406) |
I'm deploying
prometheus-community/kube-prometheus-stack
with multiple pods and it's not clear how I should useport_forwards
to forward ports from specific pods.The text was updated successfully, but these errors were encountered: