Skip to content

Commit

Permalink
Release 3.0.0-beta7
Browse files Browse the repository at this point in the history
  • Loading branch information
doriordan committed Mar 4, 2025
1 parent b88723f commit 54d0d9c
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions akka/src/it/scala/skuber/DeploymentSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DeploymentSpec extends K8SFixture with Eventually with Matchers {
behavior of "Deployment"

it should "create a deployment" in { k8s =>
k8s.create(getNginxDeployment(nginxDeploymentName, "1.7.9")) map { d =>
k8s.create(getNginxDeployment(nginxDeploymentName, "1.27.1")) map { d =>
assert(d.name == nginxDeploymentName)
}
}
Expand All @@ -32,7 +32,7 @@ class DeploymentSpec extends K8SFixture with Eventually with Matchers {

it should "upgrade the newly created deployment" in { k8s =>
k8s.get[Deployment](nginxDeploymentName).flatMap { d =>
val updatedDeployment = d.updateContainer(getNginxContainer("1.9.1"))
val updatedDeployment = d.updateContainer(getNginxContainer("1.27.2"))
k8s.update(updatedDeployment).flatMap { _ =>
eventually(timeout(200.seconds), interval(5.seconds)) {
val retrieveDeployment=k8s.get[Deployment](nginxDeploymentName)
Expand Down
2 changes: 1 addition & 1 deletion akka/src/it/scala/skuber/ExecSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ExecSpec extends K8SFixture with Eventually with Matchers with BeforeAndAf
super.beforeAll()

val k8s = k8sInit
Await.result(k8s.create(getNginxPod(nginxPodName, "1.7.9")), 3.second)
Await.result(k8s.create(getNginxPod(nginxPodName, "1.27.2")), 3.second)
// Let the pod running
Thread.sleep(3000)
k8s.close()
Expand Down
6 changes: 3 additions & 3 deletions akka/src/it/scala/skuber/HorizontalPodAutoscalerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HorizontalPodAutoscalerSpec extends K8SFixture with Eventually with Matche
.addResourceMetric(ResourceMetricSource(Resource.cpu, UtilizationTarget(80)))
.withPodTypeScaleUpPolicy(2, 20, selectPolicy = Some("Min"), stabilizationWindowSeconds = Some(400))
.withPercentTypeScaleDownPolicy(10, 30, selectPolicy = Some("Max"), stabilizationWindowSeconds = Some(0))
k8s.create(getNginxDeployment(name, "1.7.9")).flatMap { d =>
k8s.create(getNginxDeployment(name, "1.27.2")).flatMap { d =>
k8s.create(HorizontalPodAutoscaler(name).withSpec(spec))
}.map { result =>
assert(result.name == name)
Expand All @@ -34,7 +34,7 @@ class HorizontalPodAutoscalerSpec extends K8SFixture with Eventually with Matche

it should "update a HorizontalPodAutoscaler" in { k8s =>
val name: String = java.util.UUID.randomUUID().toString
k8s.create(getNginxDeployment(name, "1.7.9")) flatMap { d =>
k8s.create(getNginxDeployment(name, "1.27.2")) flatMap { d =>
k8s.create(
HorizontalPodAutoscaler(name).withSpec(
HorizontalPodAutoscaler.Spec("apps/v1", "Deployment", name)
Expand Down Expand Up @@ -67,7 +67,7 @@ class HorizontalPodAutoscalerSpec extends K8SFixture with Eventually with Matche

it should "delete a HorizontalPodAutoscaler" in { k8s =>
val name: String = java.util.UUID.randomUUID().toString
k8s.create(getNginxDeployment(name, "1.7.9")) flatMap { d =>
k8s.create(getNginxDeployment(name, "1.27.2")) flatMap { d =>
k8s.create(
HorizontalPodAutoscaler(name).withSpec(
HorizontalPodAutoscaler.Spec("apps/v1", "Deployment", "nginx")
Expand Down
2 changes: 1 addition & 1 deletion akka/src/it/scala/skuber/NamespaceSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class NamespaceSpec extends K8SFixture with Eventually with Matchers {
Container(name = "nginx", image = "nginx:" + version)
.exposePort(port = 80)

def getNginxPod(namespace: String, name: String, version: String = "1.7.8"): Pod = {
def getNginxPod(namespace: String, name: String, version: String = "1.27.2"): Pod = {
val nginxContainer = getNginxContainer(version)
val nginxPodSpec = Pod.Spec(containers=List(nginxContainer))
val podMeta = ObjectMeta(namespace=namespace, name = name)
Expand Down
2 changes: 1 addition & 1 deletion akka/src/it/scala/skuber/PatchSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PatchSpec extends K8SFixture with Eventually with Matchers with BeforeAndA
super.beforeAll()

val k8s = k8sInit
Await.result(k8s.create(getNginxPod(nginxPodName, "1.7.9")), 3.second)
Await.result(k8s.create(getNginxPod(nginxPodName, "1.27.2")), 3.second)
// Let the pod running
Thread.sleep(3000)
k8s.close()
Expand Down
2 changes: 1 addition & 1 deletion akka/src/it/scala/skuber/PodLogSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PodLogSpec extends K8SFixture with Eventually with Matchers with BeforeAnd
super.beforeAll()

val k8s = k8sInit(config)
Await.result(k8s.create(getNginxPod(podName, "1.7.9")), 3.second)
Await.result(k8s.create(getNginxPod(podName, "1.27.2")), 3.second)
// Let the pod running
Thread.sleep(3000)
k8s.close()
Expand Down
6 changes: 3 additions & 3 deletions akka/src/it/scala/skuber/PodSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PodSpec extends K8SFixture with Eventually with Matchers with BeforeAndAft
behavior of "Pod"

it should "create a pod" in { k8s =>
k8s.create(getNginxPod(nginxPodName, "1.7.9")) map { p =>
k8s.create(getNginxPod(nginxPodName, "1.27.2")) map { p =>
assert(p.name == nginxPodName)
}
}
Expand Down Expand Up @@ -81,8 +81,8 @@ class PodSpec extends K8SFixture with Eventually with Matchers with BeforeAndAft

it should "delete selected pods" in { k8s =>
for {
_ <- k8s.create(getNginxPod(nginxPodName + "-foo", "1.7.9", labels = Map("foo" -> "1")))
_ <- k8s.create(getNginxPod(nginxPodName + "-bar", "1.7.9", labels = Map("bar" -> "2")))
_ <- k8s.create(getNginxPod(nginxPodName + "-foo", "1.27.2", labels = Map("foo" -> "1")))
_ <- k8s.create(getNginxPod(nginxPodName + "-bar", "1.27.2", labels = Map("bar" -> "2")))
_ <- k8s.deleteAllSelected[PodList](LabelSelector(LabelSelector.ExistsRequirement("foo")))
} yield eventually(timeout(100.seconds), interval(3.seconds)) {
val retrievePods = k8s.list[PodList]()
Expand Down
12 changes: 6 additions & 6 deletions akka/src/it/scala/skuber/WatchSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class WatchSpec extends K8SFixture with Eventually with Matchers with ScalaFutur

val deploymentOneName = java.util.UUID.randomUUID().toString
val deploymentTwoName = java.util.UUID.randomUUID().toString
val deploymentOne = getNginxDeployment(deploymentOneName, "1.7.9")
val deploymentTwo = getNginxDeployment(deploymentTwoName, "1.7.9")
val deploymentOne = getNginxDeployment(deploymentOneName, "1.27.2")
val deploymentTwo = getNginxDeployment(deploymentTwoName, "1.27.2")

val stream = k8s.list[DeploymentList]().map { l =>
val eventSource = k8s.getWatcher[Deployment].watchSinceVersion(l.resourceVersion)
Expand Down Expand Up @@ -82,8 +82,8 @@ class WatchSpec extends K8SFixture with Eventually with Matchers with ScalaFutur

val deploymentOneName = java.util.UUID.randomUUID().toString
val deploymentTwoName = java.util.UUID.randomUUID().toString
val deploymentOne = getNginxDeployment(deploymentOneName, "1.7.9")
val deploymentTwo = getNginxDeployment(deploymentTwoName, "1.7.9")
val deploymentOne = getNginxDeployment(deploymentOneName, "1.27.2")
val deploymentTwo = getNginxDeployment(deploymentTwoName, "1.27.2")

val stream = k8s.list[DeploymentList]().map { l =>
val eventSource = k8s.getWatcher[Deployment].watchClusterSinceVersion(l.resourceVersion)
Expand Down Expand Up @@ -141,7 +141,7 @@ class WatchSpec extends K8SFixture with Eventually with Matchers with ScalaFutur
import skuber.api.client.EventType

val deploymentName = java.util.UUID.randomUUID().toString
val deployment = getNginxDeployment(deploymentName, "1.7.9")
val deployment = getNginxDeployment(deploymentName, "1.27.2")

k8s.create(deployment).futureValue.name shouldBe deploymentName
eventually {
Expand Down Expand Up @@ -184,7 +184,7 @@ class WatchSpec extends K8SFixture with Eventually with Matchers with ScalaFutur
import skuber.api.client.EventType

val deploymentName = java.util.UUID.randomUUID().toString
val deployment = getNginxDeployment(deploymentName, "1.7.9")
val deployment = getNginxDeployment(deploymentName, "1.27.2")

k8s.create(deployment).futureValue.name shouldBe deploymentName
eventually {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ scalacOptions += "-target:jvm-1.8"

Test / scalacOptions ++= Seq("-Yrangepos")

ThisBuild / version := "3.0.0-beta6"
ThisBuild / version := "3.0.0-beta7"

sonatypeProfileName := "io.skuber"

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.3")
addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")

0 comments on commit 54d0d9c

Please sign in to comment.