From 9182429bec7d12503face52ff118d89cffde12c2 Mon Sep 17 00:00:00 2001 From: Moritz Johner Date: Fri, 8 Nov 2019 17:03:23 +0100 Subject: [PATCH] feat: implement crd validation fixes: #158 --- custom-resource-manifest.json | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/custom-resource-manifest.json b/custom-resource-manifest.json index af5326ff..ef9aacb9 100644 --- a/custom-resource-manifest.json +++ b/custom-resource-manifest.json @@ -29,6 +29,60 @@ "plural": "externalsecrets", "singular": "externalsecret" }, + "validation": { + "openAPIV3Schema": { + "type": "object", + "required": [ + "spec" + ], + "properties": { + "spec": { + "type": "object", + "required": [ + "backendType", + "data" + ], + "properties": { + "backendType": { + "type": "string", + "enum": [ + "secretsManager", + "systemManager" + ] + }, + "roleArn": { + "type": "string" + }, + "type": { + "type": "string" + }, + "data": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "required": [ + "key", + "name" + ], + "properties": { + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "property": { + "type": "string" + } + } + } + } + } + } + } + } + }, "subresources": { "status": {} }