Skip to content

Commit 495ff39

Browse files
committed
refactor: rename operator-framework module to operator-framework-core
1 parent 85c466f commit 495ff39

File tree

81 files changed

+67
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+67
-47
lines changed

operator-framework/pom.xml renamed to operator-framework-core/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
45
<modelVersion>4.0.0</modelVersion>
5-
66
<parent>
77
<groupId>io.javaoperatorsdk</groupId>
88
<artifactId>java-operator-sdk</artifactId>
99
<version>1.5.1-SNAPSHOT</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

13-
<artifactId>operator-framework</artifactId>
14-
<name>Operator SDK - Framework</name>
15-
<description>Framework for implementing Kubernetes operators</description>
13+
<artifactId>operator-framework-core</artifactId>
14+
<name>Operator SDK - Framework - Core</name>
15+
<description>Core framework for implementing Kubernetes operators</description>
1616
<packaging>jar</packaging>
1717

1818
<properties>

operator-framework/src/main/java/io/javaoperatorsdk/operator/Operator.java renamed to operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public <R extends CustomResource> void register(ResourceController<R> controller
4242
throws OperatorException {
4343
final var configuration = configurationService.getConfigurationFor(controller);
4444
final var retry = GenericRetry.fromConfiguration(configuration.getRetryConfiguration());
45-
final var targetNamespaces = configuration.getNamespaces().toArray(new String[] {});
45+
final var targetNamespaces = configuration.getNamespaces().toArray(new String[]{});
4646
registerController(controller, configuration.watchAllNamespaces(), retry, targetNamespaces);
4747
}
4848

@@ -129,7 +129,7 @@ private CustomResourceEventSource createCustomResourceEventSource(
129129
CustomResourceEventSource customResourceEventSource =
130130
watchAllNamespaces
131131
? CustomResourceEventSource.customResourceEventSourceForAllNamespaces(
132-
customResourceCache, client, generationAware, finalizer)
132+
customResourceCache, client, generationAware, finalizer)
133133
: CustomResourceEventSource.customResourceEventSourceForTargetNamespaces(
134134
customResourceCache, client, targetNamespaces, generationAware, finalizer);
135135

@@ -152,15 +152,15 @@ private CustomResourceDefinitionContext getCustomResourceDefinitionForController
152152
}
153153

154154
public Map<Class<? extends CustomResource>, CustomResourceOperationsImpl>
155-
getCustomResourceClients() {
155+
getCustomResourceClients() {
156156
return customResourceClients;
157157
}
158158

159159
public <
160-
T extends CustomResource,
161-
L extends CustomResourceList<T>,
162-
D extends CustomResourceDoneable<T>>
163-
CustomResourceOperationsImpl<T, L, D> getCustomResourceClients(Class<T> customResourceClass) {
160+
T extends CustomResource,
161+
L extends CustomResourceList<T>,
162+
D extends CustomResourceDoneable<T>>
163+
CustomResourceOperationsImpl<T, L, D> getCustomResourceClients(Class<T> customResourceClass) {
164164
return customResourceClients.get(customResourceClass);
165165
}
166166
}

operator-framework/src/main/java/io/javaoperatorsdk/operator/OperatorException.java renamed to operator-framework-core/src/main/java/io/javaoperatorsdk/operator/OperatorException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
public class OperatorException extends RuntimeException {
44

5-
public OperatorException() {}
5+
public OperatorException() {
6+
}
67

78
public OperatorException(String message) {
89
super(message);

operator-framework/src/main/java/io/javaoperatorsdk/operator/api/Controller.java renamed to operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/Controller.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@Retention(RetentionPolicy.RUNTIME)
99
@Target({ElementType.TYPE})
1010
public @interface Controller {
11+
1112
String NULL = "";
1213

1314
String crdName();

operator-framework/src/main/java/io/javaoperatorsdk/operator/api/ResourceController.java renamed to operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ResourceController.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public interface ResourceController<R extends CustomResource> {
1515
*
1616
* @param resource
1717
* @return true - so the finalizer is automatically removed after the call. false if you don't
18-
* want to remove the finalizer. Note that this is ALMOST NEVER the case.
18+
* want to remove the finalizer. Note that this is ALMOST NEVER the case.
1919
*/
2020
DeleteControl deleteResource(R resource, Context<R> context);
2121

@@ -25,10 +25,10 @@ public interface ResourceController<R extends CustomResource> {
2525
* parameter (not the custom resource that might be in the events)
2626
*
2727
* @return The resource is updated in api server if the return value is present within Optional.
28-
* This the common use cases. However in cases, for example the operator is restarted, and we
29-
* don't want to have an update call to k8s api to be made unnecessarily, by returning an
30-
* empty Optional this update can be skipped. <b>However we will always call an update if
31-
* there is no finalizer on object and its not marked for deletion.</b>
28+
* This the common use cases. However in cases, for example the operator is restarted, and we
29+
* don't want to have an update call to k8s api to be made unnecessarily, by returning an empty
30+
* Optional this update can be skipped. <b>However we will always call an update if there is no
31+
* finalizer on object and its not marked for deletion.</b>
3232
*/
3333
UpdateControl<R> createOrUpdateResource(R resource, Context<R> context);
3434

@@ -37,7 +37,8 @@ public interface ResourceController<R extends CustomResource> {
3737
*
3838
* @param eventSourceManager
3939
*/
40-
default void init(EventSourceManager eventSourceManager) {}
40+
default void init(EventSourceManager eventSourceManager) {
41+
}
4142

4243
default String getName() {
4344
final var clazz = getClass();

0 commit comments

Comments
 (0)