coreos / etcd-operator

etcd operator creates/configures/manages etcd clusters atop Kubernetes
https://coreos.com/blog/introducing-the-etcd-operator.html
Apache License 2.0
1.75k stars 740 forks source link

backup-operator - ABS - backupPolicy - maxBackups doesn't cleanup old backup blobs in Azure SA account #2144

Open rhollins opened 4 years ago

rhollins commented 4 years ago

Backup operator ignoring maxbackups setting and creating new blobs without deleting the old one. blob format: etcd.backup_v3_2019-12-15-15:57:59

This is running on AKS K8s version 1.14.8, storage account type: BlobStorage

etcdbackup definintion:

apiVersion: "etcd.database.coreos.com/v1beta2"
kind: "EtcdBackup"
metadata:
  name: example-etcd-cluster-1-backup
  namespace: admin
spec:
  backupPolicy:
    backupIntervalInSecond: 125
    maxBackups: 4  
  etcdEndpoints: ["http://example-etcd-cluster-1-client:2379"]
  storageType: ABS
  abs:
    # The format of the path must be: "<abs-container-name>/<path-to-backup-file>"
    path: etcd-backups/etcd.backup
    absSecret: abs-credentials

error in cr status (but backup still works):

status:
  Reason: 'failed to save snapshot (create etcd client failed: failed to get etcd
    client with maximum kv store revision: could not create an etcd client for the
    max revision purpose from given endpoints ([http://example-etcd-cluster-1-client:2379]))'
  etcdRevision: 3
  etcdVersion: 3.2.13
  lastSuccessDate: "2019-12-15T16:12:34Z"
  succeeded: false