From 1afaf17e9346ae20a31a08b72293fea3581ecf5d Mon Sep 17 00:00:00 2001 From: Joan Goyeau Date: Sat, 18 Aug 2018 12:18:22 +0100 Subject: [PATCH] Add support for ReplicaSet --- .../client/ReplicaSetsOperations.scala | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main/scala/com/goyeau/kubernetes/client/ReplicaSetsOperations.scala diff --git a/src/main/scala/com/goyeau/kubernetes/client/ReplicaSetsOperations.scala b/src/main/scala/com/goyeau/kubernetes/client/ReplicaSetsOperations.scala new file mode 100644 index 00000000..a789800d --- /dev/null +++ b/src/main/scala/com/goyeau/kubernetes/client/ReplicaSetsOperations.scala @@ -0,0 +1,33 @@ +package com.goyeau.kubernetes.client + +import akka.actor.ActorSystem +import io.circe._ +import io.k8s.api.apps.v1beta2.{ReplicaSet, ReplicaSetList} + +private[client] case class ReplicaSetsOperations(protected val config: KubeConfig)( + implicit protected val system: ActorSystem, + protected val listDecoder: Decoder[ReplicaSetList], + encoder: Encoder[ReplicaSet], + decoder: Decoder[ReplicaSet] +) extends Listable[ReplicaSetList] { + protected val resourceUri = "apis/apps/v1beta2/replicasets" + + def namespace(namespace: String) = NamespacedReplicaSetsOperations(config, namespace) +} + +private[client] case class NamespacedReplicaSetsOperations( + protected val config: KubeConfig, + protected val namespace: String +)( + implicit protected val system: ActorSystem, + protected val resourceEncoder: Encoder[ReplicaSet], + protected val resourceDecoder: Decoder[ReplicaSet], + protected val listDecoder: Decoder[ReplicaSetList] +) extends Creatable[ReplicaSet] + with Replaceable[ReplicaSet] + with Gettable[ReplicaSet] + with Listable[ReplicaSetList] + with Deletable + with GroupDeletable { + protected val resourceUri = s"apis/apps/v1beta2/namespaces/$namespace/replicasets" +}