Skip to content

Commit

Permalink
Merge pull request #549 from fmount/dbpurge-kuttl
Browse files Browse the repository at this point in the history
Add glance-dbpurge cronjob assert to basic kuttl tests
  • Loading branch information
openshift-merge-bot[bot] authored Jun 7, 2024
2 parents 9531b1f + ca12327 commit fd766d0
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions test/kuttl/tests/glance_single/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# - glance-internal service
# - glance-public service
# - glance internal and public endpoints
# - glance-dbpurge cronjob

apiVersion: glance.openstack.org/v1beta1
kind: Glance
Expand Down Expand Up @@ -141,6 +142,54 @@ spec:
selector:
service: glance
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: glance-dbpurge
spec:
jobTemplate:
metadata:
labels:
service: glance
spec:
template:
spec:
containers:
- args:
- -c
- /usr/bin/glance-manage --config-dir /etc/glance/glance.conf.d db purge
30
command:
- /bin/bash
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/glance/glance.conf.d
name: db-purge-config-data
readOnly: true
- mountPath: /etc/my.cnf
name: config-data
readOnly: true
subPath: my.cnf
dnsPolicy: ClusterFirst
restartPolicy: Never
serviceAccount: glance-glance
serviceAccountName: glance-glance
terminationGracePeriodSeconds: 30
volumes:
- name: db-purge-config-data
secret:
defaultMode: 420
items:
- key: 00-config.conf
path: 00-config.conf
secretName: glance-config-data
- name: config-data
secret:
defaultMode: 420
secretName: glance-config-data
schedule: 1 0 * * *
---
# the actual addresses of the apiEndpoints are platform specific, so we can't rely on
# kuttl asserts to check them. This short script gathers the addresses and checks that
# the three endpoints are defined and their addresses follow the default pattern
Expand Down

0 comments on commit fd766d0

Please sign in to comment.