dromara / CloudEon

CloudEon uses Kubernetes to install and deploy open-source big data components, enabling the containerized operation of an open-source big data platform. This allows you to reduce your focus on underlying resource management and maintenance.
https://www.cloudeon.top/
Apache License 2.0
429 stars 104 forks source link

fix: get wrong node ip on k8s #100

Closed rugalcrimson closed 1 year ago

rugalcrimson commented 1 year ago

What is the purpose of the change

101

node.getStatus().getAddresses().get(0).getAddress() will retrun hostname on k8s

# kubectl get node node1 -o yaml|grep addresses -A 6|tail -7
  addresses:
  - address: node1
    type: Hostname
  - address: xxxxx
    type: ExternalIP
  - address: xxxxx
    type: InternalIP

Brief changelog

It is best to associate an existing issue

Verifying this change

Do I need to test? Has testing been completed? Test method?

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 3 checklist before request the community to review your PR.