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

Stacks and Workloads should use bespoke status conditions #790

Closed
negz opened this issue Sep 13, 2019 · 2 comments
Closed

Stacks and Workloads should use bespoke status conditions #790

negz opened this issue Sep 13, 2019 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers user experience

Comments

@negz
Copy link
Member

negz commented Sep 13, 2019

What happened?

When installing the GCP stack I went to inspect its status and noticed that its conditions state the "managed resource" is being created, and has successfully been reconciled. "Managed resource" in Crossplane parlance typically means "Crossplane resource that represents an external resource", typically in a cloud provider - RDSInstance is a "managed resource" because it represents an AWS RDS instance. MySQLInstance (a resource claim), KubernetesApplication, and StackRequest are not managed resources.

$ kubectl -n gcp describe stackrequest
Name:         stack-gcp
Namespace:    gcp
API Version:  stacks.crossplane.io/v1alpha1
Kind:         StackRequest
Spec:
  Package:  build-1be35bec/stack-gcp-amd64:latest
Status:
  Conditioned Status:
    Conditions:
      Last Transition Time:  2019-09-13T02:49:24Z
      Reason:                Managed resource is being created
      Status:                False
      Type:                  Ready
      Last Transition Time:  2019-09-13T02:49:24Z
      Reason:                Successfully reconciled managed resource
      Status:                True
      Type:                  Synced
  Install Job:
    Name:       stack-gcp
    Namespace:  gcp
Events:         <none>

crossplane-runtime exposes a handful of frequently used conditions, including Available, Deleting, and ReconcileError, but is otherwise unopinionated about what conditions a resource supports. The aforementioned frequently used conditions all mention "managed resources" because that wording makes sense in the context of reconciling a managed resource claim or resource claim. It does not make sense for a stack or a workload; Stacks and Workloads should define their own variants of these conditions with contextually appropriate "reason" messages.

How can we reproduce it?

What environment did it happen in?

Crossplane version:

@negz negz added bug Something isn't working user experience good first issue Good for newcomers labels Sep 13, 2019
@negz
Copy link
Member Author

negz commented Jan 31, 2020

@muvaf did a little related work in crossplane/crossplane-runtime#99, in that we no longer say "managed resource", but rather just "resource". Despite this I think there could still be value in using bespoke conditions.

@negz
Copy link
Member Author

negz commented Apr 3, 2020

In retrospect, I think the work per the previous comment is enough that we don't need an issue tracking this.

@negz negz closed this as completed Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers user experience
Projects
None yet
Development

No branches or pull requests

1 participant