-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Fix rethinkdb example #8843
Fix rethinkdb example #8843
Conversation
# try to pick up first different ip from endpoints | ||
MYHOST=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') | ||
URL="${KUBERNETES_RO_SERVICE_HOST}/api/v1beta3/namespaces/${NAMESPACE}/endpoints/rethinkdb-driver" | ||
IP=$(curl -s ${URL} | jq -s -r --arg h "${MYHOST}" '.[0].subsets | .[].addresses | [ .[].IP ] | map(select(. != $h)) | .[0]') || exit 1 | ||
URL="https://${KUBERNETES_SERVICE_HOST}${KUBERNETES_SERVICE_PORT}/api/v1beta3/namespaces/${NAMESPACE}/endpoints/rethinkdb-driver" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be note the colon
URL="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}/api/v1beta3/namespaces/${NAMESPACE}/endpoints/rethinkdb-driver"
right? Not
URL="https://${KUBERNETES_SERVICE_HOST}${KUBERNETES_SERVICE_PORT}/api/v1beta3/namespaces/${NAMESPACE}/endpoints/rethinkdb-driver"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should. Will fix.
GCE e2e build/test failed for commit ff227821a9510dedfd458c2e294ecd4998a0b5a1. |
I found this old PR that I forgot about. Fixed, tested, seems to work. I left the test image in my own repository at gcr.io/crested_analogy_671/rethink:1 to save folks the trouble of building it. |
This fixes an example and doesn't touch any real code, so it should be OK for merging. @gmarek PTAL |
GCE e2e build/test passed for commit 3acdc76. |
Shippable failure seems related: |
@lavalamp I'm also working on fixing this example. I would rather get rid of the separate namespace. It is confusing (switching contexts, why I don't see my other/rethinkdb pods etc). |
Ah ok, I wasn't aware of that. Yours does more stuff, so I'll close this in favor of #10832. |
For #7444.
The rethinkdb example needs some help. We need to switch it over to using DNS for discovery, or at least not relying on the RO port. This change, which I haven't tested, uses a service account.
Unfortunately, we don't own the container here, and I'm not sure if we want to fork it or push changes to https://github.com/antmanler/rethinkdb-k8s. I'm making this PR to record my progress on this.
We'll need to take this example out or fix it, because the RO port is going away soon.
@antmanler