Skip to content

Commit

Permalink
DBZ-8352 Update QOSDK
Browse files Browse the repository at this point in the history
  • Loading branch information
mfvitale committed Nov 27, 2024
1 parent 3f996bf commit 5c20697
Show file tree
Hide file tree
Showing 17 changed files with 106 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.debezium.operator.api.config.ConfigMappable;
import io.debezium.operator.api.config.ConfigMapping;
import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@Documented
Expand All @@ -19,6 +20,7 @@ public class FormatType implements ConfigMappable<DebeziumServer> {

@JsonPropertyDescription("Format type recognised by Debezium Server.")
@JsonProperty(defaultValue = "json")
@Default("json")
private String type = "json";

@JsonPropertyDescription("Format configuration properties.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.debezium.operator.api.config.ConfigMappable;
import io.debezium.operator.api.config.ConfigMapping;
import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@Documented
Expand All @@ -26,6 +27,7 @@ public class Transformation implements ConfigMappable<DebeziumServer> {

@JsonPropertyDescription("Determines if the result of the applied predicate will be negated.")
@JsonProperty(defaultValue = "false")
@Default("false")
private boolean negate = false;
private ConfigProperties config;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.debezium.operator.api.config.ConfigMapping;
import io.debezium.operator.api.model.DebeziumServer;
import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@JsonPropertyOrder({ "enabled" })
Expand All @@ -24,6 +25,7 @@ public class RuntimeApi implements ConfigMappable<DebeziumServer> {
private boolean enabled = false;

@JsonProperty(defaultValue = "8080")
@Default("8080")
@JsonPropertyDescription("Port number used by the k8s service exposing the API")
private int port = 8080;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@JsonPropertyOrder({ "enabled", "secret", "accessFile", "secretFile" })
Expand All @@ -24,15 +25,18 @@ public class JmxAuthentication {

@JsonPropertyDescription("Whether JMX authentication should be enabled for this Debezium Server instance.")
@JsonProperty(defaultValue = "false")
@Default("false")
private boolean enabled = false;
@JsonPropertyDescription("Secret providing credential files")
@JsonProperty(required = true)
private String secret;
@JsonPropertyDescription("JMX access file name and secret key")
@JsonProperty(defaultValue = JMX_DEFAULT_ACCESS_FILE)
@Default(JMX_DEFAULT_ACCESS_FILE)
private String accessFile = JMX_DEFAULT_ACCESS_FILE;
@JsonPropertyDescription("JMX password file name and secret key")
@JsonProperty(defaultValue = JMX_DEFAULT_PASSWORD_FILE)
@Default(JMX_DEFAULT_PASSWORD_FILE)
private String passwordFile = JMX_DEFAULT_PASSWORD_FILE;

public boolean isEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@JsonPropertyOrder({ "enabled", "port", "auth" })
Expand All @@ -21,9 +22,11 @@ public class JmxConfig {

@JsonPropertyDescription("Whether JMX should be enabled for this Debezium Server instance.")
@JsonProperty(defaultValue = "false")
@Default("false")
private boolean enabled = false;
@JsonPropertyDescription("JMX port.")
@JsonProperty(defaultValue = "1099")
@Default("1099")
private int port = 1099;
@JsonPropertyDescription("JMX authentication config.")
private JmxAuthentication authentication;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@Documented
Expand All @@ -17,6 +18,7 @@ public class DataStorage {

@JsonPropertyDescription("Storage type.")
@JsonProperty(defaultValue = "ephemeral")
@Default("ephemeral")
private StorageType type;

@JsonPropertyDescription("Name of persistent volume claim for persistent storage.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;

@JsonPropertyOrder({ "initialDelaySeconds", "periodSeconds", "timeoutSeconds", "failureThreshold" })
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
Expand All @@ -19,15 +20,19 @@ public class Probe {

@JsonPropertyDescription("Number of seconds after the container has started before probes are initiated.")
@JsonProperty(defaultValue = "5")
@Default("5")
private int initialDelaySeconds = 5;
@JsonPropertyDescription("How often (in seconds) to perform the probe.")
@JsonProperty(defaultValue = "10")
@Default("10")
private int periodSeconds = 10;
@JsonPropertyDescription("Number of seconds after which the probe times out.")
@JsonProperty(defaultValue = "10")
@Default("10")
private int timeoutSeconds = 10;
@JsonPropertyDescription("Number of failures in a row before the overall check has failed.")
@JsonProperty(defaultValue = "3")
@Default("3")
private int failureThreshold = 3;

public int getInitialDelaySeconds() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.debezium.operator.api.model.source.storage.offset.KafkaOffsetStore;
import io.debezium.operator.api.model.source.storage.offset.RedisOffsetStore;
import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@Documented
Expand All @@ -43,6 +44,7 @@ public class Offset implements ConfigMappable<DebeziumServer> {
private CustomStore store;
@JsonPropertyDescription("Interval at which to try commiting offsets")
@JsonProperty(defaultValue = "60000")
@Default("60000")
private long flushMs = 60000L;

public long getFlushMs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import io.debezium.operator.api.config.ConfigMapping;
import io.debezium.operator.api.model.DebeziumServer;
import io.fabric8.generator.annotation.Default;

public class RedisStore extends AbstractStore {
public static final String CONFIG_PREFIX = "redis";
Expand All @@ -25,6 +26,7 @@ public class RedisStore extends AbstractStore {
private String password;
@JsonPropertyDescription("Redis username")
@JsonProperty(defaultValue = "false")
@Default("false")
private boolean sslEnabled = false;
@JsonPropertyDescription("Redis hash key")
@JsonProperty(required = false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.debezium.operator.api.config.ConfigMapping;
import io.debezium.operator.api.model.DebeziumServer;
import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@Documented
Expand All @@ -20,18 +21,22 @@ public class RedisStoreWaitConfig implements ConfigMappable<DebeziumServer> {

@JsonPropertyDescription("In case of Redis with replica, this allows to verify that the data has been written to replica")
@JsonProperty(defaultValue = "false")
@Default("false")
private boolean enabled = false;

@JsonPropertyDescription("Timeout in ms when waiting for replica")
@JsonProperty(defaultValue = "1000")
@Default("1000")
private long timeoutMs = 1000L;

@JsonPropertyDescription("Enables retry on wait for replica")
@JsonProperty(defaultValue = "false")
@Default("false")
private boolean retry = false;

@JsonPropertyDescription("Delay of retry on wait")
@JsonProperty(defaultValue = "1000")
@Default("1000")
private long retryDelayMs = 1000L;

public boolean isEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import io.debezium.operator.docs.annotations.Documented;
import io.fabric8.generator.annotation.Default;
import io.sundr.builder.annotations.Buildable;

@Buildable(editableEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", lazyCollectionInitEnabled = false)
Expand All @@ -23,6 +24,7 @@ public class DebeziumServerStatus {

@JsonPropertyDescription("Latest observed generation")
@JsonProperty(defaultValue = "0L")
@Default("0")
private Long observedGeneration;

public List<Condition> getConditions() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
debezium.server.image.name=quay.io/debezium/server
quarkus.application.name=debezium-operator
quarkus.application.name=debezium-operator
# TODO remove this once the https://github.com/fabric8io/kubernetes-client/pull/6666 is available in the 7.0.0
quarkus.operator-sdk.crd.use-deprecated-v1-crd-generator=true
2 changes: 1 addition & 1 deletion examples/postgres/002_kafka-ephemeral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
transaction.state.log.min.isr: 1
default.replication.factor: 1
min.insync.replicas: 1
inter.broker.protocol.version: "3.4"
inter.broker.protocol.version: "3.8"
storage:
type: ephemeral
zookeeper:
Expand Down
Loading

0 comments on commit 5c20697

Please sign in to comment.