crossplane-contrib / crossplane-contrib/function-sequencer

function can create Usages with the same metadata.name

Open
#146 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
37
Forks
19
Avg merge
1d 14h
Merged PRs (30d)
4

Description

### What happened?
When a Composition generates resources with the same `metadata.name` and `kind` but different API group/version - such as `ProviderConfig.helm` and `ProviderConfig.kubernetes` - the `Usages` created for these resources will have the same `metadata.name` because only the resource `kind` and `metadata.name` is included in the generated `metadata.name`, the API group/version is excluded and is the only differentiating factor. This results in a single `Usage` getting created but it toggles back and forth between the two resource dependencies on each subsequent reconciliation.

### How can we reproduce it?
Using a composition that generates a `ProviderConfig.helm` and `ProviderConfig.kubernetes` which have the same `metadata.name` and are both sequenced to depend on another common resource.

Observe that there is a single generated `Usage` that gets recreated on every reconciliation and toggles back and forth between the two resources.

The function should leave the `Usage` name generation up to the kubernetes API server, and it should also leave the `reason` field blank so that the `Usage` controller can populate it automatically.

### What environment did it happen in?
Function version: v0.5.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.