Comments (2)
All the env-variables except downwardAPI, might be better using a ConfigMap and then mount them as volumes. Only reason to use configMaps over Environment variables is you can change the ConfigMap on the fly and donβt need to re-create the whole deployment.
While yes you can change the config map on the fly, how would the application pick the changes up? Lagom/Play/Akka read their config on startup, and even if they did reread periodically, most of that config would require restarting anyway. So, when you change the config, you need to restart all the apps for them to pick it up, and generally you want that done immediately. But you don't want to do that manually, want to do it in a rolling fashion, like a deployment does for you when you update the deployment. So, for most of that config, it's actually better to make it environment variables, since then you can take advantage of recreating the deployment to do a rolling update for you. If you used a config map, you'd have to restart everything manually, in a rolling fashion, which would be time consuming and error prone.
The general principle here would be to use config maps for anything that apps can use dynamically, and for anything that requires a restart, use environment variables.
imagePullPolicy: IfNotPresent should be Always in case of Production because in case you have old image with same tag locally, it will never pull new images
This sounds dangerous to me - if you have an old image with the same tag locally, then how do you know what's running where? How do you know which version of the image a particular container is running when it fails and you need to debug and reproduce the failure? New images deployed to production should always have a new tag, in which case, it doesn't matter if IfNotPresent
or Always
is used, and IfNotPresent
is a nice optimisation.
from lagom-recipes.
All that said, the current example exposes far too many environment variables, most of those things don't need to be/shouldn't be configurable. It's a result of taking another tool that automatically generates the YAML and using its output as is. We'll be producing new examples fairly soon that provide a much simpler YAML with only essential environment variables exposed.
from lagom-recipes.
Related Issues (19)
- CORS Service Acl Regex Bug HOT 1
- JPA CRUD recipe HOT 1
- Make the contents of README searchable
- Publish main README on LB's techhub
- [new recipe] Demo how to use different DBs for journal, snapshot and readsides HOT 1
- Enable travis support HOT 1
- Enable travis for maven projects HOT 2
- Add a top-level README with repo purpose and TOC of recipes
- Implement a java equivalent of the file upload recipe
- Review README to list all projects
- Update configuration for Cluster Bootstrap Discovery Method HOT 1
- Test wire protocol
- File Upload example using maven HOT 2
- Import sample as recipe to demo Multi-rdbms
- [couchbase] greetings repository always returns empty list HOT 3
- Unable to modify mixed-persistence-java-sbt to use Postgres HOT 4
- Lagom Recipes repository archival
- Review licensing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lagom-recipes.