Info

Finalizers are a way for Kubernetes Operators to attach extra protection for volumes.

For example:

  • You are writing a CSI and you want to attach to the pvc deletion and before a pvc is deleted, to actually clean up the data

Custom Finalizer

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: my-pvc
  finalizers:
    - broadcom.com/stef
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi