Skip to content

Commit

Permalink
Actually, can we fold them into the existing integration-tests/rollin…
Browse files Browse the repository at this point in the history
…g-update-kubernetes?
  • Loading branch information
johanandren committed Dec 15, 2023
1 parent 3ff9a3a commit ab623a3
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ jobs:
echo 'Adding proxy port'
kubectl proxy --port=8080 &
echo 'Running tests'
sbt "integration-tests-rolling-update-kubernetes-cr/test"
./integration-test/rollingupdate-kubernetes/test-cr.sh
sbt "integration-tests-rolling-update-kubernetes/test"
./integration-test/rolling-update-kubernetes/test-cr.sh
- name: Print logs on failure
if: ${{ failure() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

- name: Run Integration Tests
run: |-
./integration-test/rollingupdate-kubernetes/test.sh
./integration-test/rolling-update-kubernetes/test.sh
- name: Print logs on failure
if: ${{ failure() }}
Expand Down
19 changes: 4 additions & 15 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lazy val `akka-management-root` = project
`integration-test-kubernetes-api-java`,
`integration-test-kubernetes-dns`,
`integration-test-marathon-api-docker`,
`integration-test-rollingupdate-kubernetes`,
`integration-test-rolling-update-kubernetes`,
`cluster-http`,
`cluster-bootstrap`,
`rolling-update-kubernetes`,
Expand Down Expand Up @@ -184,17 +184,6 @@ lazy val `rolling-update-kubernetes` = project
)
.dependsOn(`akka-management-pki`)

lazy val `integration-tests-rolling-update-kubernetes-cr` = project
.in(file("integration-tests/rolling-update-kubernetes-cr"))
.enablePlugins(AutomateHeaderPlugin)
.disablePlugins(com.geirsson.CiReleasePlugin, MimaPlugin)
.settings(
name := "integration-tests-rolling-update-kubernetes-cr",
libraryDependencies := Dependencies.RollingUpdateKubernetesCrIntegration,
publish / skip := true
)
.dependsOn(`rolling-update-kubernetes`)

lazy val `lease-kubernetes` = project
.in(file("lease-kubernetes"))
.enablePlugins(AutomateHeaderPlugin)
Expand Down Expand Up @@ -355,15 +344,15 @@ lazy val `integration-test-local` = project
)
.enablePlugins(JavaAppPackaging, AshScriptPlugin)

lazy val `integration-test-rollingupdate-kubernetes` = project
.in(file("integration-test/rollingupdate-kubernetes"))
lazy val `integration-test-rolling-update-kubernetes` = project
.in(file("integration-test/rolling-update-kubernetes"))
.enablePlugins(AutomateHeaderPlugin)
.disablePlugins(MimaPlugin)
.disablePlugins(com.geirsson.CiReleasePlugin)
.settings(
publish / skip := true,
doc / sources := Seq.empty,
libraryDependencies := Dependencies.BootstrapDemos
libraryDependencies := Dependencies.BootstrapDemos ++ Dependencies.RollingUpdateKubernetesIntegration
)
.dependsOn(
`akka-management`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: akka-rollingupdate-demo
name: akka-rollingupdate-demo
app: akka-rolling-update-demo
name: akka-rolling-update-demo
spec:
replicas: 3
selector:
matchLabels:
app: akka-rollingupdate-demo
app: akka-rolling-update-demo
strategy:
rollingUpdate:
maxSurge: 1
Expand All @@ -18,12 +18,12 @@ spec:
template:
metadata:
labels:
app: akka-rollingupdate-demo
actorSystemName: akka-rollingupdate-demo
app: akka-rolling-update-demo
actorSystemName: akka-rolling-update-demo
spec:
containers:
- name: akka-rollingupdate-demo
image: integration-test-rollingupdate-kubernetes:1.3.3.7
- name: akka-rolling-update-demo
image: integration-test-rolling-update-kubernetes:1.3.3.7
# Remove for a real project, the image is picked up locally for the integration test
imagePullPolicy: Never
#health
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: akka-rollingupdate-demo
name: akka-rollingupdate-demo
app: akka-rolling-update-demo
name: akka-rolling-update-demo
spec:
replicas: 3
selector:
matchLabels:
app: akka-rollingupdate-demo
app: akka-rolling-update-demo
strategy:
rollingUpdate:
maxSurge: 1
Expand All @@ -19,12 +19,12 @@ spec:
template:
metadata:
labels:
app: akka-rollingupdate-demo
actorSystemName: akka-rollingupdate-demo
app: akka-rolling-update-demo
actorSystemName: akka-rolling-update-demo
spec:
containers:
- name: akka-rollingupdate-demo
image: integration-test-rollingupdate-kubernetes:1.3.3.7
- name: akka-rolling-update-demo
image: integration-test-rolling-update-kubernetes:1.3.3.7
# Remove for a real project, the image is picked up locally for the integration test
imagePullPolicy: Never
#health
Expand Down Expand Up @@ -58,7 +58,7 @@ spec:
- name: REQUIRED_CONTACT_POINT_NR
value: "3"
- name: JAVA_TOOL_OPTIONS
value: "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75 -Xlog:gc -Dakka.rollingupdate.kubernetes.custom-resource.enabled=on"
value: "-XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75 -Xlog:gc -Dakka.rolling-update.kubernetes.custom-resource.enabled=on"
#deployment
---
#rbac-reader
Expand Down Expand Up @@ -112,7 +112,7 @@ metadata:
name: podcost-access
subjects:
- kind: User
name: system:serviceaccount:akka-rollingupdate-demo-cr-ns:default
name: system:serviceaccount:akka-rolling-update-demo-cr-ns:default
roleRef:
kind: Role
name: podcost-access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: akka-rollingupdate-demo
name: akka-rollingupdate-demo
app: akka-rolling-update-demo
name: akka-rolling-update-demo
spec:
replicas: 3
selector:
matchLabels:
app: akka-rollingupdate-demo
app: akka-rolling-update-demo
strategy:
rollingUpdate:
maxSurge: 1
Expand All @@ -19,12 +19,12 @@ spec:
template:
metadata:
labels:
app: akka-rollingupdate-demo
actorSystemName: akka-rollingupdate-demo
app: akka-rolling-update-demo
actorSystemName: akka-rolling-update-demo
spec:
containers:
- name: akka-rollingupdate-demo
image: integration-test-rollingupdate-kubernetes:1.3.3.7
- name: akka-rolling-update-demo
image: integration-test-rolling-update-kubernetes:1.3.3.7
# Remove for a real project, the image is picked up locally for the integration test
imagePullPolicy: Never
#health
Expand Down Expand Up @@ -113,7 +113,7 @@ metadata:
name: annotate-pods
subjects:
- kind: User
name: system:serviceaccount:akka-rollingupdate-demo-ns:default
name: system:serviceaccount:akka-rolling-update-demo-ns:default
roleRef:
kind: Role
name: pod-annotator
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.9.7
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ akka.management {
}
}

