Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(oncall): use selectors rather than refs #29

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexander-bauer
Copy link
Contributor

  • fix(oncall): use claim name selectors for Integrations and EscalationChains
  • fix(oncall): use selectors for OnCallShift membership in Schedules

…Chains

When resources generated by previous versions of this subpackage refer
to other resources, they use the resource's claim name as opposed to its
(generated) resource name. This change replaces those references with
selectors, which use the claim name in a `matchLabel` statement.
escalation.new(id)
+ escalation.spec.parameters.forProvider.escalationChainRef.withName(self.chainName)
+ escalation.spec.parameters.forProvider.escalationChainSelector.withMatchLabels({
'crossplane.io/claim-name': this.chainName,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Theoretically, the same claim-name could exist in a different namespace, so this is probably not sufficient in the long run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a downside of keeping all the logic in jsonnet as opposed to using Crossplane Compositions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't/won't escalationChainRef.withName() work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants