The WebLogic Kubernetes Operator populates status conditions on Domain and Cluster resources to provide high-level status reporting. Status conditions are a Kubernetes standard mechanism and the conditions generated by the operator are similar to those that Kubernetes provides for Pod and Deployment resources.
Conditions can be found under the status.conditions
field in a Domain resource or a Cluster resource.
You can check the conditions in a Domain resource by using:
kubectl -n MY_NAMESPACE describe domain MY_DOMAIN_RESOURCE_NAME
. Similarly, you can check the conditions in a Cluster resource by using:
kubectl -n MY_NAMESPACE describe cluster MY_CLUSTER_NAME
.
The conditions for Cluster resources referenced by a domain
are also listed in the domain status under domain.status.clusters
.
The following attributes can be found in a condition:
type
- The type of the condition, such as Failed
or Available
. See Types of domain status conditions.status
- The status of the condition, such as True
or False
.message
- An optional, human-readable message providing more details about the condition.reason
- The reason for the Failed
condition. Not applicable to other types of condition.severity
- The severity for the Failed
condition. Not applicable to other types of condition.lastTransitionTime
- A timestamp of when the condition was created or the last time time the condition transitioned from one status to another.The following is a list of condition types for a Domain resource.
Failed
status
attribute is always True
for a Failed
condition.
The Failed
condition is removed from the domain status when the underlying failure is resolved.message
attribute contains an error message with details of the failure.reason
attribute is set to one of the reasons listed in domain failure reasons.severity
attribute is set to one of the severity levels listed in domain failure severities.
Completed
status
attribute of a Completed
condition indicates whether the desired state of the
Domain resource has been fully achieved.status
attribute is set to True
when all of the following are true:
Failed
conditions, for example, no failures are detected.ready
at their target image or images,
restartVersion
, and introspectVersion
.spec.serverStartPolicy
value of AdminOnly
and the
Administration Server pod is running and ready.Available
status
attribute is set to True
when a sufficient number of pods are ready such that
all of the following are true:
serverStartPolicy
value of IfNeeded
or Always
is ready.True
in its Available
condition.
Clusters that are configured with a replicas
value of 0
or a serverStartPolicy
value of Never
are ignored.Available
status
can be True
even when the status
for the Completed
condition is False
,
a Failed
condition is reported, or a cluster has up to cluster.spec.maxUnavailable
pods
that are not ready.ConfigChangesPendingRestart
status
attribute is True
if all of the following are true:
domain.spec.configuration.model.onlineUpdate.onNonDynamicChanges
is CommitUpdateOnly
.domain.spec.configuration.model.onlineUpdate.enabled
is True
.ConfigChangesPendingRestart
condition is removed from the domain status when pending
non-dynamic runtime updates complete their processing due to a roll or restart.Rolling
status
attribute is always True
for a Rolling
condition.Rolling
condition is removed from the domain status when the rolling is completed.The following is a list of condition types for a Cluster resource.
Completed
status
attribute of a Completed
condition indicates whether the desired state of the
Cluster resource has been fully achieved.status
attribute is set to True
when all of the following are true:
Failed
domain.status.conditions
.restartVersion
, and introspectVersion
Available
status
attribute is set to True
when a sufficient number of WebLogic Server pods are
ready in the cluster. Both of the following must be true:
ready
.not ready
server pods, which are expected to run,
is less than or equal to the value of cluster.spec.maxUnavailable
, which defaults to 1
.serverStartPolicy
of Never
, or replicas
is 0
,
or a cluster is in a domain with serverStartPolicy
of AdminOnly
or Never
,
then the cluster will have an Available
condition that is False
.serverStartPolicy
of IfNeeded
,
and cluster.spec.replicas
is 1
,
then the cluster will have an Available
condition that is True
only when its single pod is ready.serverStartPolicy
of IfNeeded
,
cluster.spec.replicas
is 4
,
and cluster.spec.maxUnavailable
is 1
(the default),
then the cluster will have an Available
condition that is True
only when three or four of its pods are ready.Available
condition’s status
can be True
even when the status
for the Completed
condition is False
, a Failed
condition is reported on the Domain resource, or the cluster
has up to cluster.spec.maxUnavailable
pods that are not ready.After the operator detects a Cluster or Domain resource, it will ensure that each resource always has
exactly one occurrence of an Available
and of a Completed
condition. The operator will not
subsequently remove these conditions but instead, will change their status to True
or False
as appropriate. You can use this fact as a way to determine when an operator has detected a
Domain or Cluster resource.
The Failure
, Rolling
, and ConfigChangesPendingRestart
conditions are ephemeral; they are only
added when they apply, and are removed when they no longer apply.
The Failure
condition is the only condition that can have multiple occurrences. This occurs when
there are multiple concurrent failures of different types.
Use metadata.generation
and status.observedGeneration
in Domain and Cluster resources
to detect when their conditions and other status are up-to-date. Specifically, conditions may not
be up-to-date when domain.status.observedGeneration
generation does not equal
domain.metadata.generation
, or when cluster.status.observedGeneration
does not equal
cluster.metadata.generation
in any of the domain’s Cluster resources. This may indicate either
the operator is in the process of updating the status or the operator is not running.
A corresponding event is generated when an Available
, Completed
, Failure
, or Rolling
condition has changed. For details, see operator-generated event types.