Skip to content

Commit

Permalink
DBZ-6493 renaming externalConfiguration to runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jcechace committed May 31, 2023
1 parent f2779a5 commit c2598cc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
storage:
type: persistent | ephemeral # enum
claimName: String # only valid and required for persistent
externalConfiguration:
runtime:
env: EnvFromSource array # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#envfromsource-v1-core
volumes: Volume array # https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#volume-v1-core
quarkus:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ protected Deployment desired(DebeziumServer primary, Context<DebeziumServer> con
}

private void addExternalEnvVariables(DebeziumServer primary, Deployment deployment) {
var config = primary.getSpec().getExternalConfiguration();
var config = primary.getSpec().getRuntime();
var containers = deployment.getSpec().getTemplate().getSpec().getContainers();

containers.forEach(container -> container.getEnvFrom().addAll(config.getEnv()));
}

private void addExternalVolumes(DebeziumServer primary, Deployment deployment) {
var config = primary.getSpec().getExternalConfiguration();
var config = primary.getSpec().getRuntime();
var volumes = deployment.getSpec().getTemplate().getSpec().getVolumes();

var containers = deployment.getSpec().getTemplate().getSpec().getContainers();
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/io/debezium/operator/model/DebeziumServerSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class DebeziumServerSpec implements ConfigMappable {
private Source source;
private Format format;
private Quarkus quarkus;
private ExternalConfiguration externalConfiguration;
private Runtime runtime;
private List<Transformation> transforms;
private List<Predicate> predicates;

Expand All @@ -28,7 +28,7 @@ public DebeziumServerSpec() {
this.source = new Source();
this.format = new Format();
this.quarkus = new Quarkus();
this.externalConfiguration = new ExternalConfiguration();
this.runtime = new Runtime();
this.transforms = List.of();
this.predicates = List.of();
}
Expand Down Expand Up @@ -81,12 +81,12 @@ public void setQuarkus(Quarkus quarkus) {
this.quarkus = quarkus;
}

public ExternalConfiguration getExternalConfiguration() {
return externalConfiguration;
public Runtime getRuntime() {
return runtime;
}

public void setExternalConfiguration(ExternalConfiguration externalConfiguration) {
this.externalConfiguration = externalConfiguration;
public void setRuntime(Runtime runtime) {
this.runtime = runtime;
}

public Format getFormat() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
import io.fabric8.kubernetes.api.model.EnvFromSource;
import io.fabric8.kubernetes.api.model.Volume;

public class ExternalConfiguration {
public class Runtime {

private List<EnvFromSource> env;

private List<Volume> volumes;

public ExternalConfiguration() {
public Runtime() {
this.env = new ArrayList<>();
this.volumes = new ArrayList<>();
}
Expand Down

0 comments on commit c2598cc

Please sign in to comment.