Installation
Deployment notes
Liveness and readiness endpoints
The /up
endpoint can be used for readiness probes. It always returns a 200
status when Flex's HTTP server is up and reachable.
Availability
Flex is designed to be run as a single instance. When defining your task definition for Flex please ensure that the maximum number of instances does not exceed one.
Reverse proxies + load balancers
Configure HTTP_FORWARDED=true
in conjunction with Jetty authentication or when terminating SSL at a proxy to ensure that redirects maintain the correct connection scheme.
Flex serves all UI traffic at the specifiedPORT
(default: 3000).
This port serves both websockets connections and general HTTP/S traffic.
Most reverse proxies and load balancers work out of the box with Flex, but special consideration is needed when configuring websockets, or when the reverse proxy is responsible for SSL termination.
See the NGINX Websocket Guide for information specific to NGINX and Websockets.
See HTTPS connections for documentation on how to configure HTTPS traffic for Flex.
K8s Ingress configuration
Custom path configuration
This configuration serves Flex at a custom path such as /flex
. This scenario might be useful if your company has a suite of tools that you want to have grouped at a single host.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
nginx.ingress.kubernetes.io/proxy-redirect-from: http://flex.info:80/
nginx.ingress.kubernetes.io/proxy-redirect-to: /flex/
name: flex-ingress
namespace: factorhouse
spec:
rules:
- host: flex.info
http:
paths:
- backend:
serviceName: flex
servicePort: 3000
path: /flex(/|$)(.*)
In this example, Flex will be served at http://flex.info/flex
NGINX configuration
Standard configuration
A standard nginx.conf
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 128;
}
}
Custom path configuration
This configuration serves Flex at a custom path such as /flex
. This scenario might be useful if your company has a suite of tools that you want to have grouped at a single HTTP endpoint.
server {
listen 80;
server_name localhost;
location /prometheus/ {
# configuration options for your prometheus server go here...
}
location /flex/ {
proxy_pass http://localhost:3000/;
rewrite /flex/(.*) /$1 break;
proxy_redirect http://localhost/ /flex/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_cache_bypass $http_upgrade;
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 128;
}
}