crossplane / example-cnp

Platform API as Configuration
Apache License 2.0
11 stars 5 forks source link

Consider declaring dependencies on Configurations and Providers explicitly #8

Closed hasheddan closed 4 years ago

hasheddan commented 4 years ago

I ran into this today while working on the package manager where I had a Configuration with dependencies on a Provider. The a Configuration was created in the cluster, but when the controller read the dependencies of that Configuration and went to install them, it didn't know whether to create the depended upon package as a Provider or a Configuration. One way to work around this is to unpack the dependency first, see which type of package it is, then create that type. However, if we are explicitly distinguishing these package type it may make more sense to just declare provider dependencies and configuration dependencies separately.

negz commented 4 years ago

@hasheddan Are you thinking something like:

spec:
  dependsOn:
  - configuration: exampleco/cnp-eks
    version: "0.1.0"
  - configuration: exampleco/cnp-fluentbit
    version: "0.1.0"

Where one could write provider instead of configuration?

hasheddan commented 4 years ago

@negz yep! That would work, or keeping it as package and then declaring type: Provider would be fine, but I tend to like your solution better 👍

prasek commented 4 years ago

@hasheddan think https://github.com/crossplane/crossplane/issues/1842 supersedes this, can we close this issue out?

hasheddan commented 4 years ago

@prasek yep!