diff --git a/k8/debeziumservers.debezium.io-v1.yml b/k8/debeziumservers.debezium.io-v1.yml index bcc0141..4958606 100644 --- a/k8/debeziumservers.debezium.io-v1.yml +++ b/k8/debeziumservers.debezium.io-v1.yml @@ -18,8 +18,11 @@ spec: spec: properties: runtime: + description: Configuration allowing the modification of various aspects + of Debezium Server runtime. properties: volumes: + description: Additional volumes mounted to containers. items: properties: hostPath: @@ -669,6 +672,8 @@ spec: type: object type: array env: + description: Additional environment variables set from ConfigMaps + or Secrets in containers. items: properties: prefix: @@ -1074,13 +1079,21 @@ spec: type: object type: object transforms: + description: Single Message Transformations employed by this instance + of Debezium Server. items: properties: negate: + description: Determines if the result of the applied predicate + will be negated. type: boolean predicate: + description: The name of the predicate to be applied to this + transformation. type: string type: + description: Fully qualified name of Java class implementing + the transformation. type: string config: properties: @@ -1094,10 +1107,13 @@ spec: type: object type: array sink: + description: Sink configuration. properties: type: + description: Sink type recognised by Debezium Server. type: string config: + description: Sink configuration properties. properties: props: additionalProperties: @@ -1108,22 +1124,32 @@ spec: x-kubernetes-preserve-unknown-fields: true type: object storage: + description: Storage configuration to be used by this instance of + Debezium Server. properties: claimName: + description: Name of persistent volume claim for persistent storage. type: string type: + description: Storage type. enum: - persistent - ephemeral type: string type: object version: + description: Version of Debezium Server to be used. type: string image: + description: Image used for Debezium Server container. This property + takes precedence over version. type: string quarkus: + description: Quarkus configuration passed down to Debezium Server + process. properties: config: + description: Quarkus configuration properties. properties: props: additionalProperties: @@ -1137,8 +1163,11 @@ spec: additionalProperties: properties: type: + description: Fully qualified name of Java class implementing + the predicate. type: string config: + description: Predicate configuration properties. properties: props: additionalProperties: @@ -1148,12 +1177,16 @@ spec: type: object x-kubernetes-preserve-unknown-fields: true type: object + description: Predicates employed by this instance of Debezium Server. type: object source: + description: Debezium source connector configuration. properties: class: + description: Fully qualified name of source connector Java class. type: string config: + description: Source connector configuration properties. properties: props: additionalProperties: @@ -1164,12 +1197,16 @@ spec: x-kubernetes-preserve-unknown-fields: true type: object format: + description: Message output format configuration. properties: key: + description: Message key format configuration. properties: type: + description: Format type recognised by Debezium Server. type: string config: + description: Format configuration properties. properties: props: additionalProperties: @@ -1180,10 +1217,13 @@ spec: x-kubernetes-preserve-unknown-fields: true type: object value: + description: Message value format configuration. properties: type: + description: Format type recognised by Debezium Server. type: string config: + description: Format configuration properties. properties: props: additionalProperties: @@ -1194,10 +1234,13 @@ spec: x-kubernetes-preserve-unknown-fields: true type: object header: + description: Message header format configuration. properties: type: + description: Format type recognised by Debezium Server. type: string config: + description: Format configuration properties. properties: props: additionalProperties: diff --git a/src/main/java/io/debezium/operator/model/DebeziumServerSpec.java b/src/main/java/io/debezium/operator/model/DebeziumServerSpec.java index 3062b1f..2d53c1e 100644 --- a/src/main/java/io/debezium/operator/model/DebeziumServerSpec.java +++ b/src/main/java/io/debezium/operator/model/DebeziumServerSpec.java @@ -8,19 +8,45 @@ import java.util.List; import java.util.Map; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; +@JsonInclude(JsonInclude.Include.NON_DEFAULT) public class DebeziumServerSpec implements ConfigMappable { + + @JsonPropertyDescription("Image used for Debezium Server container. This property takes precedence over version.") private String image; + + @JsonPropertyDescription("Version of Debezium Server to be used.") private String version; + + @JsonPropertyDescription("Storage configuration to be used by this instance of Debezium Server.") private Storage storage; + + @JsonPropertyDescription("Sink configuration.") private Sink sink; + + @JsonPropertyDescription("Debezium source connector configuration.") private Source source; + + @JsonPropertyDescription("Message output format configuration.") private Format format; + + @JsonPropertyDescription("Quarkus configuration passed down to Debezium Server process.") private Quarkus quarkus; + + @JsonPropertyDescription("Configuration allowing the modification of various aspects of Debezium Server runtime.") private Runtime runtime; + + @JsonPropertyDescription("Single Message Transformations employed by this instance of Debezium Server.") + @JsonInclude(JsonInclude.Include.NON_EMPTY) private List transforms; + + @JsonPropertyDescription("Predicates employed by this instance of Debezium Server.") + @JsonInclude(JsonInclude.Include.NON_EMPTY) private Map predicates; public DebeziumServerSpec() { diff --git a/src/main/java/io/debezium/operator/model/Format.java b/src/main/java/io/debezium/operator/model/Format.java index 281c746..5a2fa3f 100644 --- a/src/main/java/io/debezium/operator/model/Format.java +++ b/src/main/java/io/debezium/operator/model/Format.java @@ -5,13 +5,20 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class Format implements ConfigMappable { + @JsonPropertyDescription("Message key format configuration.") private FormatType key; + + @JsonPropertyDescription("Message value format configuration.") private FormatType value; + + @JsonPropertyDescription("Message header format configuration.") private FormatType header; public Format() { diff --git a/src/main/java/io/debezium/operator/model/FormatType.java b/src/main/java/io/debezium/operator/model/FormatType.java index c4ee3f1..85c5b58 100644 --- a/src/main/java/io/debezium/operator/model/FormatType.java +++ b/src/main/java/io/debezium/operator/model/FormatType.java @@ -5,13 +5,17 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class FormatType implements ConfigMappable { + @JsonPropertyDescription("Format type recognised by Debezium Server.") private String type; + @JsonPropertyDescription("Format configuration properties.") private ConfigProperties config; public FormatType() { diff --git a/src/main/java/io/debezium/operator/model/Predicate.java b/src/main/java/io/debezium/operator/model/Predicate.java index 2271d28..2a12e41 100644 --- a/src/main/java/io/debezium/operator/model/Predicate.java +++ b/src/main/java/io/debezium/operator/model/Predicate.java @@ -5,12 +5,19 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class Predicate implements ConfigMappable { + @JsonPropertyDescription("Fully qualified name of Java class implementing the predicate.") + @JsonProperty(required = true) private String type; + + @JsonPropertyDescription("Predicate configuration properties.") private ConfigProperties config; public Predicate() { diff --git a/src/main/java/io/debezium/operator/model/Quarkus.java b/src/main/java/io/debezium/operator/model/Quarkus.java index 0689934..9c1c749 100644 --- a/src/main/java/io/debezium/operator/model/Quarkus.java +++ b/src/main/java/io/debezium/operator/model/Quarkus.java @@ -5,10 +5,14 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class Quarkus implements ConfigMappable { + + @JsonPropertyDescription("Quarkus configuration properties.") private ConfigProperties config; public Quarkus() { diff --git a/src/main/java/io/debezium/operator/model/Runtime.java b/src/main/java/io/debezium/operator/model/Runtime.java index 46b5c4e..8e39082 100644 --- a/src/main/java/io/debezium/operator/model/Runtime.java +++ b/src/main/java/io/debezium/operator/model/Runtime.java @@ -15,8 +15,10 @@ public class Runtime { + @JsonPropertyDescription("Additional environment variables set from ConfigMaps or Secrets in containers.") private List env; + @JsonPropertyDescription("Additional volumes mounted to containers.") private List volumes; @JsonPropertyDescription("Debezium Server resource templates.") diff --git a/src/main/java/io/debezium/operator/model/Sink.java b/src/main/java/io/debezium/operator/model/Sink.java index 07c9157..90630a7 100644 --- a/src/main/java/io/debezium/operator/model/Sink.java +++ b/src/main/java/io/debezium/operator/model/Sink.java @@ -5,12 +5,19 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class Sink implements ConfigMappable { + @JsonPropertyDescription("Sink type recognised by Debezium Server.") + @JsonProperty(required = true) private String type; + + @JsonPropertyDescription("Sink configuration properties.") private ConfigProperties config; public Sink() { diff --git a/src/main/java/io/debezium/operator/model/Source.java b/src/main/java/io/debezium/operator/model/Source.java index 3124574..70647ac 100644 --- a/src/main/java/io/debezium/operator/model/Source.java +++ b/src/main/java/io/debezium/operator/model/Source.java @@ -6,20 +6,24 @@ package io.debezium.operator.model; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class Source implements ConfigMappable { + @JsonPropertyDescription("Fully qualified name of source connector Java class.") + @JsonProperty(value = "class", required = true) private String sourceClass; + + @JsonPropertyDescription("Source connector configuration properties.") private ConfigProperties config; public Source() { this.config = new ConfigProperties(); } - @JsonProperty("class") public String getSourceClass() { return sourceClass; } diff --git a/src/main/java/io/debezium/operator/model/Storage.java b/src/main/java/io/debezium/operator/model/Storage.java index 20066c6..73488d9 100644 --- a/src/main/java/io/debezium/operator/model/Storage.java +++ b/src/main/java/io/debezium/operator/model/Storage.java @@ -5,9 +5,14 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + public class Storage { + @JsonPropertyDescription("Storage type.") private StorageType type; + + @JsonPropertyDescription("Name of persistent volume claim for persistent storage.") private String claimName; public Storage() { diff --git a/src/main/java/io/debezium/operator/model/Transformation.java b/src/main/java/io/debezium/operator/model/Transformation.java index db7106f..737d109 100644 --- a/src/main/java/io/debezium/operator/model/Transformation.java +++ b/src/main/java/io/debezium/operator/model/Transformation.java @@ -5,13 +5,22 @@ */ package io.debezium.operator.model; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; + import io.debezium.operator.config.ConfigMappable; import io.debezium.operator.config.ConfigMapping; public class Transformation implements ConfigMappable { + @JsonPropertyDescription("Fully qualified name of Java class implementing the transformation.") + @JsonProperty(required = true) private String type; + + @JsonPropertyDescription("The name of the predicate to be applied to this transformation.") private String predicate; + + @JsonPropertyDescription("Determines if the result of the applied predicate will be negated.") private boolean negate = false; private ConfigProperties config;