Add xApp pod annotation suport
[it/dev.git] / xapp_onboarder / xapp_onboarder / helm_controller / xapp_schema.py
index e43f867..435e283 100644 (file)
@@ -44,6 +44,22 @@ schema = {
             ],
             "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
         },
+        "annotations": {
+            "$id": "#/properties/annotation",
+            "type": "object",
+            "title": "The k8s pod annotation",
+            "additionalProperties": {
+                "anyOf": [
+                    { "type": "string" },
+                    {
+                        "type": "array",
+                        "items": {
+                            "type": "object"
+                        }
+                    }
+                ]
+            }
+        },
         "containers": {
             "$id": "#/properties/containers",
             "type": "array",
@@ -108,11 +124,32 @@ schema = {
                     },
                     "command": {
                         "$id": "#/properties/containers/items/properties/command",
-                        "type": "string",
-                        "title": "Command To Run The xApp Container",
-                        "default": "command",
-                        "examples": [
-                            "command"
+                        "type": "array",
+                        "items": [
+                            {
+                                "$id": "#/properties/containers/items/properties/command/item",
+                                "type": "string",
+                                "title": "The Command Item",
+                                "default": "/bin/sh",
+                                "examples": [
+                                    "/bin/sh"
+                                ]
+                            }
+                        ]
+                    },
+                    "args": {
+                        "$id": "#/properties/containers/items/properties/args",
+                        "type": "array",
+                        "items": [
+                            {
+                                "$id": "#/properties/containers/items/properties/args/item",
+                                "type": "string",
+                                "title": "The Command Arguement Item",
+                                "default": "-c",
+                                "examples": [
+                                    "-c"
+                                ]
+                            }
                         ]
                     }
                 }