com.coralogix.zio.k8s.client

Type members

Classlikes

trait ClusterResource[T]

Generic interface for working with Kubernetes cluster resources.

Generic interface for working with Kubernetes cluster resources.

More type safe than Resource as it does not allow passing a namespace.

Type Params
T

Resource type

Extra capability for ClusterResource interfaces providing deleteAll

Extra capability for ClusterResource interfaces providing deleteAll

It is separated because it is not supported by all resources.

Type Params
T

Resource type

trait ClusterResourceStatus[StatusT, T]

Extra capability for ClusterResource interfaces to manage status subresources

Extra capability for ClusterResource interfaces to manage status subresources

Type Params
StatusT

Status subresource type

T

Resource type

final case class DecodedFailure(requestInfo: K8sRequestInfo, status: Status, code: StatusCode) extends K8sFailure

Failed Kubernetes API request

Failed Kubernetes API request

Note that some specific failure types are encoded by their own failure type. See Unauthorized, Gone and NotFound.

Value Params
code

Response status code

status

The Kubernetes com.coralogix.zio.k8s.model.pkg.apis.meta.v1.Status value returned in the failure response

final case class DeserializationFailure(requestInfo: K8sRequestInfo, error: NonEmptyList[Error]) extends K8sFailure

Error indicating that Kubernetes API responded with success, but the response body could not be deserialized to the expected data type.

Error indicating that Kubernetes API responded with success, but the response body could not be deserialized to the expected data type.

Value Params
error

The list of deserialization errors

Companion
object
case object Gone extends K8sFailure

The server returned with HTTP 410 (Gone) which has a specific role in handling watch streams.

The server returned with HTTP 410 (Gone) which has a specific role in handling watch streams.

final case class HttpFailure(requestInfo: K8sRequestInfo, message: String, code: StatusCode) extends K8sFailure

Failed HTTP response

Failed HTTP response

Indicates that the response from the Kubernetes API has a non-successful status code and it's body did not contain a com.coralogix.zio.k8s.model.pkg.apis.meta.v1.Status value.

In case the error is a standard Kubernetes error message, the error type will be DecodedFailure.

Note that some specific failure types are encoded by their own failure type. See Unauthorized, Gone and NotFound.

Value Params
code

Response status code

message

Response message

final case class InvalidEvent(requestInfo: K8sRequestInfo, eventType: String) extends K8sFailure

An unsupported event type was sent in a watch stream

An unsupported event type was sent in a watch stream

Value Params
eventType

The unrecognized event type from the server

sealed trait K8sFailure

Error type of the Kubernetes client

Error type of the Kubernetes client

Companion
object
object K8sFailure
Companion
class
case class K8sRequestInfo(resourceType: K8sResourceType, operation: String)

K8s API request information to be provided in K8sFailure failures

K8s API request information to be provided in K8sFailure failures

Value Params
operation

Operation name

resourceType

Resource type

Generic interface for working with namespaced Kubernetes resources.

Generic interface for working with namespaced Kubernetes resources.

More type safe than Resource as it requires passing a namespace where necessary.

Type Params
T

Resource type

Extra capability for NamespacedResource interfaces providing deleteAll

Extra capability for NamespacedResource interfaces providing deleteAll

It is separated because it is not supported by all resources.

Type Params
T

Resource type

trait NamespacedResourceStatus[StatusT, T]

Extra capability for NamespacedResource interfaces to manage status subresources

Extra capability for NamespacedResource interfaces to manage status subresources

Type Params
StatusT

Status subresource type

T

Resource type

case object NotFound extends K8sFailure

The sever returned with HTTP 404 (NotFound).

The sever returned with HTTP 404 (NotFound).

See the K8sFailure.syntax.K8sZIOSyntax.ifFound extension method for a convenient way to handle these errors.

final case class RequestFailure(requestInfo: K8sRequestInfo, reason: Throwable) extends K8sFailure

Failed to send the HTTP request to the Kubernetes API

Failed to send the HTTP request to the Kubernetes API

Value Params
reason

The failure reason

trait Resource[T]

Generic interface for working with Kubernetes resources

Generic interface for working with Kubernetes resources

This interface supports both namespaced and cluster resources. For more type safe variants check NamespacedResource and ClusterResource.

Type Params
T

Resource type

Extra capability for Resource interfaces providing deleteAll

Extra capability for Resource interfaces providing deleteAll

It is separated because it is not supported by all resources.

Type Params
T

Resource type

trait ResourceStatus[StatusT, T]

Extra capability for Resource interfaces to manage status subresources

Extra capability for Resource interfaces to manage status subresources

Type Params
StatusT

Status subresource type

T

Resource type

trait Subresource[T]

Generic interface for subresources.

Generic interface for subresources.

Every subresource supports a different subset of these operations, so usually you should use the actual generated subresource interfaces instead.

Type Params
T

Subresource type

final case class Unauthorized(requestInfo: K8sRequestInfo, message: String) extends K8sFailure

Request unauthorized

Request unauthorized

Indicates that the Kubernetes API returned a HTTP 401 response.

Value Params
message

Message of the response

final case class UndefinedField(field: String) extends K8sFailure

Error produced by the generated getter methods on Kubernetes data structures.

Error produced by the generated getter methods on Kubernetes data structures.

Indicates that the requested field is not present.

Value Params
field

Field name