-
Notifications
You must be signed in to change notification settings - Fork 59
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
WIP: Test XP 1.14 Usage kind #113
Conversation
Signed-off-by: Steven Borrelli <steve@borrelli.org>
Signed-off-by: Hasan Turken <turkenh@gmail.com>
Signed-off-by: Steven Borrelli <steve@borrelli.org>
Signed-off-by: Steven Borrelli <steve@borrelli.org>
kind: XEKS | ||
by: | ||
apiVersion: helm.crossplane.io/v1beta1 | ||
kind: Release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a direct dependency on Release
MR, not XServices XR to avoid Foreground deletion style, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I may test it against the Composite again with foreground deletion enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it will work across Composites (without a claim). I tested using defaultCompositeDeletePolicy and it seemingly does not work on XRs that are created without a Claim (as in XServices), so XService
gets deleted immediately and takes the Usage
and XEKS
with it, leaving the Release.helm
unable to delete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting compositeDeletePolicy: Foreground
in the Cluster
Claim seems to work with a usage between composites. I'll keep testing.
Signed-off-by: Steven Borrelli <steve@borrelli.org>
c817b8a
to
c60cc75
Compare
Updated to use Foreground deletion on the claim so that the usage is between composites. I left the older example of the MR usage in the code commented out for now. kubectl get usages
NAME DETAILS READY AGE
borrelli-usage-2brd6-v8zmq XServices/borrelli-usage-2brd6-k86mj uses XEKS/borrelli-usage-2brd6-gjvx7 True 4m36s |
@@ -3,6 +3,7 @@ kind: CompositeResourceDefinition | |||
metadata: | |||
name: xclusters.aws.platformref.upbound.io | |||
spec: | |||
defaultCompositeDeletePolicy: Foreground |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be sufficient without passing a special flag to kubectl?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but only if we have a claim applied. It will not work if we create the XR without a claim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirmed via testing an XR that even if the XRD has defaultCompositeDeletePolicy: Foreground
set, it is not set unless a Claim is provisioned.
I believe this wouldn't work if someone wants to interact with composites directly (unless they pass a special flag to kubectl delete), right? I think we should rather go with the solution that would work for both background/foreground deletion policies, not to promote this in our reference platforms and cause confusions later. |
I guess my issue with this is one of encapsulation, for example in this code we have an MR inside a composition creating a If we have the MR inside XServices refer to something like another MR, (like a - name: release-uxp-uses-xeks
base:
apiVersion: apiextensions.crossplane.io/v1alpha1
kind: Usage
spec:
of:
apiVersion: aws.platformref.upbound.io/v1alpha1
kind: XEKS
by:
apiVersion: helm.crossplane.io/v1beta1
kind: Release |
@stevendborrelli thanks - i implemented this change + XApps in #116 |
Description of your changes
This PR utilizes the Usage tracking being added to Crossplane 1.14 in crossplane/crossplane#4444. Do not merge until the release of 1.14.
To install a compatible version of Crossplane, run:
Fixes #
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR, as appropriate.How has this code been tested
Work in progress.