From 2e86c5af9083d817ee7535caa96b62356cc05072 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 | 129 ++++++++++++++++++ 1 file changed, 129 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 d8c128cae..a6158f898 100644 --- a/test/kuttl/test-suites/default/scale-tests/01-assert.yaml +++ b/test/kuttl/test-suites/default/scale-tests/01-assert.yaml @@ -509,3 +509,132 @@ status: readyReplicas: 1 replicas: 1 --- +apiVersion: batch/v1 +kind: CronJob +metadata: + labels: + service: nova-conductor + name: nova-cell0-conductor-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 + - mountPath: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem + name: combined-ca-bundle + readOnly: true + subPath: tls-ca-bundle.pem + restartPolicy: OnFailure + serviceAccount: nova-nova + serviceAccountName: nova-nova + volumes: + - name: config-data + secret: + secretName: nova-cell0-conductor-config-data + - name: scripts + secret: + secretName: nova-cell0-conductor-scripts + - name: combined-ca-bundle + secret: + secretName: combined-ca-bundle + schedule: 0 0 * * * + successfulJobsHistoryLimit: 3 + suspend: false +status: {} +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + labels: + service: nova-conductor + name: nova-cell1-conductor-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 + - mountPath: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem + name: combined-ca-bundle + readOnly: true + subPath: tls-ca-bundle.pem + restartPolicy: OnFailure + serviceAccount: nova-nova + serviceAccountName: nova-nova + volumes: + - name: config-data + secret: + secretName: nova-cell1-conductor-config-data + - name: scripts + secret: + secretName: nova-cell1-conductor-scripts + - name: combined-ca-bundle + secret: + secretName: combined-ca-bundle + schedule: 0 0 * * * + successfulJobsHistoryLimit: 3 + suspend: false +status: {}