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

truststore not loaded when using the provided variables #353

Open
PaulEvans8669 opened this issue May 30, 2024 · 0 comments
Open

truststore not loaded when using the provided variables #353

PaulEvans8669 opened this issue May 30, 2024 · 0 comments

Comments

@PaulEvans8669
Copy link

PaulEvans8669 commented May 30, 2024

Hello,

We are having issues using a custom trustore when providing the configuration via the truststore.type,truststore.password and truststore.truststore fields.

The same issue might exist with the keystore, but was not tested.

Expected Behavior

The truststore should be used by the JVM, allowing outgoing requests to specific external resources.

Current Behavior

Outgoing call to specific external resources are not working as expected).

Possible Solution

Fix the usage of the DEPLOYIT_SERVER_OPTS_EXT environment variable in the application, or use the JAVA_TOOL_OPTIONS env variable.

Steps to Reproduce

  1. Provide the truststore.type,truststore.password and truststore.truststore fields with correct values.
  2. Install the chart
  3. Watch it fail miserably at loading the truststore

Temporary workaround

It is possible to load a custom trustore the the JVM via the JAVA_TOOL_OPTIONS environment variable. Ironically, you can reference the DEPLOYIT_SERVER_OPTS_EXT to populate it.

This variable can be added in the statefulset via the extraEnvVar field as shown below :

spec:
  truststore:
    password: "password"
    truststore:
      valueFrom:
        secretKeyRef:
          name: truststore.pkcs12
          key: truststore.pkcs12
    master:
      extraEnvVars: # Add extra env vars because JVM doesnt load certs
        - name: JAVA_TOOL_OPTIONS
          value: $(DEPLOYIT_SERVER_OPTS_EXT)  
    worker:
      extraEnvVars: # Add extra env vars because JVM doesnt load certs
        - name: JAVA_TOOL_OPTIONS
          value: $(DEPLOYIT_SERVER_OPTS_EXT)  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant