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

Do not override java.io.tmpdir, mount work emptyDir volume at /tmp #1372

Merged
merged 1 commit into from
Jan 17, 2025
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
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