Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 6394426

Browse files
authored
Operator on Fabric8 actions (#994)
* blueprint ported to tools * [WIP] partial operator actions * a little more * Cloudflow config to its own module * more fixes to the tests * more * most of pod configuration * more * more * more and more * topic actions * event actions * endpoint action * initial AkkaRunner wip * Akka Runner is ported * minor * more * compiling operator actions * downwardapi * finally operator * operator * 22 to go * compiling * crd creation * more * working * more * carl working * more fixes * half flink ... * flink runner * more * IT TEST PASSING - BASELINE * more * getting rid of CloudflowApplication * detach status computation from model * working external cloudflow status * cleanup * type back the events * renamings * re-use the blueprint * comment * docker-image * docker publish and sbt workflow * various ... * fix the crd * blueprint to Cr convertion * deployment context * resource names spec ported * topics action spec * event action spec * endpoint action * more * cloudflow application spec * pods configs spec * akka runner spec * half runner actions spec * runner action spec * flink runner spec * fix volumes config validation and spark runner spec * optimize imports * WIP * more debug * more * fixes for integration tests * no retries * LAST COMMIT WITH PROVIDED ACTION * delete action extensions * disable scalafmtcheck for blueprint * published kube actions and fix the tests * remove the skuber operator * the glorious return of ActionExtension * more * scalafmt sbt * cleanup * abstract methods in runner * re-generate cli native config * cleanup * softer create of resources ... * try to improve * more * check * restore akka cerateOrReplace * more * again * more * wrangling patches for Spark * more * more stability fixes * more debug * more * try again * retry again to make it working * more * regenerated graal vm config * header * more * review * review * minor * review * more * review * akka arg * fixes
1 parent 53e51e6 commit 6394426

131 files changed

Lines changed: 8194 additions & 7500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/build.sbt

Lines changed: 5 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ lazy val root =
101101
localRunner,
102102
runner,
103103
blueprint,
104-
plugin,
105-
operator,
106-
operatorActions
104+
plugin
107105
)
108106

