public interface HasMetadata extends KubernetesResource
| Modifier and Type | Field and Description |
|---|---|
static String |
DNS_LABEL_END |
static String |
DNS_LABEL_REGEXP |
static String |
DNS_LABEL_START |
static Matcher |
FINALIZER_NAME_MATCHER |
| Modifier and Type | Method and Description |
|---|---|
default boolean |
addFinalizer(String finalizer)
Adds the specified finalizer to this
HasMetadata. |
String |
getApiVersion() |
String |
getKind() |
ObjectMeta |
getMetadata() |
default boolean |
hasFinalizer(String finalizer)
Determines whether this
HasMetadata holds the specified finalizer. |
default boolean |
isMarkedForDeletion()
Determines whether this
HasMetadata is marked for deletion or not. |
default boolean |
removeFinalizer(String finalizer)
Removes the specified finalizer if it's held by this
HasMetadata. |
void |
setApiVersion(String version) |
void |
setMetadata(ObjectMeta metadata) |
static final String DNS_LABEL_START
static final String DNS_LABEL_END
static final String DNS_LABEL_REGEXP
static final Matcher FINALIZER_NAME_MATCHER
ObjectMeta getMetadata()
void setMetadata(ObjectMeta metadata)
String getKind()
String getApiVersion()
void setApiVersion(String version)
default boolean isMarkedForDeletion()
HasMetadata is marked for deletion or not.true if the cluster marked this HasMetadata for deletion, false otherwisedefault boolean hasFinalizer(String finalizer)
HasMetadata holds the specified finalizer.finalizer - the identifier of the finalizer we want to checktrue if this HasMetadata holds the specified finalizer, false otherwisedefault boolean addFinalizer(String finalizer)
HasMetadata.
See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#finalizers for more details.
finalizer - the identifier of the finalizer to add to this HasMetadata in <domain name>/<finalizer name> format.true if the finalizer was successfully added, false otherwise (in particular, if the object is marked for deletion)IllegalArgumentException - if the specified is null or is invaliddefault boolean removeFinalizer(String finalizer)
HasMetadata.finalizer - the identifier of the finalizer we want to removetrue if the finalizer was successfully removed, false otherwiseCopyright © 2015–2020 Red Hat. All rights reserved.