Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/quarkiverse/quarkus-operator-sdk

Quarkus Extension to create Kubernetes Operators in Java using the Java Operator SDK (https://github.com/java-operator-sdk/java-operator-sdk) project
https://github.com/quarkiverse/quarkus-operator-sdk

kubernetes operator quarkus-extension sdk

Last synced: 2 days ago
JSON representation

Quarkus Extension to create Kubernetes Operators in Java using the Java Operator SDK (https://github.com/java-operator-sdk/java-operator-sdk) project

Awesome Lists containing this project

README

        

# A Quarkus extension to write operators in Java

[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)

This extension integrates the [Java Operator SDK](https://javaoperatorsdk.io) project (JOSDK) with Quarkus, making it
even
easier to use both. We often refer to this extension as `QOSDK` for Quarkus extension for the java Operator SDK.

## Getting started with QOSDK

### Bootstrapping a project

The easiest way to get started with QOSDK is to use the [`quarkus` CLI](https://quarkus.io/guides/cli-tooling):

```shell
quarkus create app org.acme:qosdk-test -x='qosdk'
cd qosdk-test
```

Alternatively, you can use the Quarkus Maven plugin to bootstrap a project using the extension.

```shell
mvn io.quarkus.platform:quarkus-maven-plugin:3.9.4:create \
-DprojectGroupId=org.acme \
-DprojectArtifactId=qosdk-test \
-Dextensions='qosdk'
cd qoskd-test
```

If you also want to use the OLM bundle generation extension, you can add the `olm` extension to the extension list as
in:

```shell
quarkus create app org.acme:qosdk-test -x='qosdk,olm'
```

For reference, please refer to the [Quarkus getting started](https://quarkus.io/guides/getting-started) guide.

### Interactive operator development

The easiest way to iterate faster on developing your operator is to use the Quarkus Dev Mode to write your operator as
it's running.

Start the dev mode (`quarkus dev` or `mvn quarkus:dev`). Once the QOSDK extension is installed for a project, you get
access to dev mode commands provided by QOSDK to help you in moving faster. In the dev mode console, press `:` (column),
you'll get a terminal prompt. If you then press tab, you'll see a list of available commands, among which should be one
named `qosdk`, which, in turn, provides several sub-commands (`versions` and `api` at this time).

You can type `qosdk api --help` or `qosdk versions --help` to get more information about these commands.

The `qosdk api` command helps you quickly add a custom resource (an API in Kubernetes parlance) along with associated
spec, status and reconciler classes while your operator is running.

## Documentation

To go deeper on what you can accomplish with QOSDK and JOSDK, please read
the [blog series](https://developers.redhat.com/articles/2022/02/15/write-kubernetes-java-java-operator-sdk) that we
wrote
on how to write operators in Java with Quarkus. Note, however, that some information might be outdated since this series
was written a while ago. It should still provide a good idea of what can be achieved.

Please also refer to the [JOSDK documentation](https://javaoperatorsdk.io/docs/getting-started) for more details.

You can also take a look at the [samples](samples) to get quickly started using examples.

[QOSDK Documentation](https://quarkiverse.github.io/quarkiverse-docs/quarkus-operator-sdk/dev/index.html)

### Maintaining the documentation

The documentation for this extension should be maintained as part of this repository and it is
stored in the `docs/` directory.

The layout should follow
the [Antora's Standard File and Directory Set](https://docs.antora.org/antora/2.3/standard-directories/)
.

Once the docs are ready to be published, please open a PR including this repository in
the [Quarkiverse Docs Antora playbook](https://github.com/quarkiverse/quarkiverse-docs/blob/master/antora-playbook.yml#L7)
. See an example [here](https://github.com/quarkiverse/quarkiverse-docs/pull/1).

## Releasing

Follow the [Quarkiverse release process](https://github.com/quarkiverse/quarkiverse/wiki/Release).

## Snapshots

A snapshot is generated each time the `main` or `next` branches are changed. To be able to use the
snapshots, please add the following repository definition to your POM file (in the `repositories`
section) or, preferably, to your `settings.xml` file:

```xml

...

s01.oss.sonatype
https://s01.oss.sonatype.org/content/repositories/snapshots/

true

```

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Chris Laprun

πŸ’» 🚧

SΓ©bastien CROCQUESEL

πŸ’»

Jose Carvajal

πŸ’» πŸ€”

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!