-
Notifications
You must be signed in to change notification settings - Fork 7
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
247 add dev env #45
247 add dev env #45
Conversation
templates/start-dev-env.sh
Outdated
rm -rf kubernetes.tmp && cp -pr kubernetes kubernetes.tmp | ||
## image: set image definition | ||
sed -i ".bak" "s|image: fake-image|image: ${ECR_REPO}:${VERSION_TAG}|g" kubernetes.tmp/base/deployment.yml | ||
## ingress: create new domain with external DNS | ||
sed -i ".bak" "s|${EXT_HOSTNAME}|${MY_EXT_HOSTNAME}|g" kubernetes.tmp/overlays/${CONFIG_ENVIRONMENT}/ingress.yml | ||
## database_name: replace with new one | ||
sed -i ".bak" "s|DATABASE_NAME=${DATABASE_NAME}|DATABASE_NAME=${DEV_DATABASE_NAME}|g" kubernetes.tmp/base/kustomization.yml | ||
skaffold config set default-repo ${ECR_REPO} >& /dev/null |
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 must be a better way to do this, maybe dynamically within skaffold itself.. We shouldn't be leaving this temp dir hanging around.
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.
decided to use kustomize build . | sed blahx blahy | kubectl apply -f -
, instead of skaffold
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.
(from Bill) We also need to think about how the frontend works with this. I guess the idea is that they run the frontend locally but then they point it at myname-app.backend.com. But in that case we also need to make sure the backend has CORS set up properly to allow traffic from the local frontend.
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.
when they run the frontend locally, suggest they set /etc/host with 127.0.01 to app.backend.com
and point api server with xxx-api.backend.com
. Then, we don't need to change CORS.
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.
No, we don't want them to mess with their /etc/hosts, plus that would mess up any use of certificates. It's easy enough for us to set cors headers through the ingress definition.
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.
Decided to add localhost
to CORS. However, annonatation cors-allow-origin
doesn't support multiple domains in the field, ref: kubernetes/ingress-nginx#5496
Co-authored-by: Bill Monkman <bmonkman@gmail.com>
…backedn DNS check
Co-authored-by: Bill Monkman <bmonkman@gmail.com>
Co-authored-by: Bill Monkman <bmonkman@gmail.com>
…e-backend into 247-add-dev-env
Major changes:
How to run:
Related changes in infrastructure repo