-
Notifications
You must be signed in to change notification settings - Fork 218
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
templates: use pg_isready as liveness probe #206
Conversation
AFAIK you primarily need to add the new version
Thanks! |
Makes sense, thanks. |
@@ -245,8 +245,8 @@ | |||
{ | |||
"name": "POSTGRESQL_VERSION", | |||
"displayName": "Version of PostgreSQL Image", | |||
"description": "Version of PostgreSQL image to be used (9.2, 9.4, 9.5 or latest).", | |||
"value": "9.5", | |||
"description": "Version of PostgreSQL image to be used (9.4, 9.5, 9.6 or latest).", |
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.
Is 9.2 not relevant anymore?
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.
Has been deprecated for a long while already.
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.
Ok. We'll need to keep an eye on that.
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.
pg_isready is not available for 9.2 anyway
@@ -5,7 +5,7 @@ | |||
"name": "postgresql-ephemeral", | |||
"annotations": { | |||
"openshift.io/display-name": "PostgreSQL (Ephemeral)", | |||
"description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/9.5.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", | |||
"description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", |
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.
AFAIK this was meant to give container-specific instructions (really simple, basic usage).
Therefore pointing to README.md
- for OpenShift; regardless of version (IMHO most ppl just use latest
).
IOW: I'd rather keep the 9.6.
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.
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 have modified this in preparation for the last stages of image content generation (see #203 ) - eventually there will not be a 9.6
to directly link to and so the current link would result in a 404.
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.
Additionally, it is currently impossible to link to the 9.6 README anyway, without going through latest/
which might change into a different version in the future. So it makes sense to me to just point users to the root.
-- I hope it's not a problem for OpenShift, as they might link to it somewhere AFAIK. @bparees, is it fine if |
FTR: Subsequently I'll create image-streams and PR for openshift/origin. |
Also: before this PR gets merged I'd like to have the original template tested it by CI in OpenShift, so the changes can be actually validated. See #204. |
@@ -127,11 +127,11 @@ | |||
} | |||
}, | |||
"livenessProbe": { | |||
"exec": { | |||
"command": [ "/bin/sh", "-i", "-c", "pg_isready -h 127.0.0.1 -p 5432" ] |
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 guess the /bin/sh
is necessary, but I would rather avoid using the -i
option, if possible.
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 have left it in only because it was present in other /bin/sh invocations inside the template
This is long time discussed thing; IMO linking directly to gitrepo - to concrete paths - is a bad practice. There's a card on trello where we could discuss/implement a better place for documentation. Regarding the link, it is a temporary issue ... since we could move the "latest" to PostgreSQL 10 soon, at least for testing purposes. |
This looks good to me, but having this tested is a must :-) |
@@ -71,7 +71,7 @@ | |||
"name": "IMAGESTREAMTAG", | |||
"displayName": "ImageStreamTag", | |||
"description": "The OpenShift ImageStreamTag to use for PostgreSQL.", | |||
"value": "postgresql:9.5" | |||
"value": "postgresql:9.6" |
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.
there's no postgres 9.6 imagestream tag in openshift yet:
https://github.com/openshift/origin/blob/master/examples/image-streams/image-streams-centos7.json#L724-L795
so you need to deliver that before you start making templates default to looking for it.
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'll update at once - in our repos. The template will be actually tested with freshly build and tagged image into custom namespace.
@praiskup can you lay out the plan/order of operations here? is it to:
? |
According to the discussion here, I think so :-), per @pvalena comment:
|
@bparees, the order is a bit parallelized, but basically:
Where (1+2) and 3 are being worked on in parallel (I'm working on the image-streams; and together with @hhorak will provide help with the steps above). |
I will look into getting the tests up and running so we can test this out properly. |
[test-openshift] |
[test-openshift] |
[test-openshift] |
@praiskup Seems like resalloc does not want to cooperate again. |
[test-openshift] |
Thanks! Tests are green now |
Fixed one more issue with pure image tests [test-openshift] |
[test-openshift] |
lgtm |
Thanks for review! I will make one more rebase against container common scripts to pick up sclorg/container-common-scripts#45 It is not needed for postgresql's openshift tests right now but I would like to have it fixed for eventual s2i (or other cases accessing the internet) before the problem is forgotten again. |
[test-openshift] |
Tests are green. Merging this in. Thanks everyone! |
Resolves: #195