@@ -63,14 +63,15 @@ Add [dependency](https://search.maven.org/search?q=a:operator-framework) to your
6363</dependency >
6464```
6565
66- Main method initializing the Operator and registering a controller..
66+ Main method initializing the Operator and registering a controller.
6767
6868``` java
6969public class Runner {
7070
7171 public static void main (String [] args ) {
72- Operator operator = new Operator (new DefaultKubernetesClient ());
73- operator. registerController(new WebServerController ());
72+ Operator operator = new Operator (new DefaultKubernetesClient (),
73+ DefaultConfigurationService . instance());
74+ operator. register(new WebServerController ());
7475 }
7576}
7677```
@@ -135,18 +136,62 @@ public class WebServerSpec {
135136 }
136137}
137138```
139+
140+ #### Quarkus
141+
142+ A [ Quarkus] ( https://quarkus.io ) extension is also provided to ease the development of Quarkus-based operators.
143+
144+ Add [ this dependency] (https://search.maven.org/search?q=a:operator-framework-quarkus-extension )
145+ to your project:
146+
147+ ``` xml
148+ <dependency >
149+ <groupId >io.javaoperatorsdk</groupId >
150+ <artifactId >operator-framework-quarkus-extension</artifactId >
151+ <version >{see https://search.maven.org/search?q=a:operator-framework-quarkus-extension for latest version}</version >
152+ </dependency >
153+ ```
154+
155+ Create an Application, Quarkus will automatically create and inject a ` KubernetesClient ` , ` Operator `
156+ and ` ConfigurationService ` instances that your application can use, as shown below:
157+
158+ ``` java
159+ @QuarkusMain
160+ public class QuarkusOperator implements QuarkusApplication {
161+
162+ @Inject KubernetesClient client;
163+
164+ @Inject Operator operator;
165+
166+ @Inject ConfigurationService configuration;
167+
168+ public static void main (String ... args ) {
169+ Quarkus . run(QuarkusOperator . class, args);
170+ }
171+
172+ @Override
173+ public int run (String ... args ) throws Exception {
174+ final var config = configuration. getConfigurationFor(new CustomServiceController (client));
175+ System . out. println(" CR class: " + config. getCustomResourceClass());
176+ System . out. println(" Doneable class = " + config. getDoneableClass());
177+
178+ Quarkus . waitForExit();
179+ return 0 ;
180+ }
181+ }
182+ ```
138183
139184#### Spring Boot
140185
141186You can also let Spring Boot wire your application together and automatically register the controllers.
142187
143- Add [ this dependency] ( https://search.maven.org/search?q=a:spring-boot- operator-framework-starter ) to your project:
188+ Add [ this dependency] ( https://search.maven.org/search?q=a:operator-framework-spring-boot -starter ) to your project:
144189
145190``` xml
146191<dependency >
147192 <groupId >io.javaoperatorsdk</groupId >
148- <artifactId >spring-boot- operator-framework-starter</artifactId >
149- <version >{see https://search.maven.org/search?q=a:spring-boot- operator-framework-starter for latest version}</version >
193+ <artifactId >operator-framework-spring-boot -starter</artifactId >
194+ <version >{see https://search.maven.org/search?q=a:operator-framework-spring-boot -starter for latest version}</version >
150195</dependency >
151196```
152197
0 commit comments