thingsboard / thingsboard-ce-k8s

ThingsBoard Community Edition Kubernetes scripts and docs
Apache License 2.0
70 stars 89 forks source link

missing {end} from jsonpath in ./k8s-deploy-thirdparty.sh #11

Closed amir-hg closed 4 years ago

amir-hg commented 4 years ago

Hi in file k8s-deploy-thirdparty.sh: redisNodes=$(kubectl get pods -l app=tb-redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 ')

https://github.com/thingsboard/thingsboard-ce-k8s/blob/e2a7229b18c78ac9f44537e00948b196d7c7da51/k8s-deploy-thirdparty.sh#L43

missing {end} at the end of jsonpath you can check example in kubernetes site https://kubernetes.io/docs/reference/kubectl/jsonpath/ it should be like this redisNodes=$(kubectl get pods -l app=tb-redis -o jsonpath='{range.items[*]}{.status.podIP}:6379 {end}')

problem: when i run in my kubernetes cluster (v 1.18.8) created by rancher it produces extra empty array like this:

10.42.3.17:6379 10.42.2.41:6379 10.42.4.29:6379 10.42.4.31:6379 10.42.3.20:6379 10.42.2.43:6379 :6379

best regards

ashmidt-thingsboard commented 4 years ago

Hi, yes, it doesn`t work on the k8s 1.18+ versions. I will change our scripts. Thank you for the help.