Skip to content

Commit

Permalink
Update docs for nodevertical-heavy
Browse files Browse the repository at this point in the history
  • Loading branch information
rsevilla87 committed Apr 29, 2020
1 parent ec5a81f commit 9c02ad0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
21 changes: 20 additions & 1 deletion docs/nodevertical.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,27 @@ Period of time (in seconds) that cluster loader will wait for pods to come up to
Default: `600`
Pass/fail criteria. Value to determine if NodeVertical workload executed in duration expected.

## Smoke test variables
### NODEVERTICAL_HEAVY
Default: `false`
Trigger nodevertical heavy workload. Rather than deploy sleep pods throughout all labeled nodes, this workload deploys a two layer application composed by a PostgreSQL database pod and another pod wih simple application that is able to perform several operations and store a result in the database. [Heavy node vertical app](https://github.com/rsevilla87/perfApp)

### NODEVERTICAL_HEAVY_PROBE_ENDPOINT
Default: `/ready`
Readiness probe endpoint for the application deployed by the heavy nodevertical. The default `/ready` endpoint inserts a record with the current timestamp in the ts table of the DDBB. i.e. `INSERT INTO ts VALUES ('2006-01-02T15:04:05Z07:00')`

Results obtained of running 2 pods (client + database) with the default `/ready` endpoint.
```
# oc adm top pods -n nodevertical
NAME CPU(cores) MEMORY(bytes)
perfapp-99-67684bbc6d-98kdq 0m 8Mi
postgres-0-7bd7864c58-j7ndx 0m 32Mi
```

### NODEVERTICAL_HEAVY_PROBE_PERIOD
Default: `30`
Readiness probe period for the application deployed by the heavy nodevertical.

## Smoke test variables
```
NODEVERTICAL_NODE_COUNT=4
NODEVERTICAL_TEST_PREFIX=nodevertical_smoke
Expand Down
2 changes: 1 addition & 1 deletion workloads/nodevertical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

- name: Set NodeVertical template
set_fact:
nodevertical_template: "{% if nodevertical_heavy %}workload-nodevertical-heavy-script-cm.yml.j2{% else %}workload-nodevertical-script-cm.yml.j2{% endif %}"
nodevertical_template: "{% if nodevertical_heavy|bool %}workload-nodevertical-heavy-script-cm.yml.j2{% else %}workload-nodevertical-script-cm.yml.j2{% endif %}"

- name: Template workload templates
template:
Expand Down
18 changes: 10 additions & 8 deletions workloads/templates/workload-nodevertical-heavy-script-cm.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ data:
metadata:
name: perf-app
objects:
- kind: DeploymentConfig
apiVersion: v1
- kind: Deployment
apiVersion: apps/v1
metadata:
name: postgres-${IDENTIFIER}
spec:
Expand Down Expand Up @@ -169,13 +169,14 @@ data:
serviceAccount: ''
replicas: 1
selector:
name: postgres-${IDENTIFIER}
matchLabels:
name: postgres-${IDENTIFIER}
triggers:
- type: ConfigChange
strategy:
type: Rolling
- kind: DeploymentConfig
apiVersion: v1
type: RollingUpdate
- kind: Deployment
apiVersion: apps/v1
metadata:
name: perfapp-${IDENTIFIER}
spec:
Expand Down Expand Up @@ -223,11 +224,12 @@ data:
serviceAccount: ''
replicas: 1
selector:
name: perfapp-${IDENTIFIER}
matchLabels:
name: perfapp-${IDENTIFIER}
triggers:
- type: ConfigChange
strategy:
type: Rolling
type: RollingUpdate
- kind: Service
apiVersion: v1
metadata:
Expand Down

0 comments on commit 9c02ad0

Please sign in to comment.