https://github.com/jvm-operators/groovy-example-operator
Example operator for Kubernetes implemented in Groovy
https://github.com/jvm-operators/groovy-example-operator
groovy kubernetes openshift operator
Last synced: 3 months ago
JSON representation
Example operator for Kubernetes implemented in Groovy
- Host: GitHub
- URL: https://github.com/jvm-operators/groovy-example-operator
- Owner: jvm-operators
- Created: 2018-10-17T13:21:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-03T21:09:40.000Z (over 7 years ago)
- Last Synced: 2025-03-25T10:42:55.585Z (over 1 year ago)
- Topics: groovy, kubernetes, openshift, operator
- Language: Makefile
- Homepage:
- Size: 76.2 KB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# groovy-example-operator
[](https://travis-ci.org/jvm-operators/groovy-example-operator)
[](http://www.apache.org/licenses/LICENSE-2.0)
`{ConfigMap|CRD}`-based approach for managing the X in Kubernetes and OpenShift.
This operator uses [abstract-operator](https://github.com/jvm-operators/abstract-operator) library.
# Build
```bash
make build
```
or
```bash
./gradlew shadowJar
```
# Quick Start
Run the `groovy-example-operator` deployment:
```bash
kubectl apply -f manifest/operator.yaml
```
Create new ConfigMap from the prepared example:
```bash
kubectl apply -f examples/cm.yaml
```
For deployment on OpenShift use the same commands as above, but with `oc` instead of `kubectl`.
This operator can also work with CRDs. Assuming the admin user is logged in, you can install the operator with:
```bash
kubectl apply -f manifest/operator-crd.yaml
```
and then create the Spark clusters by creating the custom resources (CR).
```bash
kubectl apply -f examples/cr.yaml
```
# Development
```bash
make devel
```
This will build the image and deploys the operator into OpenShift. It assumes the `oc` on `PATH`.