AppManager: Add API endpoint to install dodo app
Refactors cue definitions.
Next steps:
* Needs some cleanup, namespace is hard coded ...
* Maybe merge with regular install API
* Support exposing ports across clusters
Change-Id: Ibfc3c3f742b61f2c5874012fe6c77b958eae81d9
diff --git a/core/installer/schema_test.go b/core/installer/schema_test.go
index 32baa40..0dee8e8 100644
--- a/core/installer/schema_test.go
+++ b/core/installer/schema_test.go
@@ -101,3 +101,21 @@
t.Fatal("not really network")
}
}
+
+const inputIsCluster = `
+input: {
+ name: string
+ kubeconfig: string
+ ingressClassName: string
+}
+`
+
+func TestIsCluster(t *testing.T) {
+ v, err := ParseCueAppConfig(CueAppData{"/test.cue": []byte(inputIsCluster)})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if !isCluster(v.LookupPath(cue.ParsePath("input"))) {
+ t.Fatal("is cluster")
+ }
+}