Commit Graph

73 Commits

Author SHA1 Message Date
Nic Cope 165b83c972 Mark the current implementation of ConditionedStatus as deprecated
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>
2019-05-31 16:04:27 -07:00
Sam Leavens d7f8dadcbd Using bucket endpoint
- 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>
2019-05-19 00:23:59 -07:00
Sam Leavens 8af4e58adf Generate unique names for S3Buckets
- Uses same NameFormat system as GCP Bucket

Signed-off-by: Sam Leavens <rbwsam@gmail.com>
2019-05-17 09:22:54 -07:00
Nic Cope 6936d32287 Replace github.com/go-test/deep with github.com/go-test/cmp
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>
2019-05-03 17:19:28 -07:00
Illya Chekrygin 4c32cba493 Add test coverage for apis scaffolding components
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2019-04-30 12:41:19 -07:00
Illya Chekrygin b1abf78e87 Update (simplify) test environment in terms of handling: Schemas and go-client
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2019-04-11 10:43:01 -07:00
Jared Watts 289424b8c0 fixes for issues found while preparing workload demo
Signed-off-by: Jared Watts <jbw976@gmail.com>
2019-04-01 23:33:37 -07:00
Nic Cope 7e723ee141 Generate storage package
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>
2019-03-12 18:05:12 -07:00
Nic Cope eddb9f45ee Combine mulitple appends into a single call
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>
2019-03-06 14:40:17 -08:00
Nic Cope d88cd9885d Address cyclomatic complexity issues
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>
2019-03-06 14:40:17 -08:00
Nic Cope ab4ea267da Remove unused code
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-03-06 14:40:17 -08:00
Nic Cope 274f45e80f Address stuttering type names
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>
2019-03-06 14:40:16 -08:00
Nic Cope bc90efad4f Address linter warnings about malformed or missing comments
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>
2019-03-06 14:40:16 -08:00
Nic Cope ec20c78960 Import versioned ('v1' etc) style names explicitly
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>
2019-03-06 14:37:03 -08:00
Nic Cope ec362dbb4e Run goimports on all files
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>
2019-03-06 14:37:03 -08:00
Nic Cope c994c7ab62 Have BindingState default to 'Unbound'
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>
2019-03-06 13:05:15 -08:00
Nic Cope cbfddc88c3 Plumb up cloud provider cache resources
Signed-off-by: Nic Cope <negz@rk0n.org>
2019-02-28 14:49:43 -08:00
Nic Cope 064d050744 Add AWS ElasticCache ReplicationGroup CRDs
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>
2019-02-28 14:49:43 -08:00
Illya Chekrygin 6b909657f0 Merge pull request #264 from lukeweber/eks-nodes-join
Add mapRoles, and mapUsers support on EKS
2019-01-18 12:36:55 -08:00
Luke Weber 3c036525b8 Add additional documentation and links for MapRoles and MapUsers
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2019-01-18 10:57:42 -08:00
Jared Watts 615c0ea982 apis: provider types for postgresql and resource interfaces
Signed-off-by: Jared Watts <jbw976@gmail.com>
2019-01-03 11:54:41 -08:00
Luke Weber 1662ba47a8 Add mapRoles, and mapUsers support on EKS
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-12-22 08:11:40 -08:00
Luke Weber 5ac7649ff3 Add kubebuilder print-columns for database, cluster, and workload types
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-12-22 06:01:13 -08:00
ichekrygin f06bf13cb4 Add log message to the top of the reconcile loop to output `GVK` + `Request`, to get visibility into reconciliation patterns and frequency.
Signed-off-by: ichekrygin <illya.chekrygin@gmail.com>
2018-12-18 22:16:08 -08:00
Luke Weber 8dbf83e6e3 Address feedback
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-12-18 08:19:17 -08:00
Luke Weber 4ee3642662 Add S3Bucket Controller and AWS Bucket handler, Generic Bucket handler
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-12-17 10:05:09 -08:00
Luke Weber 21b268949a Bucket types cleanup, and additional validation
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-12-17 10:05:09 -08:00
Illya Chekrygin f07460c622 Merge pull request #147 from ichekrygin/bucket-test
Standardize on test harness and layout for pkg/apis
2018-12-15 08:33:35 -08:00
Luke Weber f46bd86b39 Fix permissions for worker nodes, and provision once master is active
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-12-03 12:39:03 -08:00
ichekrygin a24afbdc81 Standardize on test harness and layout for pkg/apis
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2018-12-03 11:06:26 -08:00
Jared Watts cbed947d34 azure aks: APIs/CRDs for Azure AKS support
Signed-off-by: Jared Watts <jbw976@gmail.com>
2018-11-30 13:19:05 -08:00
Illya Chekrygin f880a24bd7 Merge pull request #177 from ichekrygin/k8s-race
Fix Kubernetes Clusters Race Condition
2018-11-30 09:54:56 -08:00
ichekrygin 7e6ed3640b Add support for `subnetGroupName` in RDS to facilitate deployment into
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>
2018-11-29 23:38:25 -08:00
Illya Chekrygin 6940338554 Fix EKS Kind name.
Signed-off-by: Illya Chekrygin <illya.chekrygin@gmail.com>
2018-11-29 22:13:41 -08:00
Luke Weber d6bec33e4e Add EKSCluster worker node spec for cloudformation
Signed-off-by: Luke Weber <luke.weber@gmail.com>
2018-11-28 11:43:21 -08:00
ichekrygin 0c7f93d5c5 Update MySQLInstance version translation for concrete types 2018-11-20 09:59:03 -08:00
Bassam Tabbara 2dde14c478 rename to crossplane
make build and make test now work.
2018-11-19 15:56:32 -08:00
ichekrygin 1f9f101a5b Add EKS types, client and controller 2018-11-19 15:37:15 -08:00
ichekrygin b149ea371f Add Utility function to generate ObjectReference 2018-11-17 17:43:38 -08:00
ichekrygin 17d597d0cc Update EKS Cluster Type(s) 2018-11-17 08:35:05 -08:00
Luke Weber a27852eea8 Merge pull request #112 from lukeweber/bucket
GCPBucket, S3Bucket, AzureBucket and Bucket types
2018-11-16 16:24:15 -08:00
Luke Weber d5f34bc576 Add connectionSecretNameOverride to set a custom secret name 2018-11-16 13:59:18 -08:00
Luke Weber d476075ea8 Add connectionSecretRef to status 2018-11-16 12:46:20 -08:00
Luke Weber d847986413 Naming cleanup to standardize on (provider)buckets 2018-11-16 11:15:47 -08:00
Luke Weber 0b36976eee Add CRDs yaml and fix tests 2018-11-16 10:51:50 -08:00
Luke Weber b3f96e161d Revert PredefinedACL to use original terminology from S3 API 2018-11-15 16:03:12 -08:00
Luke Weber bb10a4b099 Add ProviderRef and fix comments and group names 2018-11-14 20:39:58 -08:00
Luke Weber 627a9342a5 CRDs for google cloud and aws buckets 2018-11-14 16:57:25 -08:00
ichekrygin 2d2e0dda51 Add unit tests to RDS instance 2018-11-14 15:17:01 -08:00
Illya Chekrygin 4f99ed3692 Merge pull request #100 from ichekrygin/clusters
Add GKE Kubernetes Cluster
2018-11-10 21:50:37 -08:00