Operator to provision resources such as Postgres, Redis and storage for you, either in-cluster or through a cloud provider such as Amazon AWS.
This operator depends on the Cloud Credential Operator for creating certain resources such as Amazon AWS Credentials. If using the AWS provider, ensure the Cloud Credential Operator is running.
Note: This operator is in the very early stages of development. There will be bugs and regular breaking changes
Prerequisites:
go
make
- git-secrets - for preventing cloud-provider credentials being included in commits
Ensure you are running at least Go 1.13
.
$ go version
go version go1.13 darwin/amd64
If not, ensure Go Modules are enabled.
Clone this repository into your working directory, outside of $GOPATH
. For example:
$ cd ~/dev
$ git clone [email protected]:integr8ly/cloud-resource-operator.git
Seed the Kubernetes/OpenShift cluster with required resources:
$ make cluster/prepare
Run the operator:
$ make run
In development
- Write tests
- Implement changes
- Run code fixer,
make code/fix
- Run tests,
make test/unit
- Make a PR
Resource type
- Something that can be requested from the operator via a custom resource e.g.blobstorage
,redis
Provider
- A service on which a resource type is provisioned e.g.aws
,openshift
Resource
- The result of a resource type created via a provider e.g.S3 Bucket
,Azure Blob
There are a few design philosophies for the Cloud Resource Operator:
- Each resource type (e.g.
BlobStorage
,Postgres
) should have its own controller - The end-user should be abstracted from explicitly specifying how the resource is provisioned by default
- What cloud-provider the resource should be provisioned on should be handled in pre-created config objects
- The end-user should not be abstracted from what provider was used to provision the resource once it's available
- If a user requests
BlobStorage
they should be made aware it was created onAmazon AWS
- If a user requests
- Deletion of a custom resource should result in the deletion of the resource in the cloud-provider