Skip to content

Commit

Permalink
Do not override java.io.tmpdir, mount work emptyDir volume via operator
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <medgar@redhat.com>
  • Loading branch information
MikeEdgar committed Jan 16, 2025
1 parent 2da4745 commit ffa5ad6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/
EXPOSE 8080
USER 185
ENV AB_JOLOKIA_OFF=""
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Djava.io.tmpdir=/deployments/work"
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"

ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;

import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.jboss.logging.Logger;

import com.github.streamshub.console.config.ConsoleConfig;
Expand All @@ -41,10 +40,6 @@ public class OidcTenantConfigResolver implements TenantConfigResolver {
@Inject
Logger logger;

@Inject
@ConfigProperty(name = "console.work-path")
String workPath;

@Inject
TlsConfigurationRegistry tlsRegistry;

Expand Down Expand Up @@ -86,13 +81,11 @@ Optional<TlsConfiguration> getTlsConfiguration() {
* registry.
*/
void configureTruststore(KeyStore truststore) {
File workDir = new File(workPath);
Path truststorePath;
File truststoreFile;

try {
truststorePath = Files.createTempFile(
workDir.toPath(),
"oidc-provider-trust",
"." + truststore.getType(),
PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rw-------")));
Expand Down
1 change: 0 additions & 1 deletion api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ quarkus.arc.exclude-types=io.apicurio.registry.rest.JacksonDateTimeCustomizer
quarkus.index-dependency.strimzi-api.group-id=io.strimzi
quarkus.index-dependency.strimzi-api.artifact-id=api

console.work-path=${java.io.tmpdir}
console.kafka.admin.request.timeout.ms=10000
console.kafka.admin.default.api.timeout.ms=10000

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
mountPath: /deployments/console-config.yaml
subPath: console-config.yaml
- name: work
mountPath: /deployments/work
mountPath: /tmp
env:
- name: CONSOLE_CONFIG_PATH
value: /deployments/console-config.yaml
Expand Down

0 comments on commit ffa5ad6

Please sign in to comment.