-
Notifications
You must be signed in to change notification settings - Fork 344
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 the openshift templates #178
Conversation
metlos
commented
Sep 20, 2024
- Specify that the postgresql images should be taken from openshift
- Use an init container in the rails-postgresql template to init the database
* Specify that the postgresql images should be taken from openshift * Use an init container in the rails-postgresql template to init the database
[test] |
@@ -408,7 +408,7 @@ | |||
"annotations": { | |||
"description": "Defines how to deploy the database", | |||
"template.alpha.openshift.io/wait-for-ready": "true", | |||
"image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"postgresql:${POSTGRESQL_VERSION}\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" | |||
"image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"postgresql:${POSTGRESQL_VERSION}\", \"namespace\": \"openshift\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" |
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.
This is not needed. Before testing you are already in required 'namespace'
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.
Or use variable https://github.com/sclorg/rails-ex/blob/master/openshift/templates/rails-postgresql-persistent.json#L522, that is better approach
@@ -316,7 +396,7 @@ | |||
"annotations": { | |||
"description": "Defines how to deploy the database", | |||
"template.alpha.openshift.io/wait-for-ready": "true", | |||
"image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"postgresql:12-el8\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" | |||
"image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"postgresql:12-el8\", \"namespace\": \"openshift\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" |
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 same here with 'namespace'
…mage and remove the recreteParams that were not exactly working well. The intended function is done by the initContainer.
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.
Thanks for updating this PR. Well Done.