From c98af03e13525bf27132b412276deff6598e166d Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Fri, 20 Jan 2023 17:00:38 -0300 Subject: [PATCH 1/9] add connection interface schema Signed-off-by: Guillaume Falourd --- .../connection-interface-schema.json | 77 +++++++++++++++++++ connection-interface/v1/aws-ecs-conn.yaml | 21 +++++ connection-interface/v1/aws-rds-conn.yaml | 26 +++++++ 3 files changed, 124 insertions(+) create mode 100644 connection-interface/connection-interface-schema.json create mode 100644 connection-interface/v1/aws-ecs-conn.yaml create mode 100644 connection-interface/v1/aws-rds-conn.yaml diff --git a/connection-interface/connection-interface-schema.json b/connection-interface/connection-interface-schema.json new file mode 100644 index 0000000..c99b99a --- /dev/null +++ b/connection-interface/connection-interface-schema.json @@ -0,0 +1,77 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "schema-version": { + "type": "string" + }, + "kind": { + "type": "string", + "enum": [ + "connection-interface" + ] + }, + "metadata": { + "type": "object", + "properties": { + "name": { + "type": "string", + "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" + }, + "display-name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "version": { + "type": "string", + "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-]+)*))?$" + }, + "picture": { + "type": "string" + } + }, + "required": [ + "name", + "description", + "version" + ] + }, + "spec": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "aws-ecs-conn", + "aws-rds-conn" + ] + }, + "outputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "string", + "integer", + "secret", + "json" + ] + }, + "required": { + "type": "boolean" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/connection-interface/v1/aws-ecs-conn.yaml b/connection-interface/v1/aws-ecs-conn.yaml new file mode 100644 index 0000000..5311d23 --- /dev/null +++ b/connection-interface/v1/aws-ecs-conn.yaml @@ -0,0 +1,21 @@ +schemaVersion: v1 +kind: connection-interface +metadata: + name: AWS ECS CONNECTION INTERFACE + description: Connection Interface for AWS ECS + display-name: aws-ecs-connection-interface + version: 1.0.0 + picture: connection.png +spec: + type: aws-ecs-conn + outputs: + - name: autoscaling_capacity_providers + type: json + - name: cluster_arn + type: secret + - name: cluster_capacity_providers + type: json + - name: cluster_id + type: secret + - name: cluster_name + type: string \ No newline at end of file diff --git a/connection-interface/v1/aws-rds-conn.yaml b/connection-interface/v1/aws-rds-conn.yaml new file mode 100644 index 0000000..a18334c --- /dev/null +++ b/connection-interface/v1/aws-rds-conn.yaml @@ -0,0 +1,26 @@ +schemaVersion: v1 +kind: connection-interface +metadata: + name: AWS RDS CONNECTION INTERFACE + description: Connection Interface for AWS RDS + display-name: aws-rds-connection-interface + version: 1.0.0 + picture: connection.png +spec: + type: aws-rds-conn + outputs: + - name: type + type: string + - name: name + type: string + - name: host + type: string + - name: port + type: string + - name: user + type: string + - name: pass + type: secret + - name: policy + type: secret + required: false \ No newline at end of file From 90fcfb2aec88beb88538b56dfc8c1b5427c15bd9 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 26 Jan 2023 13:41:02 -0300 Subject: [PATCH 2/9] Update aws-ecs-conn.yaml --- connection-interface/v1/aws-ecs-conn.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/connection-interface/v1/aws-ecs-conn.yaml b/connection-interface/v1/aws-ecs-conn.yaml index 5311d23..3beab1a 100644 --- a/connection-interface/v1/aws-ecs-conn.yaml +++ b/connection-interface/v1/aws-ecs-conn.yaml @@ -9,13 +9,19 @@ metadata: spec: type: aws-ecs-conn outputs: - - name: autoscaling_capacity_providers - type: json - - name: cluster_arn + autoscaling_capacity_providers: + type: array + items: + autoscaling_capacity_provider: + type: string + cluster_arn: type: secret - - name: cluster_capacity_providers - type: json - - name: cluster_id + cluster_capacity_providers: + type: array + items: + cluster_capacity_provider: + type: string + cluster_id: type: secret - - name: cluster_name - type: string \ No newline at end of file + cluster_name: + type: string From 72f28502bb8b44ee0661b75138415d7f15e92877 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 26 Jan 2023 13:43:53 -0300 Subject: [PATCH 3/9] Update aws-rds-conn.yaml --- connection-interface/v1/aws-rds-conn.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/connection-interface/v1/aws-rds-conn.yaml b/connection-interface/v1/aws-rds-conn.yaml index a18334c..7e49822 100644 --- a/connection-interface/v1/aws-rds-conn.yaml +++ b/connection-interface/v1/aws-rds-conn.yaml @@ -9,18 +9,17 @@ metadata: spec: type: aws-rds-conn outputs: - - name: type + type: type: string - - name: name + name: type: string - - name: host + host: type: string - - name: port + port: type: string - - name: user + user: type: string - - name: pass + pass: type: secret - - name: policy + policy: type: secret - required: false \ No newline at end of file From ec76efc8ca46a5218711f92868e19cb70acb7b1a Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 26 Jan 2023 13:45:31 -0300 Subject: [PATCH 4/9] Update aws-rds-conn.yaml --- connection-interface/v1/aws-rds-conn.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/connection-interface/v1/aws-rds-conn.yaml b/connection-interface/v1/aws-rds-conn.yaml index 7e49822..5a0806f 100644 --- a/connection-interface/v1/aws-rds-conn.yaml +++ b/connection-interface/v1/aws-rds-conn.yaml @@ -23,3 +23,4 @@ spec: type: secret policy: type: secret + required: false From ffd92a5bb5af9d5b8fc566784421e8892096fe68 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 26 Jan 2023 13:53:08 -0300 Subject: [PATCH 5/9] Update aws-rds-conn.yaml --- connection-interface/v1/aws-rds-conn.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/connection-interface/v1/aws-rds-conn.yaml b/connection-interface/v1/aws-rds-conn.yaml index 5a0806f..7e49822 100644 --- a/connection-interface/v1/aws-rds-conn.yaml +++ b/connection-interface/v1/aws-rds-conn.yaml @@ -23,4 +23,3 @@ spec: type: secret policy: type: secret - required: false From bb083d26ec1a8bc0ae50b6dbebe4fa882c8150f2 Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Thu, 26 Jan 2023 13:57:27 -0300 Subject: [PATCH 6/9] Update connection-interface-schema.json --- .../connection-interface-schema.json | 46 ++++++------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/connection-interface/connection-interface-schema.json b/connection-interface/connection-interface-schema.json index c99b99a..9b5bf44 100644 --- a/connection-interface/connection-interface-schema.json +++ b/connection-interface/connection-interface-schema.json @@ -39,39 +39,23 @@ ] }, "spec": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "aws-ecs-conn", - "aws-rds-conn" - ] - }, - "outputs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "string", - "integer", - "secret", - "json" - ] - }, - "required": { - "type": "boolean" - } - } + "outputs": { + "type": "array", + "items": { + "type": { + "type": "string", + "enum": [ + "null", + "boolean", + "secret", + "objecy", + "array", + "number", + "string" + ] } } } } } -} \ No newline at end of file +} From 24a2b8566a35d546fd187a96f13e692c71f9164e Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Fri, 27 Jan 2023 10:36:05 -0300 Subject: [PATCH 7/9] Update connection-interface-schema.json --- connection-interface/connection-interface-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection-interface/connection-interface-schema.json b/connection-interface/connection-interface-schema.json index 9b5bf44..00d59d0 100644 --- a/connection-interface/connection-interface-schema.json +++ b/connection-interface/connection-interface-schema.json @@ -48,7 +48,7 @@ "null", "boolean", "secret", - "objecy", + "object", "array", "number", "string" From 2f29045a9a6689e66a82a84d913635b37a1d510c Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Fri, 3 Feb 2023 16:15:37 -0300 Subject: [PATCH 8/9] update schema Signed-off-by: Guillaume Falourd --- .../connection-interface-schema.json | 27 +++++++------------ connection-interface/v1/aws-ecs-conn.yaml | 25 +++++++++-------- connection-interface/v1/aws-rds-conn.yaml | 22 +++++++-------- 3 files changed, 33 insertions(+), 41 deletions(-) diff --git a/connection-interface/connection-interface-schema.json b/connection-interface/connection-interface-schema.json index c99b99a..1144ac7 100644 --- a/connection-interface/connection-interface-schema.json +++ b/connection-interface/connection-interface-schema.json @@ -15,11 +15,16 @@ "type": "object", "properties": { "name": { - "type": "string", - "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" - }, - "display-name": { - "type": "string" + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "aws-ecs-conn", + "aws-rds-conn" + ] + } + } }, "description": { "type": "string" @@ -27,9 +32,6 @@ "version": { "type": "string", "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-]+)*))?$" - }, - "picture": { - "type": "string" } }, "required": [ @@ -39,15 +41,6 @@ ] }, "spec": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "aws-ecs-conn", - "aws-rds-conn" - ] - }, "outputs": { "type": "array", "items": { diff --git a/connection-interface/v1/aws-ecs-conn.yaml b/connection-interface/v1/aws-ecs-conn.yaml index 5311d23..436fe7a 100644 --- a/connection-interface/v1/aws-ecs-conn.yaml +++ b/connection-interface/v1/aws-ecs-conn.yaml @@ -1,21 +1,24 @@ schemaVersion: v1 kind: connection-interface metadata: - name: AWS ECS CONNECTION INTERFACE + name: aws-ecs-conn description: Connection Interface for AWS ECS - display-name: aws-ecs-connection-interface version: 1.0.0 - picture: connection.png spec: - type: aws-ecs-conn outputs: - - name: autoscaling_capacity_providers - type: json - - name: cluster_arn + autoscaling_capacity_providers: + type: array + items: + autoscaling_capacity_provider: + type: string + cluster_arn: type: secret - - name: cluster_capacity_providers - type: json - - name: cluster_id + cluster_capacity_providers: + type: array + items: + cluster_capacity_provider: + type: string + cluster_id: type: secret - - name: cluster_name + cluster_name: type: string \ No newline at end of file diff --git a/connection-interface/v1/aws-rds-conn.yaml b/connection-interface/v1/aws-rds-conn.yaml index a18334c..839b0cd 100644 --- a/connection-interface/v1/aws-rds-conn.yaml +++ b/connection-interface/v1/aws-rds-conn.yaml @@ -1,26 +1,22 @@ schemaVersion: v1 kind: connection-interface metadata: - name: AWS RDS CONNECTION INTERFACE + name: aws-rds-conn description: Connection Interface for AWS RDS - display-name: aws-rds-connection-interface version: 1.0.0 - picture: connection.png spec: - type: aws-rds-conn outputs: - - name: type + type: type: string - - name: name + name: type: string - - name: host + host: type: string - - name: port + port: type: string - - name: user + user: type: string - - name: pass + pass: type: secret - - name: policy - type: secret - required: false \ No newline at end of file + policy: + type: secret \ No newline at end of file From 763b9ee5971a5af90bfb2d5c779df9a434e49ccf Mon Sep 17 00:00:00 2001 From: Guillaume Falourd Date: Fri, 3 Feb 2023 16:23:35 -0300 Subject: [PATCH 9/9] update schema Signed-off-by: Guillaume Falourd --- .../connection-interface-schema.json | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/connection-interface/connection-interface-schema.json b/connection-interface/connection-interface-schema.json index 5614ca7..3c1de51 100644 --- a/connection-interface/connection-interface-schema.json +++ b/connection-interface/connection-interface-schema.json @@ -41,30 +41,22 @@ ] }, "spec": { - "outputs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "string", - "integer", - "secret", - "json" - ] - }, - "required": { - "type": "boolean" - } - } + "outputs": { + "type": "array", + "items": { + "type": { + "type": "string", + "enum": [ + "boolean", + "secret", + "objecy", + "array", + "number", + "string" + ] } } } } } -} +} \ No newline at end of file