harbor-operator
harbor-operator copied to clipboard
In cluster postgresql is not deleted when harborcluster is deleted
If you are reporting a problem, please make sure the following information are provided:
Expected behavior and actual behavior: in cluster postgresql is deleted when harborcluster deleted
Steps to reproduce the problem: create harborcluster and delete it.
Versions: 1.4.0-rc1
- harbor operator version: [1.4.0-rc1]
- harbor version: [2.6.2]
- kubernetes version: [1.22.5-1838+1788b8dfe2f099-dirty] (openshift se3rver version 3.0.0-1502)
- Any additional relevant versions such as CertManager
Additional context:
-
Harbor dependent services:
- Context info of postgreSQL : spilo-13:2.1-p1
- Context info of Redis
- Context info of storage
- Log files: Collect logs and attach them here if have.
- Kubernetes: How Kubernetes access was provided (what cloud provider, service-account configuration, ...).
see below, no OwnerReference for auto created postgresql.
the root cause is, in postgresql controller update method, when comparing actual CR to expect CR, expect CR has no OwnerReference but actual CR has. So that it will be updated without OwnReference.
created pull request to fix it https://github.com/goharbor/harbor-operator/pull/1014