@@ -124,6 +124,9 @@ type GlanceSpec struct {
124124 // keystone catalog, and it acts as a selector for the underlying glanceAPI(s)
125125 // that can be specified by name
126126 KeystoneEndpoint string `json:"keystoneEndpoint"`
127+ // +kubebuilder:validation:Optional
128+ // DBPurge parameters -
129+ DBPurge DBPurge `json:"dbPurge,omitempty"`
127130}
128131
129132// PasswordSelector to identify the DB and AdminUser password from the Secret
@@ -139,12 +142,25 @@ type PasswordSelector struct {
139142 Service string `json:"service"`
140143}
141144
145+ // DBPurge struct is used to model the parameters exposed to the Glance API CronJob
146+ type DBPurge struct {
147+ // +kubebuilder:validation:Optional
148+ // +kubebuilder:default=30
149+ // +kubebuilder:validation:Minimum=1
150+ // Age is the DBPurgeAge parameter and indicates the number of days of purging DB records
151+ Age int `json:"age"`
152+ // +kubebuilder:validation:Optional
153+ // +kubebuilder:default="1 0 * * *"
154+ //Schedule defines the crontab format string to schedule the DBPurge cronJob
155+ Schedule string `json:"schedule"`
156+ }
157+
142158// GlanceDebug defines the observed state of GlanceAPIDebug
143159type GlanceDebug struct {
144160 // +kubebuilder:validation:Optional
145161 // +kubebuilder:default=false
146- // CronJob enable debug
147- CronJob bool `json:"cronJob "`
162+ // DBPurge increases log verbosity by executing the db_purge command with "-- debug".
163+ DBPurge bool `json:"dbPurge "`
148164}
149165
150166// GlanceStatus defines the observed state of Glance
0 commit comments