diff --git a/docs/nodevertical.md b/docs/nodevertical.md index f4600d9a..2b1a2901 100644 --- a/docs/nodevertical.md +++ b/docs/nodevertical.md @@ -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 diff --git a/workloads/nodevertical.yml b/workloads/nodevertical.yml index 92b12bbe..0efa2d1a 100644 --- a/workloads/nodevertical.yml +++ b/workloads/nodevertical.yml @@ -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: diff --git a/workloads/templates/workload-nodevertical-heavy-script-cm.yml.j2 b/workloads/templates/workload-nodevertical-heavy-script-cm.yml.j2 index bbb374b3..8a2e4701 100644 --- a/workloads/templates/workload-nodevertical-heavy-script-cm.yml.j2 +++ b/workloads/templates/workload-nodevertical-heavy-script-cm.yml.j2 @@ -134,8 +134,8 @@ data: metadata: name: perf-app objects: - - kind: DeploymentConfig - apiVersion: v1 + - kind: Deployment + apiVersion: apps/v1 metadata: name: postgres-${IDENTIFIER} spec: @@ -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: @@ -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: