Skip to content

Commit

Permalink
increase postgres and redis memory and cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
TimCsaky committed Dec 2, 2024
1 parent fd79a3e commit af389a2
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 53 deletions.
48 changes: 24 additions & 24 deletions .github/environments/values.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ postgres:
storageClassName: "netapp-block-standard"
resources:
requests:
cpu: 100m
cpu: 200m
memory: 256Mi
limits:
cpu: 200m
cpu: 400m
memory: 512Mi
sidecars:
replicaCertCopy:
Expand All @@ -56,36 +56,36 @@ postgres:
repoHost:
resources:
requests:
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 256Mi
limits:
cpu: 100m
memory: 512Mi
sidecars:
pgbackrest:
resources:
requests:
cpu: 10m
memory: 32Mi
cpu: 30m
memory: 64Mi
limits:
cpu: 40m
memory: 128Mi
cpu: 90m
memory: 256Mi
pgbackrestConfig:
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 40m
cpu: 50m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
jobs:
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 50m
memory: 128Mi
limits:
cpu: 100m
memory: 256Mi
configuration:
# secret for saving backups to S3
- secret:
Expand Down Expand Up @@ -162,11 +162,11 @@ redis:
size: 25Mi
resources:
limits:
cpu: 50m
memory: 150Mi
cpu: 100m
memory: 256Mi
requests:
cpu: 20m
memory: 50Mi
cpu: 25m
memory: 64Mi
sentinel:
enabled: true
quorum: 1
Expand All @@ -185,8 +185,8 @@ redis:
whenDeleted: Delete
resources:
limits:
cpu: 50m
memory: 150Mi
cpu: 100m
memory: 256Mi
requests:
cpu: 20m
memory: 50Mi
cpu: 25m
memory: 64Mi
48 changes: 24 additions & 24 deletions .github/environments/values.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ postgres:
storageClassName: "netapp-block-standard"
resources:
requests:
cpu: 100m
cpu: 200m
memory: 256Mi
limits:
cpu: 200m
cpu: 400m
memory: 512Mi
sidecars:
replicaCertCopy:
Expand All @@ -57,36 +57,36 @@ postgres:
repoHost:
resources:
requests:
cpu: 20m
memory: 128Mi
limits:
cpu: 50m
memory: 256Mi
limits:
cpu: 100m
memory: 512Mi
sidecars:
pgbackrest:
resources:
requests:
cpu: 10m
memory: 32Mi
cpu: 30m
memory: 64Mi
limits:
cpu: 40m
memory: 128Mi
cpu: 90m
memory: 256Mi
pgbackrestConfig:
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 40m
cpu: 50m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
jobs:
resources:
requests:
cpu: 10m
memory: 64Mi
limits:
cpu: 50m
memory: 128Mi
limits:
cpu: 100m
memory: 256Mi
configuration:
# secret for saving backups to S3
- secret:
Expand Down Expand Up @@ -152,11 +152,11 @@ redis:
size: 25Mi
resources:
limits:
cpu: 50m
memory: 150Mi
cpu: 100m
memory: 256Mi
requests:
cpu: 20m
memory: 50Mi
cpu: 25m
memory: 64Mi
sentinel:
enabled: true
quorum: 1
Expand All @@ -175,8 +175,8 @@ redis:
whenDeleted: Delete
resources:
limits:
cpu: 50m
memory: 150Mi
cpu: 100m
memory: 256Mi
requests:
cpu: 20m
memory: 50Mi
cpu: 25m
memory: 64Mi
2 changes: 1 addition & 1 deletion load-tests/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ Custom environment variables are supplied to k6 with the `-e` arg.

### Example commands

`k6 run -e secret=SC_SECRET_HERE -e target=[email protected] --vus=10 --iterations=100 script.js`
`k6 run -e secret=<ches secret here> -e target=<disposible email address here> --vus=1 --iterations=1 script.js`

`k6 run -e secret=SC_SECRET_HERE -e [email protected] -e [email protected] -e env=test --vus=100 --iterations=3000 script.js`
9 changes: 5 additions & 4 deletions load-tests/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import { check, fail } from 'k6';
// -------------------------------------------------------------------------------------------------
// 1. Init
// -------------------------------------------------------------------------------------------------
const client = 'TEST_SERVICE_CLIENT';
const senderEmail = `${__ENV.sender ? __ENV.sender : '[email protected]'}`;

const client = '<CHES service client id here>';
const senderEmail = `${__ENV.sender ? __ENV.sender : '[email protected]'}`;
// https://k6.io/docs/using-k6/environment-variables
const secret = `${__ENV.secret}`;
const env = `${__ENV.env ? __ENV.env : 'dev'}`;
Expand Down Expand Up @@ -45,10 +46,10 @@ export let options = {

// URL strings
if (env === 'dev' || env === 'test') {
emailUrl = `https://ches-${env}-master.apps.silver.devops.gov.bc.ca/${emailUrl}`;
emailUrl = `https://ches-${env}.api.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://${env}.loginproxy.gov.bc.ca/${oidcUrl}`
} else if (env === 'prod') {
emailUrl = `https://ches-${env}-master.apps.silver.devops.gov.bc.ca/${emailUrl}`;
emailUrl = `https://ches.api.gov.bc.ca/${emailUrl}`;
oidcUrl = `https://loginproxy.gov.bc.ca/${oidcUrl}`
} else if (env && env.match(/pr-\d+/g)) {
emailUrl = `https://ches-dev-${env}-master.apps.silver.devops.gov.bc.ca/${emailUrl}`;
Expand Down

0 comments on commit af389a2

Please sign in to comment.