-
Notifications
You must be signed in to change notification settings - Fork 103
fix: problems with loadbalancer ip address display #130 password #132 #131
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
Conversation
This will also contain a fix to close #132 |
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.
👍 🐳 👍
Looks good - I had some questions for my own learning.
Before merging, can we also check that the removals from the various JenkinsFile
s are intended?
|
||
header "Finished!" | ||
THE_FQDN=$(pulumi config get kic-helm:fqdn -C ${script_dir}/../pulumi/python/config || echo "Cannot Retrieve") | ||
THE_IP=$(kubectl get service kic-nginx-ingress --namespace nginx-ingress --output=jsonpath='{.status.loadBalancer.ingress[*].ip}' || echo "Cannot Retrieve") |
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.
Another bash question: I know that the ||
will stop the script from crashing if the command exits nonzero, but what's the difference between echo
and just doing || "Cannot Retrieve"
? I assume the goal is to set THE_IP
and THE_FQDN
to "Cannot Retrieve"?
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.
We're running the script in a mode that it exits if there are any failures anywhere (anything return non-zero) - you can see the set statement at the top.
If you look at the CRD removal logic you can see one approach to potentially having errors and wanting to ignore them -we turn off the strict abort on error and allow them to error.
In this case, I wanted to keep going but I also wanted to put a message out there. So what happens is if the RC from CMD1 is non-zero, we run CMD2. If CMD2 exits non-zero it's an error, but if it's 0 then we go. Basically, "if you are unable to get this info substitute this phrase". The other construct you'll see a lot is CMD1 && CMD2 which means "if CMD1 exits 0, then run CMD2".
Proposed changes
This fix addresses a bug introduced with #129 where the startup script would fail on retrieval of the IP address from kuberentes. This includes using the correct service name and adds in an or condition for cases where we cannot retrieve the address (which could be a symptom of a problem an 8000 d not a problem itself) so that the operator can debug.
Checklist
Before creating a PR, run through this checklist and mark each as complete.