We'd like to introduce a new implementation in a future commit. Renaming these
types and functions to deprecated allows us to migrate the codebase gradually.
This commit is fairly mechanically generated by a lot of find and replace.
Signed-off-by: Nic Cope <negz@rk0n.org>
- Using endpoint field to store AWS region when generating s3bucket secrets
- Regenerated crds to reflect change to s3bucket
- Minor improvement to Makefile
Signed-off-by: Sam Leavens <rbwsam@gmail.com>
cmp's diff output is much easier for humans to read. cmp also supports passing
options to each Diff call. deep uses package scoped option variables, making it
easy to forget to reset an option after it has been set.
This package was generated by running:
```bash
files=$(find pkg -name *_test.go)
for f in $files; do
sed -i .sed 's/diff := deep.Equal/diff := cmp.Diff/g' $f
sed -i .sed 's/diff != nil/diff != ""/g' $f
rm $f.sed
done
```
A subset of the updated tests will not pass; I'll fix them in a subsequent
commit.
Signed-off-by: Nic Cope <negz@rk0n.org>
Looks like this got hit by goimports. golangci-lint knows to ignore generated
files, but goimports proper does not.
Signed-off-by: Nic Cope <negz@rk0n.org>
This is a minor performance optimisation that doesn't really matter in the
context of calling the Add functions once at startup. It could matter in other
cases, and thus I think it's worth changing so the linter can catch it in
future.
Signed-off-by: Nic Cope <negz@rk0n.org>
In two cases this was easily fixed by simple refactoring, and in one by removing
unused code. In the remaining cases I've muted the linter with a nolint comment
and provided some context for potential future refactorers.
Signed-off-by: Nic Cope <negz@rk0n.org>
A name is said to 'stutter' when its name begins with the package name, so
callers would for example type `foo.FooClient` rather than `foo.Client`.
Signed-off-by: Nic Cope <negz@rk0n.org>
This commit should only touch comments, or make types private to avoid them
needing a comment when they're not consumed outside their own package.
Signed-off-by: Nic Cope <negz@rk0n.org>
https://github.com/golang/go/issues/29041
This is a slightly counterintuitive workaround for the above bug. The
alternative to this commit would be to disable goimports linting until the bug
is fixed. I think it's worth the workaround for the time being in exchange for
the value goimports linting brings.
Signed-off-by: Nic Cope <negz@rk0n.org>
This commit was generated by running:
```
$ goimports -w -local "github.com/crossplaneio/crossplane/" $(find cmd/ -name *.go|xargs)
$ goimports -w -local "github.com/crossplaneio/crossplane/" $(find pkg/ -name *.go|xargs)
```
goimports is an extension of gofmt that automatically includes packages. It
also sorts package names according to the following rules:
1. stdlib packages
2. Third party packages
3. Local packages (i.e. other crossplane packages)
Signed-off-by: Nic Cope <negz@rk0n.org>
This removes the need to explicity initialise new objects as unbound. This
commit also refactors the underlying SetBound method to take a bool, removing
the need to translate that pattern throughout the codebase whereever we call
SetBound.
Signed-off-by: Nic Cope <negz@rk0n.org>
The AWS Redis API is _super_ confusing. If I follow correctly:
* You can create a CacheCluster, which can be either Redis or memcached. If you
choose Redis, your CacheCluster may not have more than one node.
* You can instead create a ReplicationGroup, which is a group of one or more
'node groups' (aka shards). Each node group consists of one read/write master
'cache cluster' (which is one node, not a cluster) replicating to up to five
hot spares. A ReplicationGroup can be 'cluster mode disabled', in which case
it's a single node group containing the entire key space, or 'cluster mode
enabled', in which case it's up to 15 node groups, each responsible for a
shard of the keyspace.
I elected to implement only the ReplicationGroup, as it should be able to
support all use cases from 'give me a single Redis instance' through to
'shard my keyspace across 15 sets of 6 Redis instances'.
I copied boilerplate from the Azure cache implementation rather than using
kubebuilder here due to our types having subtly diverged from kubebuilder
patterns.
Signed-off-by: Nic Cope <negz@rk0n.org>
VPC's other than default.
> A DB subnet group to associate with the DB instance. If you update this value, the new subnet group must be a subnet group in a new VPC.
Signed-off-by: ichekrygin <illya.chekrygin@gmail.com>