Skip to content

Commit

Permalink
Change container images and fix ci workflow (#2)
Browse files Browse the repository at this point in the history
* Change container images and fix ci workflow

* Fix DB envs
  • Loading branch information
carlosthe19916 authored Jul 3, 2024
1 parent 92ac5f7 commit 392de14
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
run: |
version="${{ inputs.version }}"
co_version="${version:0}"
operator_path="./operators/konveyor-operator/${co_version}"
operator_path="./operators/trustify-operator/${co_version}"
mkdir -p "${operator_path}"
docker cp extract:/metadata "${operator_path}"
docker cp extract:/manifests "${operator_path}"
Expand Down
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 $POSTGRESQL_USER -d $POSTGRESQL_DATABASE -c 'SELECT 1'")
.withCommand("/bin/sh", "-c", "psql -U $POSTGRES_USER -d $POSTGRES_DB -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 $POSTGRESQL_USER -d $POSTGRESQL_DATABASE -c 'SELECT 1'")
.withCommand("/bin/sh", "-c", "psql -U $POSTGRES_USER -d $POSTGRES_DB -c 'SELECT 1'")
.build()
)
.withInitialDelaySeconds(5)
Expand Down Expand Up @@ -192,15 +192,7 @@ private DeploymentSpec getDeploymentSpec(Trustify cr, Context<Trustify> context)
private List<EnvVar> getEnvVars(Trustify cr) {
return Arrays.asList(
new EnvVarBuilder()
.withName("POSTGRESQL_MAX_CONNECTIONS")
.withValue("200")
.build(),
new EnvVarBuilder()
.withName("POSTGRESQL_MAX_PREPARED_TRANSACTIONS")
.withValue("200")
.build(),
new EnvVarBuilder()
.withName("POSTGRESQL_USER")
.withName("POSTGRES_USER")
.withNewValueFrom()
.withNewSecretKeyRef()
.withName(DBSecret.getSecretName(cr))
Expand All @@ -210,7 +202,7 @@ private List<EnvVar> getEnvVars(Trustify cr) {
.endValueFrom()
.build(),
new EnvVarBuilder()
.withName("POSTGRESQL_PASSWORD")
.withName("POSTGRES_PASSWORD")
.withNewValueFrom()
.withNewSecretKeyRef()
.withName(DBSecret.getSecretName(cr))
Expand All @@ -220,7 +212,7 @@ private List<EnvVar> getEnvVars(Trustify cr) {
.endValueFrom()
.build(),
new EnvVarBuilder()
.withName("POSTGRESQL_DATABASE")
.withName("POSTGRES_DB")
.withValue(Constants.DB_NAME)
.build()
);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ quarkus.container-image.tag=v${quarkus.application.version}
quarkus.operator-sdk.crd.apply=true

# Operator config
related.image.api=ghcr.io/trustification/trustd:0.1.0-alpha.6
related.image.db=registry.access.redhat.com/rhscl/postgresql-10-rhel7:1
related.image.api=ghcr.io/trustification/trustd:0.1.0-alpha.9
related.image.db=quay.io/enterprisedb/postgresql:16-ubi9
related.image.pull-policy=Always

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

0 comments on commit 392de14

Please sign in to comment.