From e15581bb0bb2d021f95eacf9b079748bae9bc4e2 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:53:01 -0800 Subject: [PATCH 1/3] Add log drain format option --- .../schemas/containers/config/ContainerIntegrations.yml | 8 ++++++++ stackspec/schema/StackSpecContainerConfigIntegrations.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/components/schemas/containers/config/ContainerIntegrations.yml b/components/schemas/containers/config/ContainerIntegrations.yml index bb7eb7e6..00cc5b90 100644 --- a/components/schemas/containers/config/ContainerIntegrations.yml +++ b/components/schemas/containers/config/ContainerIntegrations.yml @@ -138,5 +138,13 @@ properties: url: description: The URL to the third party logging service where logs will be sent. type: string + format: + description: The format Cycle will use to send the logs. + type: + - string + - "null" + enum: + - ndjson-headers + - ndjson-raw - type: "null" - type: "null" diff --git a/stackspec/schema/StackSpecContainerConfigIntegrations.yml b/stackspec/schema/StackSpecContainerConfigIntegrations.yml index bc0e8d92..7b2ace2d 100644 --- a/stackspec/schema/StackSpecContainerConfigIntegrations.yml +++ b/stackspec/schema/StackSpecContainerConfigIntegrations.yml @@ -219,6 +219,14 @@ properties: oneOf: - type: string - $ref: StackVariable.yml + format: + description: The format Cycle will use to send the logs. + oneOf: + - type: string + enum: + - ndjson-headers + - ndjson-raw + - StackVariable.yml - type: "null" - $ref: StackVariable.yml - type: "null" From ca1e7a9718608d46a0d93a703f784ddfddd3547c Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:55:00 -0800 Subject: [PATCH 2/3] fix $ref --- stackspec/schema/StackSpecContainerConfigIntegrations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stackspec/schema/StackSpecContainerConfigIntegrations.yml b/stackspec/schema/StackSpecContainerConfigIntegrations.yml index 7b2ace2d..0336a517 100644 --- a/stackspec/schema/StackSpecContainerConfigIntegrations.yml +++ b/stackspec/schema/StackSpecContainerConfigIntegrations.yml @@ -226,7 +226,7 @@ properties: enum: - ndjson-headers - ndjson-raw - - StackVariable.yml + - $ref: StackVariable.yml - type: "null" - $ref: StackVariable.yml - type: "null" From 0ba3cb9f8cae79e79c799d6cca10d8743166fcef Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Tue, 21 Jan 2025 12:29:25 -0800 Subject: [PATCH 3/3] oneof null --- .../containers/config/ContainerIntegrations.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/schemas/containers/config/ContainerIntegrations.yml b/components/schemas/containers/config/ContainerIntegrations.yml index 00cc5b90..1e9c7ad5 100644 --- a/components/schemas/containers/config/ContainerIntegrations.yml +++ b/components/schemas/containers/config/ContainerIntegrations.yml @@ -140,11 +140,11 @@ properties: type: string format: description: The format Cycle will use to send the logs. - type: - - string - - "null" - enum: - - ndjson-headers - - ndjson-raw + oneOf: + - type: string + enum: + - ndjson-headers + - ndjson-raw + - type: "null" - type: "null" - type: "null"