Consolidate cnp-alert-demo and protect-demos
Time-box: 3 days
Why are we doing this work
We have two separate clusters to run staging ([cnp-alert-demo
(https://console.cloud.google.com/kubernetes/clusters/details/us-central1-c/cnp-alert-demo/details?project=group-defend-c8e44e)]) and production (protect-demos
).
Using the same K8S cluster for staging and production will reduce costs.
Instance type | location | on-demand (USD/h) | preemptible (USD/h) |
---|---|---|---|
e2-medium | us-central1 | $0.033503 | $0.010051 |
n1-standard-2 | us-west1 | $0.0949995 | $0.02 |
Current cost:
-
cnp-alert-demo
: $0.033503/hr-instance * 1e2-medium
* 24 hours * 365 days = $293 USD/year -
protect-demos
: $0.0949995/hr-instance * 3n1-standard-2
* 24 hours * 365 days = $2,497 USD/year - Total: $2,790 USD/year
Proposed cost options, keeping protect-demos
:
- On-demand 3-node cluster: $0.033503/hr-instance * 3
e2-medium
* 24 hours * 365 days = $880 USD/year - Preemptible 1-node cluster: $0.02/hr-instance * 1
n1-standard-2
* 24 hours * 365 days = $175 USD/year - On-demand 1-node cluster: $0.0949995/hr-instance * 1
n1-standard-2
* 24 hours * 365 days = $832 USD/year
Relevant links
Non-functional requirements
For consideration:
- what happens with a GKE cluster when the only preemptible node is destroyed? If we lose the configuration and have to reset the integrations, it's best to keep using on-demand (or commit to 1 year).
- what does sharing an integration between two GitLab instances/groups look like? I expect only one of them to have a cluster management project.
- an implementation effort of more than 3 days approximately negates the savings for 1 year
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
Edited by Thiago Figueiró