Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace db image to operate on OCP #4

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context)
)
.withLivenessProbe(new ProbeBuilder()
.withExec(new ExecActionBuilder()
.withCommand("/bin/sh", "-c", "psql -U $POSTGRES_USER -d $POSTGRES_DB -c 'SELECT 1'")
.withCommand("/bin/sh", "-c", "psql -U $POSTGRESQL_USER -d $POSTGRESQL_DATABASE -c 'SELECT 1'")
.build()
)
.withInitialDelaySeconds(10)
Expand All @@ -146,7 +146,7 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context)
)
.withReadinessProbe(new ProbeBuilder()
.withExec(new ExecActionBuilder()
.withCommand("/bin/sh", "-c", "psql -U $POSTGRES_USER -d $POSTGRES_DB -c 'SELECT 1'")
.withCommand("/bin/sh", "-c", "psql -U $POSTGRESQL_USER -d $POSTGRESQL_DATABASE -c 'SELECT 1'")
.build()
)
.withInitialDelaySeconds(5)
Expand Down Expand Up @@ -192,7 +192,7 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context)
private List<EnvVar> getEnvVars(Trustify cr) {
return Arrays.asList(
new EnvVarBuilder()
.withName("POSTGRES_USER")
.withName("POSTGRESQL_USER")
.withNewValueFrom()
.withNewSecretKeyRef()
.withName(DBSecret.getSecretName(cr))
Expand All @@ -202,7 +202,7 @@ private List<EnvVar> getEnvVars(Trustify cr) {
.endValueFrom()
.build(),
new EnvVarBuilder()
.withName("POSTGRES_PASSWORD")
.withName("POSTGRESQL_PASSWORD")
.withNewValueFrom()
.withNewSecretKeyRef()
.withName(DBSecret.getSecretName(cr))
Expand All @@ -211,8 +211,9 @@ private List<EnvVar> getEnvVars(Trustify cr) {
.endSecretKeyRef()
.endValueFrom()
.build(),
new EnvVarBuilder()
.withName("POSTGRES_DB")

new EnvVarBuilder()
.withName("POSTGRESQL_DATABASE")
.withValue(Constants.DB_NAME)
.build()
);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quarkus.operator-sdk.crd.apply=true

# Operator config
related.image.api=ghcr.io/trustification/trustd:0.1.0-alpha.10
related.image.db=quay.io/enterprisedb/postgresql:16-ubi9
related.image.db=quay.io/sclorg/postgresql-15-c9s:latest
related.image.pull-policy=Always

# https://quarkus.io/guides/deploying-to-kubernetes#environment-variables-from-keyvalue-pairs
Expand Down
Loading