Closed dyurchanka closed 1 month ago
I have the same issue. StoredVersion is v1beta1 and thus the softDeletePolicy
is ignored.
Interesting 🤔 soft_delete_policy
is a singleton list field. It is converted to an object in v1beta2, but it doesn't exist in the v1beta1 schema in the first place. Therefore, conversion to storage version v1beta1 is lossy.
We discussed the issue with @ulucinar and @turkenf. First of all, this is a known issue. On the surface, the issue may seem fixable by upgrading the storage version. Even though doing so will relieve some of the symptoms, some will remain and others are likely to surface. The fundamental issue is the lack of a lossless conversion mechanism between API versions. Therefore, the storage version doesn't matter.
To address the issue, we will implement conversion webhooks for affected APIs. Ideally, we would like to implement a generic solution, so that appropriate conversion mechanisms can be configured wherever applicable.
To resolve this issue, we added softDeletePolicy
to v1beta1
:
Conversion is handled by the identity conversion function.
Is there an existing issue for this?
Affected Resource(s)
apiVersion: storage.gcp.upbound.io/v1beta2 kind: Bucket
Resource MRs required to reproduce the bug
No response
Steps to Reproduce
1) Create bucket with softDeletePolicy policy
2) Observe state: softDeletePolicy missing in spec and it is trying to use default value 604800
What happened?
retentionDurationSeconds in softDeletePolicy is ignored. It is not reflected in spec of CR. softDeletePolicy was introduced in v1beta2 and missing in v1beta1. Stored version for this CRD is v1beta1, which missing softDeletePolicy definition in schema
Relevant Error Output Snippet
No response
Crossplane Version
1.16.0
Provider Version
1.5.0
Kubernetes Version
1.28.11
Kubernetes Distribution
GKE
Additional Info
Please note, that 412 error is because ORG policy, that allows only 0 value for softDeletePolicy retention, ignore it.
Provider info: