com.coralogix.zio.k8s.client

Type members

Classlikes

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 parameters:
T

Resource type

trait ClusterResourceDelete[T, DeleteResult]

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 parameters:
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 parameters:
StatusT

Status subresource type

T

Resource type

final case class CodingFailure(requestInfo: K8sRequestInfo, failure: CharacterCodingException) extends K8sFailure

Error in the UTF-8 character coding of the response from the Kubernetes API

Error in the UTF-8 character coding of the response from the Kubernetes API

Value parameters:
failure

The character coding error

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 parameters:
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 parameters:
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 parameters:
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 parameters:
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
Companion:
class
case class K8sRequestInfo(resourceType: K8sResourceType, operation: String, namespace: Option[K8sNamespace], fieldSelector: Option[FieldSelector], labelSelector: Option[LabelSelector], name: Option[String])

K8s API request information to be provided in K8sFailure failures

K8s API request information to be provided in K8sFailure failures

Value parameters:
operation

Operation name

resourceType

Resource type

Companion:
object

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 parameters:
T

Resource type

trait NamespacedResourceDelete[T, DeleteResult]

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 parameters:
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 parameters:
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 parameters:
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 parameters:
T

Resource type

trait ResourceDelete[T, DeleteResult]

Extra capability for Resource interfaces providing delete

Extra capability for Resource interfaces providing delete

It is separated because because its result type varies for different resources.

Type parameters:
DeleteResult

Delete result type

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 parameters:
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 parameters:
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 parameters:
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 parameters:
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 parameters:
field

Field name