Skip to content
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

feat(ci): kubernetes deployment #503

Merged
merged 3 commits into from
Feb 16, 2021
Merged

feat(ci): kubernetes deployment #503

merged 3 commits into from
Feb 16, 2021

Conversation

themightychris
Copy link
Member

@themightychris themightychris commented Feb 10, 2021

Don't have this working yet, running into weird auth problems with my local kind cluster pulling from ghcr.io even though I had a regcred secret in place that looked good

This might be enough for a working deploy after that, but I have no idea if my use of hostAliases will make the app and db hostnames hardcoded into the frontend nginx config and backend will work. Ultimately we want the backend connecting to a database provided through env, and to probably let k8s' ingress handle mounting /api

TODO:

  • Remove line from Dockerfile
  • Mount / with docker-compose
  • Create ingress path for container on /api
  • Django App: Receive DB Hostname and Creds through ENV

@themightychris
Copy link
Member Author

themightychris commented Feb 10, 2021

ah ha, I've never used ghcr.io before, you have to explicitly switch a package to public after you publish it

edit: oh wow it works! in my local kind cluster at least

@themightychris
Copy link
Member Author

themightychris commented Feb 11, 2021

we should probably remove the line i added to dockerfile to copy nginx config in. If the container build without that provides for serving the static content out of /, then that can be something we just mount with docker-compose and the k8s ingress can handle plugging the api into the /api path on top of it, and then that gets rid of the need for the app hostAlias

the next piece then would be getting the django app to take its DB hostname and auth through env vars so we can get rid of the other hostAlias and just have k8s and docker-compose both pass down appropriate hostnames

@MooseQuest MooseQuest marked this pull request as ready for review February 16, 2021 17:48
Copy link
Collaborator

@MooseQuest MooseQuest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving and Merging

@MooseQuest MooseQuest merged commit 468034a into master Feb 16, 2021
@MooseQuest MooseQuest deleted the features/k8s-deployment branch February 16, 2021 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants