After some discussion amongst the community we felt this more accurately
represents a credentials source where credentials are derived from the
provider pod's identity (i.e. env vars, files, etc).
Signed-off-by: Nic Cope <negz@rk0n.org>
This field distinguishes credentials configuration from other (currently
hypothetical) aspects of provider configuration. It also introduces a
'spec.credentials.source' field that can be used to determine which credentials
source the provider intends to use.
Signed-off-by: Nic Cope <negz@rk0n.org>
Downstream consumers may implement their own linter functions, but the
core linter loop can be generalized, as well as helper functions such as
Or.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
DefaultParser is not descriptive of the Parser implementation's purpose.
PackageParser indicates the this parser is meant for parsing packages.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
I was originally thinking this wouldn't be useful, but I'm starting to find some
places it could help with testing. It may also help switch out implementations
in future.
Signed-off-by: Nic Cope <negz@rk0n.org>
Bumps the timeout for golangci-lint from the default 1m duration to
match the build submodule lint timeout, which is 10m.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
This cocndition indicates that a ProviderConfig is being deleted, but blocking
because it still has users. The condition mirrors the similar PVC condition.
There is no inverse of 'Terminating', because a ProviderConfig cannot recover
from the condition.
Signed-off-by: Nic Cope <negz@rk0n.org>
Credentials secrets are used by ProviderConfigs. They should be optional, since
a ProviderConfig may use a form of authentication that does not involve secrets.
This is a breaking API change, though I believe this interface was orphaned and
not actually in use anywhere.
Signed-off-by: Nic Cope <negz@rk0n.org>
This commit adds a reconciler and some utiltiies that allow Crossplane providers
to track the usage of their ProviderConfig resources. To do so, a provider must:
* Apply a ProviderConfigUsage each time a managed resource successfully connects
to its external API using a ProviderConfig (or is reasonably expected to be
about to do so). The Apply should be a no-op if there is an existing
ProviderConfigUsage for the managed resource - the IsNotAllowed ApplyOption
may be used to establish this.
* Start a controller that watches for ProviderConfigs and ProviderConfigUsages
using the supplied providerconfig.Reconciler.
Signed-off-by: Nic Cope <negz@rk0n.org>
This allows users of the MustBeControllableBy ApplyOptions to determine how to
handle the case in which a resource cannot be applied because it is not
controllable - e.g. to abort the apply operation without returning an error.
Signed-off-by: Nic Cope <negz@rk0n.org>
The references resolved condition was marked deprecated in v0.8 and has no known
callers. The secret resolution success condition is only used by the target
controller.
Signed-off-by: Nic Cope <negz@rk0n.org>
Removes outdated comment suggesting using ObjectReference as function
parameters as we now prefer to use a more scoped reference type.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
This updates the AsOwner and AsController to use TypedReference, which
is a more scoped version of ObjectReference that still contains all
necessary fields to create a controller or owner reference for an
object.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
ReferenceTo returns a pointer to an ObjectReference, which should be
avoided in favor of a more scoped reference type.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Adds a TypedReferenceTo utility function that matches the ReferenceTo
implementation for ObjectReference, but returns a TypedReference
instead.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Because the parser eventually passes a runtime.Creater and runtime.Typer
to the underlying serializer, we only require that the passed schemes
implement those interfaces, rather than require that they be
*runtime.Scheme explicitly.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Adds a package parser and a variety of backends that reads from a YAML
stream, accepting objects that are either part of the meta or object
runtime.Scheme and returning them as a Package.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>