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.
The operator introduces a CRD called SyncConfig to configure the objects which should be synced (see example).
This SyncConfig will create a Service, Endpoints and NetworkPolicy object in all namepsaces 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)
The following parameters can be used inside object definitions:
| Parameter Name | Description |
|---|---|
${PROJECT_NAME} | Name of the target namespace |
${PROJECT_DISPLAYNAME} | Not implemented |
${PROJECT_DESCRIPTION} | Not implemented |
${PROJECT_ADMIN_USER} | Not implemented |
${PROJECT_REQUESTING_USER} | Not implemented |
The parameter replacement is implemented using the OpenShift templates pkg and therefore follows the same rules.
The tool is implemented with the Operator SDK.
dep ensure
cd cmd/manager
go run main.go
Content type
Image
Digest
sha256:dbfa12c21…
Size
18.3 MB
Last updated
over 2 years ago
docker pull vshn/espejo