Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/displague/sample-extension-metacontroller

EXPERIMENTAL project to explore crossplane-stacks with metacontroller webhooks
https://github.com/displague/sample-extension-metacontroller

crossplane experimental-project metacontroller

Last synced: 8 days ago
JSON representation

EXPERIMENTAL project to explore crossplane-stacks with metacontroller webhooks

Awesome Lists containing this project

README

        

# Crossplane Stack - Metacontroller Example

## Building

### Prerequisite

For now, make sure metacontroller is installed first.

https://metacontroller.app/guide/install/#install-metacontroller

```sh
# Create metacontroller namespace.
kubectl create namespace metacontroller
# Create metacontroller service account and role/binding.
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/metacontroller/master/manifests/metacontroller-rbac.yaml
# Create CRDs for Metacontroller APIs, and the Metacontroller StatefulSet.
kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/metacontroller/master/manifests/metacontroller.yaml
```

### Create the HelloWorld Metacontroller Extension

Create the extension. The files in this repository will be bundled into a docker image. The sync.py script, controller.yaml, and webhook.yaml are taken directly from with only cosmetic changes.

```sh
DOCKER_ORG=displague
sed -i s/displague/$DOCKER_ORG/ .registry/install.yaml # TODO(displague) this needs to change
docker build . --tag $DOCKER_ORG/sample-extension-metacontroller
docker push $DOCKER_ORG/sample-extension-metacontroller
```

The dockerfile is composed of the Crossplane metadata necessary to be considered an extension, but it also includes a script (`install.sh`, the `CMD` of this docker image) to handle installation, updating, and removal of the Extension life-cycle controller. Arguments may be supplied to this command (in the future) to denote which version of the controller to deploy. While not implemented currently, these arguments would be provided in `install.yaml`.

### Install the HelloWorld Extension

Then creates a CR for a the extension to be installed.

```sh
cat > install-the-extension.yaml < deploy-a-resource-the-extension-handles.yaml <!
```