-
Notifications
You must be signed in to change notification settings - Fork 3
Add support for deploying app in kubernetes #163
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
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhmdnd The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
700e097 to
d827b4d
Compare
d827b4d to
881108c
Compare
kustomize/rbac-binding.yaml
Outdated
| metadata: | ||
| name: compserv-service-account-role | ||
| subjects: | ||
| - kind: User |
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 can technically be a ServiceAccount. That's probably a better thing to use than the user directly, right?
kustomize/compserv-deployment.yaml
Outdated
| - image: quay.io/lbragsta/compserv:755fd692-b648-4e93-b7e1-ad5ea01c7db5 | ||
| name: compserv | ||
| ports: | ||
| - containerPort: 50051 |
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 user can technically set this in the config.yaml, which means it could mismatch if they set the app config to something else (e.g., 50050).
This might be a byproduct of my inexperience with kustomize, but is there a better way to define all configuration values for a deployment, and then have those values in the app (kustomize doesn't really do templating?)
881108c to
c65c181
Compare
2c23cec to
b03f69d
Compare
b03f69d to
dc2aa2e
Compare
This commit adds kustomize support for deploying compserv and a postgres database on Kubernetes. Additionally, compserv can be configured to use AWS RDS for the database. Future changes will break apart the kustomize files into separate overlaps, so that we have a dedicated overlay for development and leave space for other environments. Mainly focusing on organizing the deployment scripts so they're easy to follow.
dc2aa2e to
7062b34
Compare
|
|
||
| .PHONY: deploy | ||
| deploy: $(TOOLS_DIR)/kubectl | ||
| sed -e 's%quay.io/compliance-service/compserv:latest%$(IMAGE_REPO):$(TAG)%' kustomize/deployment.yaml -i |
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.
Note: this could be done with the kustomize set image command rather than sed.
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.
Oh - nice, thanks!
I'll propose a follow up.
|
/lgtm |
This needs to be sifted through and cleaned up. Some of it could be broken into separate patches.
The main idea here though was to add the ability to deploy compserv to a kubernetes cluster using kustomize. I still need to configure the database properly, but that will come in a subsequent patch.
Pushing was I have for now so we can go through it and see what needs to be fixed before moving further.