Commit Graph

239 Commits

Author SHA1 Message Date
Nic Cope b01c234701 Don't attempt to update resource status after finalizer removal
This status update is only useful when:

* Some other controller also added a finalizer to this managed resource.
* The other controller has not yet processed the delete and removed its finalizer.

Given that this is a rare (or non-existent) edge case, and given that attempting
to update the status of a non-existent managed resource results in spurious
errors in the logs, I think it's safe to remove this logic.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-11-01 15:14:07 -07:00
Nic Cope 78e91b4b29 Don't trigger a requeue after a successful deletion
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-11-01 15:00:10 -07:00
Nic Cope a63f5b1c93 Requeue when no resource claims match labels or default annotations
Previously if no controller could schedule or default new claims they would
never try again.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 20:00:18 -07:00
Nic Cope 9b74c6d769 Make resource.CanReference a type of runtime.Object
We no longer need CanReference types to satisfy the metav1.Object interface. It
was used only to determine the namespace of the referencing object before all
such objects became cluster scoped.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 16:11:10 -07:00
Nic Cope bc04c33519 Resolve references on every reconcile
Reference resolution is now a no-op if nothing changes, so we run it on every
reconcile. We also run it after delete has been handled, so unresolved
references will only block creates and updates.

This commit means we'll make more get calls to the cache (or API) in order to
resolve our references each reconcile, and also risk potentially changing the
values of 'immutable' fields automatically if and when our references resources
change. I believe we should address this by having referencers be no-ops when
the field value they would set is already set.

I attempted to move reference resolution to right before we call create or
update (i.e. after observe and delete), but it turns out certain resources
(specifically GCP Connections) could need references to be resolved in order to
observe the external resource.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 16:11:10 -07:00
Nic Cope 5468d81383 Use real conditioned and binding statuses in mock objects
The mock binding status was identical to the real one, while the mock
conditioned status set only the most recent condition, leading to a few
slightly broken managed resource reconciler tests.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 13:27:40 -07:00
Nic Cope d5dadd4e74 Requeue after a short wait when references are not ready
the established convention is for the managed resource reconciler to requeue
after a short wait (typically 30 seconds) when it knows it is waiting for an
operation.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 13:27:30 -07:00
Nic Cope 5b01de5a4d Make reference resolution a no-op if assignments did not change anything
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 13:27:30 -07:00
Nic Cope 242629474a Remove attributereferencer tag check, make referencer finder pluggable
This commit refactors ResolveReferencers to allow the code that finds types
within a struct that satisfy AttributeReferencer to be swapped out. It also
updates the default AttributeReferencerFinder to avoid checking struct tags.

Previously errors were returned when:

1. A struct field tagged as a referencer did not satisfy AttributeReferencer
2. A struct field not tagged as a referencer satisfied AttributeReferencer

