Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Admit "<cluster>" when parsing ResourceIDs #1851

Merged
merged 1 commit into from
Mar 21, 2019

Conversation

squaremo
Copy link
Member

The PR #1442 introduce code to determine which namespace, if any, each
manifest belongs to. To distinguish between resources that need a
namespace but don't have one, and resources that are cluster-scoped,
it introduced the sentinel value <cluster> for the latter.

Regrettably, I didn't accompany this with code for parsing those
sentinel values, since I reasoned that it would only be used
internally. But the sync events generated by fluxd include a list of
changed resources, and those inevitably will include things like
namespaces that are cluster-scoped. The result is that fluxd will
generate events that cannot then be parsed by the receiver.

This commit fixes that by recognising <cluster> as a namespace when
parsing resource IDs.

The PR #1442 introduce code to determine which namespace, if any, each
manifest belongs to. To distinguish between resources that need a
namespace but don't have one, and resources that are cluster-scoped,
it introduced the sentinel value `<cluster>` for the latter.

Regrettably, I didn't accompany this with code for _parsing_ those
sentinel values, since I reasoned that it would only be used
internally. But the sync events generated by fluxd include a list of
changed resources, and those inevitably will include things like
namespaces that are cluster-scoped. The result is that fluxd will
generate events that cannot then be parsed by the receiver.

This commit fixes that by recognising `<cluster>` as a namespace when
parsing resource IDs.
@squaremo squaremo merged commit 48966b9 into master Mar 21, 2019
@squaremo squaremo deleted the issue/1843-cluster-scope-sentinel branch March 21, 2019 17:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants