127 lines
2.8 KiB
YAML
127 lines
2.8 KiB
YAML
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: cdi-uploadproxy
|
|
namespace: cdi
|
|
spec:
|
|
ingressClassName: haproxy
|
|
rules:
|
|
- host: cdi-uploadproxy.strudelline.net
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: cdi-uploadproxy-untls-shim
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: "cdi-uploadproxy-untls-shim"
|
|
namespace: "cdi"
|
|
data:
|
|
haproxy.cfg: |
|
|
global
|
|
log stdout format raw local0
|
|
stats timeout 30s
|
|
user haproxy
|
|
group haproxy
|
|
|
|
defaults
|
|
log global
|
|
mode http
|
|
option httplog
|
|
option dontlognull
|
|
balance source
|
|
timeout connect 5000
|
|
timeout client 50000
|
|
timeout server 50000
|
|
http-reuse never
|
|
option disable-h2-upgrade
|
|
|
|
frontend http80
|
|
bind *:80
|
|
http-request capture req.hdr(Host) len 255
|
|
default_backend httpnodes
|
|
|
|
backend httpnodes
|
|
option forwardfor
|
|
http-request add-header x-forwarded-proto https
|
|
server s1 cdi-uploadproxy.cdi.svc:443 ssl verify none check
|
|
|
|
frontend stats
|
|
mode http
|
|
option httplog
|
|
bind *:8404
|
|
http-request capture req.hdr(X-Forwarded-For) len 64
|
|
http-request capture req.hdr(Host) len 255
|
|
stats enable
|
|
stats uri /
|
|
stats refresh 10s
|
|
stats admin if LOCALHOST
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "cdi-uploadproxy-untls-shim"
|
|
namespace: "cdi"
|
|
annotations:
|
|
"reloader.stakater.com/auto": "true"
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: "cdi-uploadproxy-untls-shim"
|
|
strategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "cdi-uploadproxy-untls-shim"
|
|
spec:
|
|
containers:
|
|
- image: haproxy:latest
|
|
name: haproxy
|
|
volumeMounts:
|
|
- mountPath: /usr/local/etc/haproxy/haproxy.cfg
|
|
name: config
|
|
subPath: haproxy.cfg
|
|
ports:
|
|
- containerPort: 80
|
|
name: http
|
|
protocol: TCP
|
|
- containerPort: 8404
|
|
name: stats
|
|
protocol: TCP
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: "cdi-uploadproxy-untls-shim"
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: "cdi-uploadproxy-untls-shim"
|
|
namespace: "cdi"
|
|
spec:
|
|
ipFamilies:
|
|
- IPv4
|
|
ipFamilyPolicy: SingleStack
|
|
ports:
|
|
- name: http-80
|
|
port: 80
|
|
protocol: TCP
|
|
targetPort: http
|
|
- name: https-8404
|
|
port: 8404
|
|
protocol: TCP
|
|
targetPort: stats
|
|
selector:
|
|
app: "cdi-uploadproxy-untls-shim"
|
|
type: ClusterIP
|