From cc4226e9881a2597ae0ad7909c572308f5a49a84 Mon Sep 17 00:00:00 2001 From: Pierre Gerbelot Date: Thu, 16 Nov 2023 15:17:25 +0100 Subject: [PATCH] feat: add ports to helm request and helm response --- src/schemas/_index.yaml | 8 +++++++ src/schemas/enums/HelmPortProtocol.yaml | 5 +++++ src/schemas/helm/HelmPortRequest.yaml | 26 ++++++++++++++++++++++ src/schemas/helm/HelmPortResponse.yaml | 26 ++++++++++++++++++++++ src/schemas/helm/HelmPortResponseList.yaml | 3 +++ src/schemas/helm/HelmRequest.yaml | 1 + src/schemas/helm/HelmResponse.yaml | 4 +++- 7 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 src/schemas/enums/HelmPortProtocol.yaml create mode 100644 src/schemas/helm/HelmPortRequest.yaml create mode 100644 src/schemas/helm/HelmPortResponse.yaml create mode 100644 src/schemas/helm/HelmPortResponseList.yaml diff --git a/src/schemas/_index.yaml b/src/schemas/_index.yaml index 6990ab04..b82745fa 100644 --- a/src/schemas/_index.yaml +++ b/src/schemas/_index.yaml @@ -454,12 +454,20 @@ HelmDeploymentRestrictionResponse: $ref: ./helm/HelmDeploymentRestrictionResponse.yaml HelmDeploymentRestrictionResponseList: $ref: ./helm/HelmDeploymentRestrictionResponseList.yaml +HelmPortRequest: + $ref: ./helm/HelmPortRequest.yaml +HelmPortResponse: + $ref: ./helm/HelmResponse.yaml +HelmPortResponseList: + $ref: ./helm/HelmResponseList.yaml #HelmScheduleEvent: # $ref: ./enums/HelmScheduleEvent.yaml HelmForceEvent: $ref: ./enums/HelmForceEvent.yaml #DeploymentHistoryHelmResponse: # $ref: ./helm/DeploymentHistoryHelmResponse.yaml +HelmPortProtocolEnum: + $ref: ./enums/HelmPortProtocol.yaml Key: $ref: ./Key.yaml KubernetesEnum: diff --git a/src/schemas/enums/HelmPortProtocol.yaml b/src/schemas/enums/HelmPortProtocol.yaml new file mode 100644 index 00000000..dbf6e329 --- /dev/null +++ b/src/schemas/enums/HelmPortProtocol.yaml @@ -0,0 +1,5 @@ +type: string +default: HTTP +enum: + - HTTP + - GRPC diff --git a/src/schemas/helm/HelmPortRequest.yaml b/src/schemas/helm/HelmPortRequest.yaml new file mode 100644 index 00000000..50564877 --- /dev/null +++ b/src/schemas/helm/HelmPortRequest.yaml @@ -0,0 +1,26 @@ +type: object +properties: + ports: + type: array + items: + type: object + required: + - service_name + - internal_port + properties: + name: + type: string + internal_port: + type: integer + example: 8080 + description: The listening port of your service. + external_port: + type: integer + example: 8080 + description: The exposed port for your service. This is optional. If not set a default port will be used. + service_name: + type: string + namespace: + type: string + protocol: + $ref: '../enums/HelmPortProtocol.yaml' diff --git a/src/schemas/helm/HelmPortResponse.yaml b/src/schemas/helm/HelmPortResponse.yaml new file mode 100644 index 00000000..37271306 --- /dev/null +++ b/src/schemas/helm/HelmPortResponse.yaml @@ -0,0 +1,26 @@ +type: object +required: + - id + - internal_port + - protocol + - service_name +properties: + id: + type: string + format: uuid + name: + type: string + internal_port: + type: integer + example: 8080 + description: The listening port of your service. + external_port: + type: integer + example: 8080 + description: The exposed port for your service. This is optional. If not set a default port will be used. + service_name: + type: string + namespace: + type: string + protocol: + $ref: '../enums/HelmPortProtocol.yaml' diff --git a/src/schemas/helm/HelmPortResponseList.yaml b/src/schemas/helm/HelmPortResponseList.yaml new file mode 100644 index 00000000..46781df8 --- /dev/null +++ b/src/schemas/helm/HelmPortResponseList.yaml @@ -0,0 +1,3 @@ +type: array +items: + $ref: './HelmPortResponse.yaml' diff --git a/src/schemas/helm/HelmRequest.yaml b/src/schemas/helm/HelmRequest.yaml index bbcc4659..35f8e43b 100644 --- a/src/schemas/helm/HelmRequest.yaml +++ b/src/schemas/helm/HelmRequest.yaml @@ -1,4 +1,5 @@ allOf: + - $ref: './HelmPortRequest.yaml' - type: object required: - name diff --git a/src/schemas/helm/HelmResponse.yaml b/src/schemas/helm/HelmResponse.yaml index 1fc89b8d..b64602af 100644 --- a/src/schemas/helm/HelmResponse.yaml +++ b/src/schemas/helm/HelmResponse.yaml @@ -27,7 +27,9 @@ allOf: auto_deploy: type: boolean description: | - Specify if the service will be automatically updated after receiving a new image tag or a new commit according to the source type. + Specify if the service will be automatically updated after receiving a new image tag or a new commit according to the source type. + ports: + $ref: './HelmPortResponseList.yaml' source: nullable: false oneOf: