-
Notifications
You must be signed in to change notification settings - Fork 11
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
docs: Add example job that shuts down proxy containers on completion. #436
Conversation
68d893d
to
6276412
Compare
docs/examples/job-mysql.yaml
Outdated
command: | ||
- sh | ||
- -c | ||
- "psql --host=$DB_HOST --port=$DB_PORT --username=$DB_USER '--command=select 1' --echo-queries --dbname=$DB_NAME\nfor url in $CSQL_QUIT_URLS ; do \n wget --post-data '' $url \ndone\n" |
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.
Does the busybox image have curl? I think that might be more clear than wget.
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.
The busybox image has wget but not curl.
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.
Ah ok. Well either way, we can change this to a get request once the next version of the Proxy is released yeah?
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.
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.
Can we clean up the whitespace here? Is there any way to make this more readable? If we end up putting this in the docs one day, the horizontal scroll will be brutal.
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. This is now fixed.
0985fe0
to
04427d4
Compare
docs/examples/job-mysql.yaml
Outdated
# This demonstrates how to configure a batch job so that it shuts down | ||
# the proxy containers when it has finished processing. | ||
# | ||
# The operator will set an environment variable called CSQL_QUIT_URLS |
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.
I missed this in review, but shouldn't this be CSQL_PROXY_QUIT_URLS
?
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, glad you caught this. I opened #454 with the fix. I'll update this PR too.
docs/examples/job-mysql.yaml
Outdated
# so the value of CSQL_QUIT_URLS will be something like | ||
# "http://localhost:9091/quitquitquit" | ||
# | ||
# The main job container should send a POST request each URL when the job |
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.
POST or GET? GET is so much more convenient.
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.
Also "request TO each URL"
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.
Fixed.
04427d4
to
5707e41
Compare
Demonstrate how to configure a job so that job containers exit successfully when the job completes.
Related to #361