We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 620ebcc commit 1c95f07Copy full SHA for 1c95f07
openshift/templates/nginx-runtime/fetch_env.js
@@ -1,3 +1,11 @@
1
function fetch_config_endpoint(r) {
2
- return process.env.CONFIG_ENDPOINT;
+ // CONFIG_ENDPOINT_HOST and CONFIG_ENDPOINT_PORT are names of the
3
+ // environment variables injected by kubernetes. The actual values
4
+ // of those environment variables contain the IP and port
5
+ var endpoint = "http://";
6
+ endpoint += process.env[process.env.CONFIG_ENDPOINT_HOST]
7
+ endpoint += ":"
8
+ endpoint += process.env[process.env.CONFIG_ENDPOINT_PORT];
9
+
10
+ return endpoint;
11
}
0 commit comments