Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.radanalytics</groupId>
<artifactId>operator-parent-pom</artifactId>
<version>0.3.11</version>
<version>0.3.23</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>io.acme</groupId>
Expand All @@ -15,7 +15,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<abstract-operator.version>0.5.2</abstract-operator.version>
<abstract-operator.version>0.6.10</abstract-operator.version>
</properties>

<dependencies>
Expand All @@ -36,10 +36,6 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -52,6 +48,10 @@
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
</plugin>
<plugin>
Comment on lines 48 to +51

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io.quarkus quarkus-core is needed as well ?

<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
14 changes: 8 additions & 6 deletions src/main/java/io/operator/ExampleOperator.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
package io.operator;

import io.fabric8.kubernetes.api.model.KubernetesResourceList;
import javax.inject.Singleton;

import io.radanalytics.operator.common.AbstractOperator;
import io.radanalytics.operator.common.Operator;
import io.radanalytics.types.Example;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Singleton
@Operator(forKind = Example.class, prefix = "io.acme")
public class ExampleOperator extends AbstractOperator<Example> {

private static final Logger log = LoggerFactory.getLogger(AbstractOperator.class.getName());

public ExampleOperator() {
}

protected void onAdd(Example example) {
log.info("new example has been created: {}", example);
// todo: implement the logic
// KubernetesResourceList list = ???
// client.resourceList(list).createOrReplace();
}

protected void onDelete(Example example) {
log.info("existing example has been deleted: {}", example);
}

protected void onModify(Example example) {
log.info("existing example has been modified: {}", example);
}
Expand Down