Skip to content

vshn/espejo

Repository files navigation

Espejo (object-syncer)

Build Go version Kubernetes version Version Maintainability GitHub downloads Docker image License

The espejo tool (which means 'mirror' in Spanish) syncs objects from a SyncConfig CRD to multiple namespaces. The idea is to replace OpenShift's project templates with a more flexible and robust solution.

CustomResourceDefinitions

The operator introduces a CRD called SyncConfig to configure the objects which should be synced. This SyncConfig will create a Service, Endpoints and NetworkPolicy object in all namespaces which mach the label selector OR one of the name selectors. To ensure objects are deleted, set the prune parameter to true (default is false)

Parameters

Strings within object definitions can be replaced with dynamic values with parameters. The following parameters can be used:

Parameter Name Description
${PROJECT_NAME} Name of the target namespace

Development

The Operator is implemented with the Operator SDK (Installation).

Build

  • make build creates the espejo binary. Go is required.
  • make docker-build creates the Docker image with docker.io/vshn/espejo:latest and quay.io/vshn/espejo:latest tags.
  • make test runs all unit tests.
  • make integration-test runs the integration tests.

Run E2E tests

You need node and npm to run the tests, as it runs with DETIK.

To run e2e tests, execute:

make e2e-test