clickhouse-operator icon indicating copy to clipboard operation
clickhouse-operator copied to clipboard

deletion of PVC when PV size altered with ArgoCD with prune enabled

Open prashant-shahi opened this issue 2 years ago • 2 comments

We had recently introduced a K8s Job for DB schema migrations and prune option enabled in ArgoCD.

It worked fine for sometime. However in some case of CHI PVC size change, we noticed release and deletion of PVCs - even with Retain policy at CHI manifest.

We have reverted back prune option to disabled for now.

prashant-shahi avatar Nov 16 '23 05:11 prashant-shahi

Also, noticed the PostSync jobs were created before all of the three shards were created/updated.

prashant-shahi avatar Nov 16 '23 14:11 prashant-shahi

@prashant-shahi , consider adding following configuration snippet:

apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseOperatorConfiguration"
metadata:
  name: "exclude-argocd-labels"
spec:
  label:
    exclude:
      - argocd.argoproj.io/instance

It require operator restart. This is an instructions to not propagate argocd label to downstream resources. That should sure ArgoCD will not touch resources managed by operator

alex-zaitsev avatar Aug 15 '24 09:08 alex-zaitsev