Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 3 additions & 28 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,6 @@ operator-sdk init --plugins quarkus --domain example.com --project-name memcache

`operator-sdk init` generates `pom.xml` file. This file contains all the dependencies required to run the operator.

### MemcachedQuarkusOperator

The quarkus plugin will scaffold out several files during the `init` phase. One
of these files is the operator's main program, `MemcachedQuarkusOperator.java`.
This file initializes and runs the operator. The operator uses java-operator-sdk,
which is similar to
[controller-runtime](https://github.com/kubernetes-sigs/controller-runtime), to
make operator development easier.

The important part of the `MemcachedQuarkusOperator.java` is the `run` method
which will start the operator and initializes the informers and watches for your
operator.

Here is an example of the `run` method that will typically be scaffolded out by
this plugin:

```
@Override
public int run(String... args) throws Exception {
operator.start();

Quarkus.waitForExit();
return 0;
}
```

## Create a new API and Controller

Expand All @@ -81,16 +56,16 @@ one shown as below.
```
$ tree
.
├── pom.xml
├── Makefile
├── PROJECT
├── pom.xml
└── src
└── main
├── java
│ └── com
│ └── example
│ ├── MemcachedController.java
│ ├── Memcached.java
│ ├── MemcachedQuarkusOperator.java
│ ├── MemcachedController.java
│ ├── MemcachedSpec.java
│ └── MemcachedStatus.java
└── resources
Expand Down
2 changes: 1 addition & 1 deletion pkg/quarkus/v1alpha/scaffolds/internal/templates/pomxml.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const pomxmlTemplate = `<?xml version="1.0" encoding="UTF-8"?>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<fabric8-client.version>5.7.2</fabric8-client.version>
<quarkus-sdk.version>2.0.0.Beta5</quarkus-sdk.version>
<quarkus-sdk.version>1.9.5</quarkus-sdk.version>
<quarkus.version>2.2.1.Final</quarkus.version>
</properties>

Expand Down