Skip to content

Conversation

@rhmdnd
Copy link
Owner

@rhmdnd rhmdnd commented Sep 10, 2022

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 10, 2022

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

metadata:
name: compserv-service-account-role
subjects:
- kind: User
Copy link
Owner Author

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?

- image: quay.io/lbragsta/compserv:755fd692-b648-4e93-b7e1-ad5ea01c7db5
name: compserv
ports:
- containerPort: 50051
Copy link
Owner Author

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?)

@rhmdnd rhmdnd force-pushed the compserv-kustomize branch 5 times, most recently from 2c23cec to b03f69d Compare September 16, 2022 02:52
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.

.PHONY: deploy
deploy: $(TOOLS_DIR)/kubectl
sed -e 's%quay.io/compliance-service/compserv:latest%$(IMAGE_REPO):$(TAG)%' kustomize/deployment.yaml -i
Copy link
Collaborator

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.

Copy link
Owner Author

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.

@mrogers950
Copy link
Collaborator

/lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants