K8sStatusWriterWrapper
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| StatusWriter | client.StatusWriter | This field embeds a client.StatusWriter, providing the K8sStatusWriterWrapper with methods to update the status of Kubernetes resources. |
Methods
Update()
@classmethod
def Update(
ctx: context.Context,
obj: client.Object,
opts: client.SubResourceUpdateOption
) - > error
Updates the status subresource of the given Kubernetes object. This method is used to modify only the status field of an object without affecting its spec or metadata.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the request, used for cancellation and timeouts. |
| obj | client.Object | The Kubernetes object whose status subresource is to be updated. The object must contain the desired status. |
| opts | client.SubResourceUpdateOption | Options for the update operation, such as field managers or dry run settings. |
Returns
| Type | Description |
|---|---|
error | An error if the update operation fails, otherwise nil. |
Patch()
@classmethod
def Patch(
ctx: context.Context,
obj: client.Object,
patch: client.Patch,
opts: client.SubResourcePatchOption
) - > error
Patches the status subresource of the given Kubernetes object. This method applies a partial update to the status field, allowing for efficient modification of specific status attributes.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the request, used for cancellation and timeouts. |
| obj | client.Object | The Kubernetes object whose status subresource is to be patched. The object's metadata (name, namespace) identifies the target, and its status field may contain the current state for strategic merge patches. |
| patch | client.Patch | The patch to apply to the object's status subresource. This can be a strategic merge patch, JSON merge patch, or JSON patch. |
| opts | client.SubResourcePatchOption | Options for the patch operation, such as field managers or dry run settings. |
Returns
| Type | Description |
|---|---|
error | An error if the patch operation fails, otherwise nil. |