If either of these scenarios occurred, ResolveReferences would panic with the
returned error the first time it encountered an incorrectly written API type.
My feeling is that both of these conditions are testing for programmer errors
that would be better caught at build time than at runtime.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 13:27:30 -07:00
Nic Cope 4fbddd0d00 Clean up managed resource reconciler tests
No functional updates to the code here, just tidying up the tests a bit to
ensure they all mock out their various moving parts via options.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-31 12:35:28 -07:00
Nic Cope 6db5ced56a Trivial comment updates
Just wrapping a comment and updating the linter override to reflect that we've
moved beyond "slightly" over our cyclomatic complexity goal. :(

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-28 16:01:38 -07:00
Nic Cope 551efff860 Add tests for external name annotation back-propagation
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-24 21:07:40 -07:00
Nic Cope 799c22bda6 Set managed resource claim ref at binding time
We already set this reference at dynamic provisioning time, but we need it set
for (bound) statically provisioned managed resources too, so we set it
(potentially again) at binding time.

We must still set the reference at dynamic provisioning time in order to ensure
reconciles are queued for dynamically provisioned managed resources when they
become available.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-24 21:07:40 -07:00
Nic Cope 94a6b45721 Don't assume the class reference is set by dynamic provisioning time
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-24 02:30:11 -07:00
Nic Cope 6a97932337 Demonstrate panic when a resource references a claim without references
Despite past negz's optimistic comment to the contrary, we can't assume the
class reference is set by the time we get to the dynamic provisioning stage.
We are queued for managed resources that reference a claim, so we could reach
the dynamic provisioning stage without a class reference being set if a managed
resource referenced a claim that had no class reference or resource reference.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-24 02:29:46 -07:00
Nic Cope bd7fed5ad4 Requeue when a referenced managed resource does not yet exist
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-24 02:29:45 -07:00
Nic Cope 2baf308c91 Demonstrate panic when a claim references a non-existent resource
If a resource claim specifies a managed resource reference to a non-existent
managed resource we'll panic because we proceed and try to operate on our
managed resource's nil class reference.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-24 02:29:38 -07:00
Nic Cope a81fb19350 Increase claim scheduling and defaulting max jitter to 1.5 seconds
200ms seems low enough that GCP consistently beats Azure when scheduling
RedisCluster claims in my experiments.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-22 17:13:21 -07:00
Nic Cope 701387a302 Add a HasResourceClass predicate
For resource claim controllers, now that we're unconcerned with indirect
resource classes.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-22 17:13:21 -07:00
Nic Cope d7b4db0562 Add claim scheduling and defaulting controllers
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-22 17:13:21 -07:00
Nic Cope a2e24876e0 Use custom types for secret references
This allows us to require that name (and namespace where appropriate) are set at
the CRD level. In the case of cluster scoped resources that reference secrets
this is less surprising than defaulting to the `default` namespace when the
namespace is omitted.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-22 17:13:21 -07:00
Nic Cope 9f5188e0cb Assume resources, classes, and providers are cluster scoped
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-22 17:13:21 -07:00
Nic Cope a310ee6a4a Remove support for portable resource classes
This commit renames "non portable resource class" back to "resource class", and
requires that resource claims reference a (non portable) resource class in any
namespace.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-22 17:12:36 -07:00
soorena776 f063ec82d3 - Removing class level reference resolution if we can get away with it
- Removing the panic recovery logic
- Removing the superfluous IsConditionReady method
- Adding Nic's unit-tests for GetCondition and IsConditionTrue
- Minor other fixes

Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 17:05:15 -07:00
soorena776 8df7f7cab7 Change ReferenceResolver signature to accept CanReference type instead of Managed
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 f1f5375f5f move ReferenceResolver to execute before Observer
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 5ecced4f9e Update the Manage Resource after resolving references
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 2a086a07f6 Rename `ValidateReady` to `GetStatus` in `AttributeReferencer` interface, to show more granular information about the status of the referencers
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 b09e1340b6 Adding RefereceResolver tests to managed_reconciler_test.go
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 dad59a3c94 Adding Managed Referece Resolver unit tests
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 5ddae6010a Adding Managed ReferenceResolver to the Managed Reconciler
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 ee01116db1 Adding ManagedResolver
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
soorena776 1c6cccad93 Adding GetCondition to the Managed API
Signed-off-by: soorena776 <javad@upbound.io>
2019-10-21 16:39:26 -07:00
muvaffak onus d72012f1c2 Use managed resource name as external name (#45)
* - Introduces Initializer hook to managed reconciler.
- ManagedNameAsExternalName is introduced and used
  by default by all managed reconcilers.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

* GetExternalName and SetExternalName functions are implemented

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

* - Unit tests for ManagedNameAsExternalName struct
- Move ExternalNameAnnotationKey into meta package.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

* Remove Establisher mechanism and port existing
establisher to Initializer.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>

* Fix claim's external name annotation propagation to
the managed resource.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-10-15 10:23:05 -07:00
Nic Cope 15eb580eec
Merge pull request #42 from negz/spreadingsecrets
Constantly propagate connection secrets
2019-10-09 14:09:27 -07:00
Muvaffak Onus 41dbfa349a Use new naming scheme for managed resources.
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-10-09 21:49:54 +03:00
Nic Cope 88193ba371 Add AllOf watch predicate
Same idea as the existing AnyOf predicate, but it requires all predicates pass.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-08 00:45:05 -07:00
Nic Cope 894481e637 Propagate connection secrets
This commit allows constant propagation of connection secrets from managed
resources to their bound resource claims. It does this by updating the existing
APIManagedConnectionPropagator to add 'propagation annotations', which can be
used by a new 'secret propagating reconciler' to watch both secrets for constant
propagation. The predicates and enqueue handler required to implement this are
included.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-10-08 00:25:11 -07:00
hasheddan d80bbd931a predicates: remove deprecated hasdirectclassreferencekind
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-27 12:14:10 -05:00
Nic Cope d8050430d1
Merge pull request #31 from negz/somanypredicates
Add an IsManagedKind watch predicate.
2019-09-18 17:29:09 -07:00
Nic Cope f1075e19e4 Add an IsManagedKind watch predicate.
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-18 15:13:38 -07:00
Nic Cope 54cc532c3a Add package doc for crossplane-runtime
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-18 14:40:41 -07:00
Nic Cope 0431952909 Rename all predicates to start with 'Has'
...because I am pedantic.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-15 01:36:28 -07:00
Nic Cope 8a3e590467 Refactor predicates to support static provisioning
We currently support dynamic provisioning in the resource claim reconciler
by using a watch predicate that allows either managed resources that directly
reference a non-portable resource class of a given kind, or resource claims that
reference a non-portable resource class of a given kind indirectly via a
portable resource class.

To support static provisioning (i.e. explicitly claiming an existing managed
resource) we must also allow resource claims that explicitly reference a managed
resource. Writing one predicate to do all of this was getting cumbersome, so I
have refactored the predicate interface a little.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-15 01:36:28 -07:00
Nic Cope 57a3b0cff1 Support managed resources that do not reference a class
Controllers built against crossplane-runtime will currently panic if they
encounter a managed resource without a class reference. Any dynamically
provisioned managed resource will have a class reference, but this breaks
the static provisioning workflow.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-13 19:32:10 -07:00
Nic Cope 1e900a411e Add a predicate that supports both resource claims and managed resources
It turns out both our watches use the same predicate and apply it to the watched
kind, not the kind that actually gets enqueued.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-13 00:01:11 -07:00
Nic Cope c170676a62 Have PCR predicate accept a slightly smaller interface.
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-12 23:35:04 -07:00
hasheddan 83aac58038 fix broken error values in tests
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-13 00:41:57 -05:00
Nic Cope 5230aa5383
Merge pull request #13 from hasheddan/portable-class
Implement portable classes
2019-09-11 21:29:03 -07:00
hasheddan 06cc35d1e3 class to nonportable class
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-11 22:59:59 -05:00
hasheddan 161ab47fb3 portable and nonportable
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-11 16:23:44 -05:00
hasheddan 5f7248620b remove CreateOrUpdate in favor of controller-runtime
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-11 09:11:55 -05:00
hasheddan 1232c87947 portable classes: default class reconcile with label
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-11 08:46:51 -05:00
hasheddan 80eeac1347 implement portable classes
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-09-10 19:06:05 -05:00
Nic Cope ab3cac0175 Don't update managed resources if we determine they're up to date
This allows us to determine whether an external resource needs updating inside
the Observe method, which must already get a fresh copy of the external resource
from the cloud provider API in order to determine whether it exists and update
the managed resource's status.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-09-05 01:10:10 -07:00
Nic Cope 06b6b7dd87 Make writeConnectionSecretToRef optional
https://github.com/crossplaneio/crossplane/issues/719

The resource claim reconciler (and API definitions) consider
writeConnectionSecretToRef to be optional, but the managed resource reconciler
fails if it is not specified. This change aligns the codebase on the reference
being optional. Managed resources that do not specify a secret reference will
provision successfully without publishing their connection details to a secret.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-08-27 19:55:29 -07:00
hasheddan 99f439d5b9 runtime migration: markdown and makefile
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-08-20 21:33:39 -05:00
hasheddan 6d90659a5f runtime migration: remove objecthasprovisioner predicate as no longer needed with strongly typed resource classes
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-08-20 09:29:11 -05:00
hasheddan 7d786e2dff runtime migration: strip apis and update dependencies
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-08-20 09:27:20 -05:00
hasheddan 5c1fdc1caa defaultclass: add all policies and remove deprecated default controllers
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-08-19 11:38:54 -05:00
hasheddan a72525edae kubebuilderv2: update core packages and tooling
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Co-authored-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Co-authored-by: Jared Watts <jbw976@gmail.com>
Co-authored-by: hasheddan <georgedanielmangum@gmail.com>
2019-08-13 17:39:59 -05:00
Jared Watts 07d9fe6e26 Merge pull request #626 from hasheddan/strong-phase1
Enable Strongly Typed Resource Classes
2019-08-02 08:41:30 -07:00
hasheddan 9c60da21bc strongly typed phase one: implement default class reconciler for strongly typed resource classes
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Co-authored-by: Nic Cope <negz@rk0n.org>
2019-08-02 09:59:19 -05:00
Muvaffak Onus ca248a6d0f - Added new unit tests to Managed Reconciler.
- Added unit tests for Managed Finalizer Remover & Adder types.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-08-01 09:05:23 +03:00
Nic Cope 1a3451d074 Merge pull request #603 from muvaf/comment-impl
Implement Generic Managed Reconciler
2019-07-31 00:12:26 -07:00
Muvaffak Onus f3905eef13 - Unnecessary comments are removed.
- WithLongWait and WithShortWait are used in tests.
- Some of cosmetic issues are fixed.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-07-31 09:26:14 +03:00
Nic Cope 0681f18c20 Fix typo in license headers
This looks suspiciously like a find and replace bug.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-30 21:07:12 -07:00
Muvaffak Onus 19daef9388 New tests for non-deletion scenarios added to Managed Reconciler.
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-07-30 14:35:57 +03:00
Muvaffak Onus 542990b820 - Elasticache managed reconciler Create call made idempotent to AlreadyExists error.
- Naming fixes.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-07-29 11:12:32 +03:00
Muvaffak Onus 94040da9f9 Managed Reconciler unit tests
- Tests for the interaction between Managed<>External resource.
- make reviewable fixes.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-07-26 18:15:06 +03:00
Muvaffak Onus 447f064ca8 ManagedPublisher is extended to include UnpublishConnection function for manual garbage
collector for the resources that contributor did not hand over to kubernetes.

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-07-25 10:16:27 +03:00
Muvaffak Onus 499278c1dd - Managed resource is finalized only if the deletion of the external resource has been
confirmed by an Observe call.
- Reclaim polciy logic has been moved up to generic managed reconciler since we have
enough information on that level to decide whether external resource should be deleted
or not.
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
2019-07-25 10:14:35 +03:00
Nic Cope 91598b2e3f Add a shared managed resource reconciler
This reconciler can be used to reconcile any resource that satisfies the Managed
interface.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-23 12:37:19 -07:00
Nic Cope d0240a6a02 Require Managed resources to support setting conditions
This will allow us to set conditions as part of a generic managed resource
reconciler that operates on the Managed interface.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-18 19:53:09 -07:00
Nic Cope 809c979954 Move the claim reconciler to an appropriately named file
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-18 09:19:35 -07:00
Nic Cope 0224bec7d0 Merge pull request #565 from hasheddan/default-resource-classes
Default resource classes
2019-07-17 19:29:09 -07:00
hasheddan 2a0fb9efd4 default resource classes: implementation
Co-Authored-By: Nic Cope <nicc@rk0n.org>
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-07-17 21:19:45 -05:00
hasheddan d787a8c9cf header typos: correct author spelling
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
2019-07-17 19:20:04 -05:00
Nic Cope b3da55f2be Update all copyrights to 2019
This commit was generated via s/Copyright 2018/Copyright 2019/g

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-10 20:16:40 -07:00
Nic Cope 6c882fbf83 Rename BindingPhaseUnknown to BindingPhaseUnset
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-08 11:28:47 -07:00
Nic Cope 26e5f5c0b8 Revert to a string BindingPhase
This effectively reverts https://github.com/crossplaneio/crossplane/pull/325.

I still think it would be ideal to represent BindingState as an int with a sane
zero value that marshaled to a JSON string, but it is currently impossible to
override the type of the field that is used when generating an OpenAPI spec per
https://github.com/kubernetes-sigs/controller-tools/issues/155. Until that issue
is closed it seems better to simply make this a string with a meaningless zero
value.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-07-05 16:19:42 -07:00
Nic Cope fcb9e3663a Create managed resources in their resource class's namespace
https://github.com/crossplaneio/crossplane/issues/92

This returns to our historical behaviour of creating managed resources in the
namespace of thier resource class, not that of their resource claim. I believe
this pattern to be flawed, but mostly changed it in order to leverage owner
references (which cannot cross namespaces) in order to allow a claim to watch
the resources it controls.

Instead we maintain the historical behaviour for the time being, using a custom
event handler to enqueue requests for a resource's claim (reference).

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-27 00:20:40 -07:00
Nic Cope 6e3d341349 Follow API conventions for object reference fields
I had previously attempted to standardise on fooReference for an ObjectReference
to a Foo, because we had a mix of fooRef and fooReference. Turns out the API
conventions document has a position on this and says we should use fooRef. I've
kept the actual Go fields named 'FooReference' for readability, but renamed the
struct tags to 'fooRef'. I've also renamed 'writeConnectionSecretTo' to
'writeConnectionSecretToRef' since it is also a reference.

https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#object-references

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-26 11:40:11 -07:00
Nic Cope e75c2b4f5c Set all managed resources to 'unbound' when they become available
The resource claim controller uses this binding phase to determine whether a
managed resource is available for binding to a resource claim.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-24 23:47:12 -07:00
Nic Cope 68a7580935 Add new resource claim reconciler.
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-24 23:47:11 -07:00
Nic Cope 9b70f00113 Use camelcase resource kinds
These kinds must be camelcase in order to resolve them to a runtime.Object via
a runtime.Scheme.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-24 18:06:19 -07:00
Nic Cope a893baf2e8 Rename the ManagedResource interface to Managed
This way it reads resource.Managed, not resource.ManagedResource.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-24 16:10:18 -07:00
Nic Cope b27d9df2c5 Update all API types to satisfy the Resource or Claim interfaces
There's _a lot_ going on in this commit. I've updated all resources to use the
embedded ResourceSpec, ResourceStatus, ResourceClaimSpec, etc structs and added
methods to ensure they satisfy the Resource and Claim interfaces.

I've also updated all controllers to suit. I've tried my best to limit the scope
of these changes to switching all controllers and their tests to:

* Use the new ConditionedStatus
* Use their WriteConnectionSecretTo field instead of generating a secret name
* Use the new ProviderReference field (which supports referencing Providers in
  a different namespace)

I also updated many tests to use the '-want, +got' style annotation. This came
into scope mostly for my own sanity, as it allows me to read all test output the
same way when updating tests across many packages.

Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-24 16:10:18 -07:00
Nic Cope 4f2af2ec96 Replace the core resource and claim interfaces
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-06-24 11:51:22 -07:00