Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Commit 84288b4

Browse files
task: rename config files (#49)
1 parent cb866a3 commit 84288b4

File tree

7 files changed

+21
-22
lines changed

7 files changed

+21
-22
lines changed

src/main/java/org/trustify/operator/Config.java renamed to src/main/java/org/trustify/operator/TrustifyImagesConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import io.smallrye.config.WithName;
55

66
@ConfigMapping(prefix = "related.image")
7-
public interface Config {
7+
public interface TrustifyImagesConfig {
88

99
@WithName("ui")
1010
String uiImage();

src/main/java/org/trustify/operator/cdrs/v2alpha1/server/db/deployment/DBDeployment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import io.javaoperatorsdk.operator.processing.dependent.workflow.Condition;
1111
import jakarta.enterprise.context.ApplicationScoped;
1212
import jakarta.inject.Inject;
13-
import org.trustify.operator.Config;
1413
import org.trustify.operator.Constants;
14+
import org.trustify.operator.TrustifyImagesConfig;
1515
import org.trustify.operator.cdrs.v2alpha1.Trustify;
1616
import org.trustify.operator.cdrs.v2alpha1.TrustifySpec;
1717
import org.trustify.operator.cdrs.v2alpha1.server.db.pvc.DBPersistentVolumeClaim;
@@ -34,7 +34,7 @@ public class DBDeployment extends CRUDKubernetesDependentResource<Deployment, Tr
3434
public static final String LABEL_SELECTOR = "app.kubernetes.io/managed-by=trustify-operator,component=db";
3535

3636
@Inject
37-
Config config;
37+
TrustifyImagesConfig trustifyImagesConfig;
3838

3939
public DBDeployment() {
4040
super(Deployment.class);
@@ -89,8 +89,8 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context)
8989
.getMandatory(Constants.CONTEXT_LABELS_KEY, Map.class);
9090

9191
Map<String, String> selectorLabels = Constants.DB_SELECTOR_LABELS;
92-
String image = Optional.ofNullable(cr.getSpec().dbImage()).orElse(config.dbImage());
93-
String imagePullPolicy = Optional.ofNullable(cr.getSpec().imagePullPolicy()).orElse(config.imagePullPolicy());
92+
String image = Optional.ofNullable(cr.getSpec().dbImage()).orElse(trustifyImagesConfig.dbImage());
93+
String imagePullPolicy = Optional.ofNullable(cr.getSpec().imagePullPolicy()).orElse(trustifyImagesConfig.imagePullPolicy());
9494

9595
TrustifySpec.ResourcesLimitSpec resourcesLimitSpec = CRDUtils.getValueFromSubSpec(cr.getSpec().databaseSpec(), TrustifySpec.DatabaseSpec::resourceLimits)
9696
.orElse(null);

src/main/java/org/trustify/operator/cdrs/v2alpha1/server/deployment/ServerDeployment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import io.javaoperatorsdk.operator.processing.dependent.workflow.Condition;
1111
import jakarta.enterprise.context.ApplicationScoped;
1212
import jakarta.inject.Inject;
13-
import org.trustify.operator.Config;
1413
import org.trustify.operator.Constants;
14+
import org.trustify.operator.TrustifyImagesConfig;
1515
import org.trustify.operator.cdrs.v2alpha1.Trustify;
1616
import org.trustify.operator.cdrs.v2alpha1.TrustifySpec;
1717
import org.trustify.operator.cdrs.v2alpha1.server.db.deployment.DBDeployment;
@@ -32,7 +32,7 @@ public class ServerDeployment extends CRUDKubernetesDependentResource<Deployment
3232
public static final String LABEL_SELECTOR = "app.kubernetes.io/managed-by=trustify-operator,component=server";
3333

3434
@Inject
35-
Config config;
35+
TrustifyImagesConfig trustifyImagesConfig;
3636

3737
public ServerDeployment() {
3838
super(Deployment.class);
@@ -98,8 +98,8 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context,
9898
.getMandatory(Constants.CONTEXT_LABELS_KEY, Map.class);
9999

100100
Map<String, String> selectorLabels = Constants.SERVER_SELECTOR_LABELS;
101-
String image = Optional.ofNullable(cr.getSpec().serverImage()).orElse(config.serverImage());
102-
String imagePullPolicy = Optional.ofNullable(cr.getSpec().imagePullPolicy()).orElse(config.imagePullPolicy());
101+
String image = Optional.ofNullable(cr.getSpec().serverImage()).orElse(trustifyImagesConfig.serverImage());
102+
String imagePullPolicy = Optional.ofNullable(cr.getSpec().imagePullPolicy()).orElse(trustifyImagesConfig.imagePullPolicy());
103103

104104
List<EnvVar> envVars = distConfigurator.getAllEnvVars();
105105
List<Volume> volumes = distConfigurator.getAllVolumes();

src/main/java/org/trustify/operator/cdrs/v2alpha1/ui/deployment/UIDeployment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import io.javaoperatorsdk.operator.processing.dependent.workflow.Condition;
1111
import jakarta.enterprise.context.ApplicationScoped;
1212
import jakarta.inject.Inject;
13-
import org.trustify.operator.Config;
1413
import org.trustify.operator.Constants;
14+
import org.trustify.operator.TrustifyImagesConfig;
1515
import org.trustify.operator.cdrs.v2alpha1.Trustify;
1616
import org.trustify.operator.cdrs.v2alpha1.TrustifySpec;
1717
import org.trustify.operator.cdrs.v2alpha1.server.deployment.ServerDeployment;
@@ -33,7 +33,7 @@ public class UIDeployment extends CRUDKubernetesDependentResource<Deployment, Tr
3333
public static final String LABEL_SELECTOR = "app.kubernetes.io/managed-by=trustify-operator,component=ui";
3434

3535
@Inject
36-
Config config;
36+
TrustifyImagesConfig trustifyImagesConfig;
3737

3838
public UIDeployment() {
3939
super(Deployment.class);
@@ -101,8 +101,8 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context)
101101
.getMandatory(Constants.CONTEXT_LABELS_KEY, Map.class);
102102

103103
Map<String, String> selectorLabels = Constants.UI_SELECTOR_LABELS;
104-
String image = Optional.ofNullable(cr.getSpec().uiImage()).orElse(config.uiImage());
105-
String imagePullPolicy = Optional.ofNullable(cr.getSpec().imagePullPolicy()).orElse(config.imagePullPolicy());
104+
String image = Optional.ofNullable(cr.getSpec().uiImage()).orElse(trustifyImagesConfig.uiImage());
105+
String imagePullPolicy = Optional.ofNullable(cr.getSpec().imagePullPolicy()).orElse(trustifyImagesConfig.imagePullPolicy());
106106

107107
TrustifySpec.ResourcesLimitSpec resourcesLimitSpec = CRDUtils.getValueFromSubSpec(cr.getSpec(), TrustifySpec::uiResourceLimitSpec)
108108
.orElse(null);

src/main/java/org/trustify/operator/controllers/TrustifyDistConfigurator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import org.trustify.operator.cdrs.v2alpha1.TrustifySpec;
88
import org.trustify.operator.cdrs.v2alpha1.server.db.deployment.DBDeployment;
99
import org.trustify.operator.cdrs.v2alpha1.server.db.service.DBService;
10-
import org.trustify.operator.cdrs.v2alpha1.server.service.ServerService;
1110
import org.trustify.operator.cdrs.v2alpha1.server.pvc.ServerStoragePersistentVolumeClaim;
11+
import org.trustify.operator.cdrs.v2alpha1.server.service.ServerService;
1212

1313
import java.util.*;
1414
import java.util.function.Function;

src/main/java/org/trustify/operator/controllers/TrustifyReconciler.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
import org.jboss.logging.Logger;
1414
import org.trustify.operator.cdrs.v2alpha1.Trustify;
1515
import org.trustify.operator.cdrs.v2alpha1.TrustifyStatusCondition;
16-
import org.trustify.operator.cdrs.v2alpha1.server.deployment.ServerDeployment;
17-
import org.trustify.operator.cdrs.v2alpha1.server.service.ServerService;
18-
import org.trustify.operator.cdrs.v2alpha1.server.pvc.ServerStoragePersistentVolumeClaim;
19-
import org.trustify.operator.cdrs.v2alpha1.server.pvc.ServerStoragePersistentVolumeClaimActivationCondition;
16+
import org.trustify.operator.cdrs.v2alpha1.ingress.AppIngress;
2017
import org.trustify.operator.cdrs.v2alpha1.server.db.deployment.DBDeployment;
2118
import org.trustify.operator.cdrs.v2alpha1.server.db.deployment.DBDeploymentActivationCondition;
2219
import org.trustify.operator.cdrs.v2alpha1.server.db.pvc.DBPersistentVolumeClaim;
@@ -25,8 +22,11 @@
2522
import org.trustify.operator.cdrs.v2alpha1.server.db.secret.DBSecretActivationCondition;
2623
import org.trustify.operator.cdrs.v2alpha1.server.db.service.DBService;
2724
import org.trustify.operator.cdrs.v2alpha1.server.db.service.DBServiceActivationCondition;
25+
import org.trustify.operator.cdrs.v2alpha1.server.deployment.ServerDeployment;
26+
import org.trustify.operator.cdrs.v2alpha1.server.pvc.ServerStoragePersistentVolumeClaim;
27+
import org.trustify.operator.cdrs.v2alpha1.server.pvc.ServerStoragePersistentVolumeClaimActivationCondition;
28+
import org.trustify.operator.cdrs.v2alpha1.server.service.ServerService;
2829
import org.trustify.operator.cdrs.v2alpha1.ui.deployment.UIDeployment;
29-
import org.trustify.operator.cdrs.v2alpha1.ingress.AppIngress;
3030
import org.trustify.operator.cdrs.v2alpha1.ui.service.UIService;
3131

3232
import java.time.Duration;

src/main/resources/application.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ quarkus:
3333
generate-service-monitor: "false"
3434
env:
3535
vars:
36-
related-image-trustify-ui: ${related.image.ui}
37-
related-image-trustify-server: ${related.image.server}
36+
related-image-ui: ${related.image.ui}
37+
related-image-server: ${related.image.server}
3838
related-image-db: ${related.image.db}
39-
related-image-importer: ${related.image.importer}
4039
resources:
4140
requests:
4241
memory: 64Mi

0 commit comments

Comments
 (0)