bloomberg / goldpinger

Debugging tool for Kubernetes which tests and displays connectivity between nodes in the cluster.
Apache License 2.0
2.53k stars 180 forks source link

Display hostName other than podName #118

Closed j4ckstraw closed 2 years ago

j4ckstraw commented 2 years ago

Issue number of the reported bug or feature request: #

Describe your changes I changed pod.Name to p.Spec.NodeName, so we can see the nodename other than podname in the UI. image

Testing performed Describe the testing you have performed to ensure that the bug has been addressed, or that the new feature works as planned.

Additional context Add any other context about your contribution here. goldpinger is deployed by daemonset, so nodename is better than podname.

seeker89 commented 2 years ago

Hi @j4ckstraw thanks for the PR!

How would you feel about making your behaviour change hide behind an extra command line flag, that's defaulting to false for backwards compatibility?

I see how this might be useful, but we don't want to be break existing users.

j4ckstraw commented 2 years ago

OK, I will file the patch later.

j4ckstraw commented 2 years ago

fix #99

wesleyoliveiraleite commented 2 years ago

Hi, how can I use the env "DISPLAY_NODENAME" in my daemonset yaml file? This was my trying, but not working:

- name: DISPLAY_NODENAME
  valueFrom:
    fieldRef:
      fieldPath: spec.nodeName

I'd like to have the view in UI goldpinger the node name instead pod name.

tamcore commented 2 years ago

@wesleyoliveiraleite have you tried the following?

- name: DISPLAY_NODENAME
  value: "true"

Because the parameter is a boolean.

seeker89 commented 2 years ago

Yup, @tamcore is right. Thanks!