Skip to content

Commit 9493106

Browse files
committed
Add reference page about webproxy
1 parent eb364e7 commit 9493106

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
tags: [workloads, reference, webproxy]
3+
conditional: [tenant, nav]
4+
---
5+
6+
# Webproxy
7+
8+
In Navs on-premises environments, workloads that need to make external HTTP(S) requests must set `webproxy` to `true` in their [application spec](../../workloads/application/reference/application-spec.md#webproxy).
9+
10+
When `webproxy` is enabled, the platform provides a set of environment variables to configure the proxy settings for your workload.
11+
12+
## Linux
13+
Most Linux applications should auto-detect these settings from the `$HTTP_PROXY`, `$HTTPS_PROXY` and `$NO_PROXY` environment variables (and their lowercase counterparts).
14+
15+
## Java
16+
17+
Java applications can start the JVM using parameters from the `$JAVA_PROXY_OPTIONS` environment variable.
18+
To do this, you either need a launcher script that copies the value from `JAVA_PROXY_OPTIONS` to `JDK_JAVA_OPTIONS`,
19+
or you can set the `JDK_JAVA_OPTIONS` environment variable directly in your [application spec](../application/reference/application-spec.md#env).:
20+
21+
```
22+
env:
23+
- name: JDK_JAVA_OPTIONS
24+
value: $(JAVA_PROXY_OPTIONS)
25+
```
26+
27+
This takes advantage of [Kubernetes Dependent Environment Variables](https://kubernetes.io/docs/tasks/inject-data-application/define-interdependent-environment-variables/), which allows you to use the value of one environment variable in another.
28+
29+
Since environment variables set by the platform are defined before the application variables, you can refer to the `JAVA_PROXY_OPTIONS` variable when setting `JDK_JAVA_OPTIONS`.

0 commit comments

Comments
 (0)