Panfactum / stack

The Panfactum Stack
https://panfactum.com
Other
16 stars 5 forks source link

[question]: Cloudnative pg backup schedule triggering outside of defined schedule #120

Closed wesbragagt closed 3 months ago

wesbragagt commented 3 months ago

Prior Search

What is your question?

In my db cluster I have set for backups to run daily at 7am UTC however I'm noticing that they are getting triggered on a hourly basis. Is there another area of the stack that I can check this definition? Or something else that could be causing this? Am I off by a digit on the cron?

For context it's 11:30am CST for me.

Name:         pg-88cc-default
Namespace:    implentio
Labels:       <none>
Annotations:  <none>
API Version:  postgresql.cnpg.io/v1
Kind:         ScheduledBackup
Metadata:
  Creation Timestamp:  2024-08-23T06:47:40Z
  Generation:          1
  Resource Version:    67537141
  UID:                 0043e2f0-e1ee-42da-8f89-98b22692b084
Spec:
  Backup Owner Reference:  cluster
  Cluster:
    Name:    pg-88cc
  Method:    barmanObjectStore
  Schedule:  0 7 * * *
Status:
  Last Check Time:     2024-08-26T16:07:00Z
  Last Schedule Time:  2024-08-26T16:07:00Z
  Next Schedule Time:  2024-08-26T17:07:00Z
Events:
  Type    Reason          Age   From                            Message
  ----    ------          ----  ----                            -------
  Normal  BackupSchedule  19m   cloudnative-pg-scheduledbackup  Next backup scheduled by 2024-08-26 17:07:00 +0000 UTC

What primary components of the stack does this relate to?

terraform

Code of Conduct

wesbragagt commented 3 months ago

@Saschl how is this related to the problem? Could you clarify the recommendation?

fullykubed commented 3 months ago

@wesbragagt I believe you are using the wrong cron expression format.

Specifically, CNPG uses Go's cron format, not linux's. See the docs here.

fullykubed commented 3 months ago

We should probably add a validator for that on our end as it appears that CNPG does not provide one.

wesbragagt commented 3 months ago

Understood, yeah it would be a good add. I'm unblocked. Thank you.