From 6c553b665f46aec69754193b62c0d00b5c9095a5 Mon Sep 17 00:00:00 2001 From: csviri Date: Wed, 24 Nov 2021 14:35:57 +0100 Subject: [PATCH 1/3] fix: build javadoc issue --- README.md | 2 +- .../operator/api/ObservedGenerationAware.java | 5 +++-- .../operator/api/reconciler/UpdateControl.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 790169d036..b2bfcb7c30 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Table of Contents Check out this [blog post](https://csviri.medium.com/deep-dive-building-a-kubernetes-operator-sdk-for-java-developers-5008218822cb) -about the non-trivial yet common problems needed to be solved for every operator. In case you are +about the non-trivial yet common problems needed to be solved for everyUpdateControl operator. In case you are interested how to handle more complex scenarios take a look on [event sources](https://csviri.medium.com/java-operator-sdk-introduction-to-event-sources-a1aab5af4b7b) . diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java index 79c149e366..bcf35afe8b 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java @@ -1,5 +1,6 @@ package io.javaoperatorsdk.operator.api; +import io.fabric8.kubernetes.api.model.HasMetadata; import io.fabric8.kubernetes.client.CustomResource; import io.javaoperatorsdk.operator.api.reconciler.UpdateControl; @@ -12,8 +13,8 @@ * * In order to work the status object returned by CustomResource.getStatus() should not be null. In * addition to that from the controller that the - * {@link UpdateControl#updateStatusSubResource(CustomResource)} or - * {@link UpdateControl#updateCustomResourceAndStatus(CustomResource)} should be returned. The + * {@link UpdateControl#updateStatus(HasMetadata)} or + * {@link UpdateControl#updateResourceAndStatus(HasMetadata)} should be returned. The * observed generation is not updated in other cases. * * @see ObservedGenerationAwareStatus diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java index dcc997021f..1fa7f2b35a 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java @@ -31,7 +31,7 @@ public static UpdateControl updateStatus( /** * As a results of this there will be two call to K8S API. First the custom resource will be * updates then the status sub-resource. - * + * @param resource type * @param customResource - custom resource to use in both API calls * @return UpdateControl instance */ From 6e9ca850ca30a318861d0e526c6afe4d97919184 Mon Sep 17 00:00:00 2001 From: csviri Date: Wed, 24 Nov 2021 14:40:05 +0100 Subject: [PATCH 2/3] fix: formatting --- .../operator/api/ObservedGenerationAware.java | 7 +++---- .../operator/api/reconciler/UpdateControl.java | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java index bcf35afe8b..370e497652 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/ObservedGenerationAware.java @@ -12,10 +12,9 @@ * is ignored. * * In order to work the status object returned by CustomResource.getStatus() should not be null. In - * addition to that from the controller that the - * {@link UpdateControl#updateStatus(HasMetadata)} or - * {@link UpdateControl#updateResourceAndStatus(HasMetadata)} should be returned. The - * observed generation is not updated in other cases. + * addition to that from the controller that the {@link UpdateControl#updateStatus(HasMetadata)} or + * {@link UpdateControl#updateResourceAndStatus(HasMetadata)} should be returned. The observed + * generation is not updated in other cases. * * @see ObservedGenerationAwareStatus */ diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java index 1fa7f2b35a..1affc25abd 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/UpdateControl.java @@ -31,6 +31,7 @@ public static UpdateControl updateStatus( /** * As a results of this there will be two call to K8S API. First the custom resource will be * updates then the status sub-resource. + * * @param resource type * @param customResource - custom resource to use in both API calls * @return UpdateControl instance From 27b3a193299f8569c775e0dbfd45ea53fe04d60b Mon Sep 17 00:00:00 2001 From: csviri Date: Wed, 24 Nov 2021 15:14:11 +0100 Subject: [PATCH 3/3] fix: typo in docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2bfcb7c30..790169d036 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Table of Contents Check out this [blog post](https://csviri.medium.com/deep-dive-building-a-kubernetes-operator-sdk-for-java-developers-5008218822cb) -about the non-trivial yet common problems needed to be solved for everyUpdateControl operator. In case you are +about the non-trivial yet common problems needed to be solved for every operator. In case you are interested how to handle more complex scenarios take a look on [event sources](https://csviri.medium.com/java-operator-sdk-introduction-to-event-sources-a1aab5af4b7b) .