Class NamespaceableResourceAdapter<T extends io.fabric8.kubernetes.api.model.HasMetadata>
- java.lang.Object
-
- io.fabric8.kubernetes.client.extension.ResourceAdapter<T>
-
- io.fabric8.kubernetes.client.impl.NamespaceableResourceAdapter<T>
-
- All Implemented Interfaces:
CreateOrReplaceable<T>
,Deletable
,DeletableWithOptions
,DryRunable<WritableOperation<T>>
,EditReplacePatchable<T>
,FieldValidateable<NonDeletingOperation<T>>
,Gettable<T>
,Informable<T>
,ItemReplacable<T>
,ItemWritableOperation<T>
,NamespaceableResource<T>
,NonDeletingOperation<T>
,Replaceable<T>
,ReplaceDeletable<T>
,Resource<T>
,Scalable<T>
,ServerSideApplicable<T>
,Timeoutable
,Updatable<T>
,Waitable<T,T>
,Watchable<T>
,WatchAndWaitable<T>
,WritableOperation<T>
,FromServerGettable<T>
,GracePeriodConfigurable<PropagationPolicyConfigurable<? extends Deletable>>
,PropagationPolicyConfigurable<GracePeriodConfigurable<? extends Deletable>>
public class NamespaceableResourceAdapter<T extends io.fabric8.kubernetes.api.model.HasMetadata> extends ResourceAdapter<T> implements NamespaceableResource<T>
Provides a wrapper to namespace a resource.NamespaceableResource
is notNamespaceable
to allow for future versions of the logic to be consolidated.With generic typed interface design Namespacable<X> and Namespaceable<Y> are considered incompatible no matter the types for X and Y, but NamespaceableX and NamespaceableY can be polymorphic. As long as there is no usage expectation like instanceof Namespaceable - then it would be fine to have the non-generic versions.
The constructor and the inNamespace method determine the namespacing rules: - if the item is namespaced, the resource context will use that namespace as that is not currently the default behavior of withItem
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.fabric8.kubernetes.client.dsl.FieldValidateable
FieldValidateable.Validation
-
-
Field Summary
Fields Modifier and Type Field Description protected T
item
protected HasMetadataOperation<T,?,?>
operation
-
Constructor Summary
Constructors Constructor Description NamespaceableResourceAdapter(T item, HasMetadataOperation<T,?,?> op)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource<T>
inNamespace(String name)
-
Methods inherited from class io.fabric8.kubernetes.client.extension.ResourceAdapter
accept, create, create, createOr, createOrReplace, createOrReplace, delete, delete, dryRun, dryRun, edit, edit, edit, editStatus, fieldManager, fieldValidation, forceConflicts, fromServer, get, getResource, inform, inform, inform, informOnCondition, isReady, item, lockResourceVersion, lockResourceVersion, patch, patch, patch, patch, patch, patch, patchStatus, patchStatus, replace, replace, replaceStatus, replaceStatus, require, runnableInformer, scale, scale, scale, scale, serverSideApply, subresource, unlock, update, updateStatus, updateStatus, waitUntilCondition, waitUntilReady, watch, watch, watch, withGracePeriod, withIndexers, withLimit, withPropagationPolicy, withResourceVersion, withTimeout, withTimeoutInMillis
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.CreateOrReplaceable
create, createOrReplace
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Deletable
delete, withTimeout, withTimeoutInMillis
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.DryRunable
dryRun, dryRun
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.EditReplacePatchable
accept, edit, edit, edit, patch, patch, patch, patch, patch, patch
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.FieldValidateable
fieldValidation
-
Methods inherited from interface io.fabric8.kubernetes.client.FromServerGettable
fromServer
-
Methods inherited from interface io.fabric8.kubernetes.client.GracePeriodConfigurable
withGracePeriod
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Informable
inform, inform, inform, informOnCondition, runnableInformer, withIndexers, withLimit
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ItemReplacable
replace, replaceStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ItemWritableOperation
create, createOrReplace, delete, patchStatus, updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.NonDeletingOperation
createOr, editStatus, patchStatus, subresource, unlock
-
Methods inherited from interface io.fabric8.kubernetes.client.PropagationPolicyConfigurable
withPropagationPolicy
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Replaceable
replaceStatus, updateStatus
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Resource
cascading, isReady, item, lockResourceVersion, lockResourceVersion, require
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Scalable
scale, scale, scale, scale
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.ServerSideApplicable
fieldManager, forceConflicts, serverSideApply
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.Waitable
waitUntilCondition, waitUntilReady
-
Methods inherited from interface io.fabric8.kubernetes.client.dsl.WatchAndWaitable
withResourceVersion
-
-
-
-
Field Detail
-
item
protected final T extends io.fabric8.kubernetes.api.model.HasMetadata item
-
operation
protected final HasMetadataOperation<T extends io.fabric8.kubernetes.api.model.HasMetadata,?,?> operation
-
-
Constructor Detail
-
NamespaceableResourceAdapter
public NamespaceableResourceAdapter(T item, HasMetadataOperation<T,?,?> op)
-
-
Method Detail
-
inNamespace
public Resource<T> inNamespace(String name)
- Specified by:
inNamespace
in interfaceNamespaceableResource<T extends io.fabric8.kubernetes.api.model.HasMetadata>
-
-