Checklist
Bug Description
Attempting to delete a StorageBucketAccessControl (or StorageDefaultObjectAccessControl) resource after its referenced StorageBucket has already been deleted fails with the following error:
Delete call failed: error fetching live state: error getting ID for resource: error getting value from reference: could not parse reference resolution value '<nil>' as string
It seems that the StorageBucket needs to be deleted first. Otherwise, the only way to unstuck the delete is to do a forced cleanup.
Additional Diagnostic Information
Kubernetes Cluster Version
Client Version: v1.21.0
Server Version: v1.18.16-gke.2100
Config Connector Version
Config Connector Mode
Log Output
N/A
Steps to Reproduce
Steps to reproduce the issue
- Apply both the
StorageBucket and StorageBucketAccessControl below.
- Wait for both to be
UpToDate.
- Delete the
StorageBucket.
- Delete the
StoageBucketAccessControl.
- Observe that
StorageBucketAccessControl fails with DeleteFailed.
The same is true if you replace StorageBucketAccessControl with a StorageDefaultObjectAccessControl resource instead.
YAML snippets
- StorageBucket:
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucket
metadata:
annotations:
cnrm.cloud.google.com/project-id: my-project
name: my-bucket
- StorageBucketAccessControl:
apiVersion: storage.cnrm.cloud.google.com/v1beta1
kind: StorageBucketAccessControl
metadata:
name: my-bucket-access-control
spec:
bucketRef:
name: my-bucket
entity: allAuthenticatedUsers
role: READER
Checklist
Bug Description
Attempting to delete a
StorageBucketAccessControl(orStorageDefaultObjectAccessControl) resource after its referencedStorageBuckethas already been deleted fails with the following error:It seems that the
StorageBucketneeds to be deleted first. Otherwise, the only way to unstuck the delete is to do a forced cleanup.Additional Diagnostic Information
Kubernetes Cluster Version
Config Connector Version
Config Connector Mode
Log Output
N/A
Steps to Reproduce
Steps to reproduce the issue
StorageBucketandStorageBucketAccessControlbelow.UpToDate.StorageBucket.StoageBucketAccessControl.StorageBucketAccessControlfails withDeleteFailed.The same is true if you replace
StorageBucketAccessControlwith aStorageDefaultObjectAccessControlresource instead.YAML snippets