Problem
Numerous resources are created with GenerateName. If the listers are stale, this can cause the resources to be created multiple times, as an existing resource is not found. We should use predetermined, fixed names, rather than GenerateName, so that we will get 409, rather than duplication when the lister is stale.
Persona:
Developers.
Exit Criteria
No resource created by an Eventing reconciler uses GenerateName
Non-goal
These are explicit non-goals:
- It is not a goal that names need to be determined before the object is created.
- For example, a
Channel's K8s Service may include the Channel's UID, which will not be known before the Channel is created. It is still deterministic for the given Channel, but not guessable before the Channel is created.
- A guessable name for
Channel's may be a good idea, but is unrelated to this feature.
- It is not a goal that fixed names will stay fixed forever.
- As long as the reconciler understands the safety of the name change, it is allowed to do so. For example, the K8s
Service for a Channel may change to a new fixed name scheme. As all usage of the Channel must be through the addressable contract, this change will not negatively affect other components.
Additional context (optional)
Multiple Subscriptions generated by a single Trigger is especially pernicious and has been observed in practice.
Problem
Numerous resources are created with GenerateName. If the listers are stale, this can cause the resources to be created multiple times, as an existing resource is not found. We should use predetermined, fixed names, rather than GenerateName, so that we will get 409, rather than duplication when the lister is stale.
Persona:
Developers.
Exit Criteria
No resource created by an Eventing reconciler uses
GenerateNameNon-goal
These are explicit non-goals:
Channel's K8sServicemay include theChannel's UID, which will not be known before theChannelis created. It is still deterministic for the givenChannel, but not guessable before theChannelis created.Channel's may be a good idea, but is unrelated to this feature.Servicefor aChannelmay change to a new fixed name scheme. As all usage of theChannelmust be through the addressable contract, this change will not negatively affect other components.Additional context (optional)
Multiple
Subscriptions generated by a singleTriggeris especially pernicious and has been observed in practice.