Skip to content

Commit b4c6e0d

Browse files
authored
docs: withKubernetesClient improved docs (#2564)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 73e3dfc commit b4c6e0d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/ConfigurationServiceOverrider.java

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
import io.fabric8.kubernetes.api.model.HasMetadata;
1313
import io.fabric8.kubernetes.client.KubernetesClient;
14+
import io.javaoperatorsdk.operator.Operator;
1415
import io.javaoperatorsdk.operator.api.monitoring.Metrics;
1516
import io.javaoperatorsdk.operator.api.reconciler.dependent.DependentResourceFactory;
1617

@@ -121,6 +122,10 @@ public ConfigurationServiceOverrider withWorkflowExecutorService(
121122
/**
122123
* Replaces the default {@link KubernetesClient} instance by the specified one. This is the
123124
* preferred mechanism to configure which client will be used to access the cluster.
125+
* <p>
126+
* Note that when {@link Operator#stop()} is called, by default the client is closed even if
127+
* explicitly provided with this method. Use {@link #withCloseClientOnStop(boolean)} to change
128+
* this behavior.
124129
*
125130
* @param client the fully configured client to use for cluster access
126131
* @return this {@link ConfigurationServiceOverrider} for chained customization

0 commit comments

Comments
 (0)