crossplane / crossplane/upjet

Unresolved Secrets are ignored

Open
#651 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
481
Forks
131
Avg merge
2d 1h
Merged PRs (30d)
11

Description

Currently, unresolved secrets are ignored by generated providers. The properties are simply left unset.

This leads to unexpected behaviour during creation because often the resources are created at the same time as the secrets leading to a race condition. Some resources are created correctly while others are created with omitted properties where the secrets weren't ready soon enough. These resources will only be fixed in the next reconciliation run, being setup incorrectly until then.

I propose unresolved secrets should result in an error being thrown by the provider and the default retry mechanism being invoked. This way, the provider will not create a resource until the secrets it requires have been created and are set correctly.

I think this would require a change here https://github.com/crossplane/upjet/blob/c1b0e087b75abd17a63fda232c6df28685e2d734/pkg/resource/sensitive.go#L235-L246
Unless the resource is in deletion, this error should not be ignored here. We could probably check for a deletion timestamp to handle both cases. What do you think?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.