From 3b1b2b83f05c9bb037e1a5c91e51ad3207bd81c6 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Sun, 25 Feb 2024 18:52:28 +0100 Subject: [PATCH] Kuttl coverage for CronJob --- .../default/scale-tests/01-assert.yaml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/test/kuttl/test-suites/default/scale-tests/01-assert.yaml b/test/kuttl/test-suites/default/scale-tests/01-assert.yaml index 1551b8dda..49c9f5f24 100644 --- a/test/kuttl/test-suites/default/scale-tests/01-assert.yaml +++ b/test/kuttl/test-suites/default/scale-tests/01-assert.yaml @@ -513,3 +513,118 @@ status: readyReplicas: 1 replicas: 1 --- +apiVersion: batch/v1 +kind: CronJob +metadata: + labels: + service: nova-conductor + name: nova-kuttl-cell0-db-purge + namespace: nova-kuttl-default +spec: + concurrencyPolicy: Forbid + failedJobsHistoryLimit: 1 + jobTemplate: + spec: + completions: 1 + parallelism: 1 + template: + spec: + containers: + - args: + - -c + - /usr/local/bin/kolla_start + command: + - /bin/bash + env: + - name: ARCHIVE_AGE + value: "30" + - name: KOLLA_BOOTSTRAP + value: "true" + - name: KOLLA_CONFIG_STRATEGY + value: COPY_ALWAYS + - name: PURGE_AGE + value: "90" + image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified + name: nova-manage + securityContext: + runAsUser: 42436 + volumeMounts: + - mountPath: /var/lib/openstack/config + name: config-data + - mountPath: /var/lib/openstack/bin + name: scripts + - mountPath: /var/lib/kolla/config_files/config.json + name: config-data + subPath: nova-conductor-dbpurge-config.json + restartPolicy: OnFailure + serviceAccount: nova-nova-kuttl + serviceAccountName: nova-nova-kuttl + volumes: + - name: config-data + secret: + secretName: nova-kuttl-cell0-conductor-config-data + - name: scripts + secret: + secretName: nova-kuttl-cell0-conductor-scripts + schedule: 0 0 * * * + successfulJobsHistoryLimit: 3 + suspend: false +status: {} +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + labels: + service: nova-conductor + name: nova-kuttl-cell1-db-purge + namespace: nova-kuttl-default +spec: + concurrencyPolicy: Forbid + failedJobsHistoryLimit: 1 + jobTemplate: + spec: + completions: 1 + parallelism: 1 + template: + spec: + containers: + - args: + - -c + - /usr/local/bin/kolla_start + command: + - /bin/bash + env: + - name: ARCHIVE_AGE + value: "30" + - name: KOLLA_BOOTSTRAP + value: "true" + - name: KOLLA_CONFIG_STRATEGY + value: COPY_ALWAYS + - name: PURGE_AGE + value: "90" + image: quay.io/podified-antelope-centos9/openstack-nova-conductor:current-podified + name: nova-manage + securityContext: + runAsUser: 42436 + volumeMounts: + - mountPath: /var/lib/openstack/config + name: config-data + - mountPath: /var/lib/openstack/bin + name: scripts + - mountPath: /var/lib/kolla/config_files/config.json + name: config-data + subPath: nova-conductor-dbpurge-config.json + restartPolicy: OnFailure + serviceAccount: nova-nova-kuttl + serviceAccountName: nova-nova-kuttl + volumes: + - name: config-data + secret: + secretName: nova-kuttl-cell1-conductor-config-data + - name: scripts + secret: + secretName: nova-kuttl-cell1-conductor-scripts + schedule: 0 0 * * * + successfulJobsHistoryLimit: 3 + suspend: false +status: {}