akka.rollingupdate.kubernetes {
akka.rolling-update.kubernetes {
# for documentation purposes, 3 is the default anyway
pod-deletion-cost.annotated-pods-nr = 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<appender-ref ref="CONSOLE"/>
</root>

<logger name="akka.rollingupdate" level="DEBUG"/>
<logger name="akka.rolling-update" level="DEBUG"/>
<logger name="akka.http" level="INFO"/>
<logger name="akka.io" level="INFO"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import akka.rollingupdate.kubernetes.PodDeletionCost

object PodDeletionCostDemoApp extends App {

implicit val system: ActorSystem = ActorSystem("akka-rollingupdate-demo")
implicit val system: ActorSystem = ActorSystem("akka-rolling-update-demo")

import system.log
val cluster = Cluster(system)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
* Copyright (C) 2017-2023 Lightbend Inc. <https://www.lightbend.com>
*/

package akka.rollingupdate.kubernetes

import scala.concurrent.Await
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -exu

export NAMESPACE=akka-rolling-update-demo-ns
export APP_NAME=akka-rolling-update-demo
export PROJECT_NAME=integration-test-rolling-update-kubernetes
export DEPLOYMENT=integration-test/rolling-update-kubernetes/kubernetes/akka-cluster-app-value-revision.yml

integration-test/scripts/app-version-revision-kubernetes-test.sh

12 changes: 12 additions & 0 deletions integration-test/rolling-update-kubernetes/test-cr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -exu

export NAMESPACE=akka-rolling-update-demo-cr-ns
export APP_NAME=akka-rolling-update-demo
export PROJECT_NAME=integration-test-rolling-update-kubernetes
export CRD=rolling-update-kubernetes/pod-cost.yml
export DEPLOYMENT=integration-test/rolling-update-kubernetes/kubernetes/akka-cluster-cr.yml

integration-test/scripts/rolling-update-kubernetes-cr-test.sh

11 changes: 11 additions & 0 deletions integration-test/rolling-update-kubernetes/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -exu

export NAMESPACE=akka-rolling-update-demo-ns
export APP_NAME=akka-rolling-update-demo
export PROJECT_NAME=integration-test-rolling-update-kubernetes
export DEPLOYMENT=integration-test/rolling-update-kubernetes/kubernetes/akka-cluster.yml

integration-test/scripts/rolling-update-kubernetes-test.sh

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions integration-test/rollingupdate-kubernetes/test-cr.sh

This file was deleted.

11 changes: 0 additions & 11 deletions integration-test/rollingupdate-kubernetes/test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ object Dependencies {
"com.typesafe.akka" %% "akka-testkit" % AkkaVersion % Test
)

val RollingUpdateKubernetesCrIntegration = RollingUpdateKubernetes ++ Seq(
val RollingUpdateKubernetesIntegration = RollingUpdateKubernetes ++ Seq(
"org.scalatest" %% "scalatest" % ScalaTestVersion % Test,
"com.github.tomakehurst" % "wiremock-jre8" % "2.34.0" % Test,
"org.scalatestplus" %% "junit-4-13" % ScalaTestPlusJUnitVersion % Test,
Expand Down

0 comments on commit ab623a3

Please sign in to comment.