109107
lazy val streamlets =
@@ -357,7 +355,8 @@ lazy val blueprint =
357355
cloudflowModule("cloudflow-blueprint")
358356
.enablePlugins(BuildInfoPlugin, ScalafmtPlugin)
359357
.settings(
360-
scalafmtOnCompile := true,
358+
scalafmtOnCompile := false,
359+
Compile / scalafmtCheck := true,
361360
libraryDependencies ++= Vector(
362361
Avro,
363362
Config,
@@ -372,11 +371,9 @@ lazy val blueprint =
372371
publishArtifact in Test := true
373372
)
374373
.settings(
374+
Compile / unmanagedSourceDirectories += (ThisProject / baseDirectory).value / ".." / ".." / "tools" / "cloudflow-blueprint" / "src" / "main" / "scala",
375375
crossScalaVersions := Vector(Version.Scala212, Version.Scala213),
376-
buildInfoKeys := Seq[BuildInfoKey](
377-
name,
378-
version
379-
),
376+
buildInfoKeys := Seq[BuildInfoKey](name, version),
380377
buildInfoPackage := "cloudflow.blueprint"
381378
)
382379

@@ -453,117 +450,6 @@ lazy val localRunner =
453450
crossScalaVersions := Vector(Version.Scala212, Version.Scala213),
454451
scalafmtOnCompile := true
455452
)
456-
lazy val operatorActions =
457-
cloudflowModule("cloudflow-operator-actions")
458-
.enablePlugins(
459-
ScalafmtPlugin
460-
)
461-
.dependsOn(blueprint % "compile->compile;test->test")
462-
.settings(
463-
crossScalaVersions := Vector(Version.Scala212, Version.Scala213),
464-
scalafmtOnCompile := true,
465-
libraryDependencies ++= Vector(
466-
AkkaSlf4j,
467-
Ficus,
468-
LogbackClassic,
469-
LogbackCore,
470-
Skuber,
471-
ScalaTest,
472-
"org.apache.kafka" % "kafka-clients" % Version.KafkaClients,
473-
ScalaCheck % "test"
474-
)
475-
)
476-
477-
lazy val operator =
478-
cloudflowModule("cloudflow-operator")
479-
.enablePlugins(
480-
sbtdocker.DockerPlugin,
481-
JavaAppPackaging,
482-
BuildInfoPlugin,
483-
ScalafmtPlugin
484-
)
485-
.dependsOn(blueprint % "compile->compile;test->test")
486-
.dependsOn(operatorActions)
487-
.settings(
488-
scalafmtOnCompile := true,
489-
libraryDependencies ++= Vector(
490-
AkkaSlf4j,
491-
AkkaStream,
492-
Ficus,
493-
Skuber,
494-
ScalaTest,
495-
"org.apache.kafka" % "kafka-clients" % Version.KafkaClients,
496-
AkkaStreamTestkit % "test",
497-
ScalaCheck % "test",
498-
Avro4sJson % "test"
499-
)
500-
)
501-
.settings(
502-
skip in publish := scalaVersion.value == Version.Scala212,
503-
crossScalaVersions := Vector(Version.Scala212, Version.Scala213),
504-
organization := "com.lightbend.cloudflow",
505-
skip in publish := true,
506-
mainClass in Compile := Some("cloudflow.operator.Main"),
507-
publishArtifact in (Compile, packageDoc) := false,
508-
publishArtifact in (Compile, packageSrc) := false,
509-
buildOptions in docker := BuildOptions(
510-
cache = true,
511-
removeIntermediateContainers = BuildOptions.Remove.OnSuccess,
512-
pullBaseImage = BuildOptions.Pull.IfMissing
513-
// TODO: "Always" won't work unless you have used `docker login` with
514-
// your own service/user account. We should move to use some
515-
// way to call `gcloud docker --` instead.
516-
// pullBaseImage = BuildOptions.Pull.Always
517-
),
518-
imageNames in docker := Seq(
519-
ImageName(
520-
registry = None,
521-
namespace = Some("lightbend"),
522-
repository = "cloudflow-operator",
523-
tag = Some((ThisBuild / version).value)
524-
)
525-
),
526-
dockerfile in docker := {
527-
val appDir: File = stage.value
528-
val targetDir = "/app"
529-
530-
new Dockerfile {
531-
from("adoptopenjdk/openjdk8:alpine")
532-
entryPoint(s"$targetDir/bin/${executableScriptName.value}")
533-
copy(appDir, targetDir, chown = "daemon:daemon")
534-
addInstruction(Instructions.Run("apk add bash; \\"))
535-
}
536-
},
537-
Test / fork := true,
538-
scalacOptions ++= Seq(
539-
"-encoding",
540-
"UTF-8",
541-
"-target:jvm-1.8",
542-
"-Xlog-reflective-calls",
543-
"-Xlint",
544-
"-Ywarn-unused",
545-
"-deprecation",
546-
"-feature",
547-
"-language:_",
548-
"-unchecked"
549-
),
550-
scalacOptions in (Compile, console) := (scalacOptions in (Global)).value.filter(_ == "-Ywarn-unused-import")
551-
)
552-
.settings(
553-
buildInfoKeys := Seq[BuildInfoKey](
554-
name,
555-
version,
556-
scalaVersion,
557-
sbtVersion,
558-
BuildInfoKey.action("buildTime") {
559-
java.time.Instant.now().toString
560-
},
561-
BuildInfoKey.action("buildUser") {
562-
sys.props.getOrElse("user.name", "unknown")
563-
}
564-
),
565-
buildInfoPackage := "cloudflow.operator"
566-
)
567453

568454
def cloudflowModule(moduleID: String): Project =
569455
Project(id = moduleID, base = file(moduleID))

core/cloudflow-blueprint/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)