mirror of
https://github.com/sadoyan/aralez.git
synced 2026-10-23 06:01:35 +08:00
Config files update, cleanup
This commit is contained in:
@@ -1,9 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Secret
|
|
||||||
metadata:
|
|
||||||
name: aralez-tls
|
|
||||||
type: kubernetes.io/tls
|
|
||||||
data:
|
|
||||||
tls.crt: <base64-cert>
|
|
||||||
tls.key: <base64-key>
|
|
||||||
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: aralez
|
|
||||||
spec:
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: aralez
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: aralez
|
|
||||||
spec:
|
|
||||||
serviceAccountName: aralez-sa
|
|
||||||
containers:
|
|
||||||
- name: aralez
|
|
||||||
image: sadoyan/aralez:latest
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
- containerPort: 443
|
|
||||||
volumeMounts:
|
|
||||||
- name: main-config
|
|
||||||
mountPath: /etc/aralez/main.yaml
|
|
||||||
subPath: main.yaml
|
|
||||||
readOnly: true
|
|
||||||
- name: upstreams-config
|
|
||||||
mountPath: /etc/aralez/upstreams.yml
|
|
||||||
subPath: upstreams.yml
|
|
||||||
readOnly: true
|
|
||||||
- name: tls-certs
|
|
||||||
mountPath: /etc/aralez/certificates
|
|
||||||
readOnly: true
|
|
||||||
volumes:
|
|
||||||
- name: main-config
|
|
||||||
configMap:
|
|
||||||
name: aralez-main-config
|
|
||||||
- name: upstreams-config
|
|
||||||
configMap:
|
|
||||||
name: aralez-upstreams-config
|
|
||||||
- name: tls-certs
|
|
||||||
secret:
|
|
||||||
secretName: aralez-tls
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
threads: 12
|
|
||||||
daemon: false
|
|
||||||
upstream_keepalive_pool_size: 500
|
|
||||||
pid_file: /tmp/aralez.pid
|
|
||||||
error_log: /tmp/aralez_err.log
|
|
||||||
upgrade_sock: /tmp/aralez.sock
|
|
||||||
config_api_enabled: false
|
|
||||||
config_address: 127.0.0.1:3000
|
|
||||||
proxy_address_http: 0.0.0.0:80
|
|
||||||
proxy_address_tls: 0.0.0.0:443
|
|
||||||
proxy_configs: /etc/aralez
|
|
||||||
proxy_tls_grade: high
|
|
||||||
upstreams_conf: /etc/aralez/upstreams.yml
|
|
||||||
log_level: info
|
|
||||||
hc_method: HEAD
|
|
||||||
hc_interval: 2
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# The file under watch and hot reload, changes are applied immediately, no need to restart or reload.
|
|
||||||
provider: "kubernetes" # "file" "consul" "kubernetes"
|
|
||||||
sticky_sessions: 172000
|
|
||||||
to_https: false
|
|
||||||
rate_limit: 500000
|
|
||||||
x4xx_limit: 100000
|
|
||||||
server_headers:
|
|
||||||
- "X-Forwarded-Proto:https"
|
|
||||||
- "X-Forwarded-Port:443"
|
|
||||||
client_headers:
|
|
||||||
- "X-Global-Client:Yooooooo"
|
|
||||||
kubernetes:
|
|
||||||
servers:
|
|
||||||
- "127.0.0.1:6443" # Gets KUBERNETES_SERVICE_HOST : KUBERNETES_SERVICE_PORT_HTTPS env variables.
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: svc-nginx
|
|
||||||
labels:
|
|
||||||
app: svc-nginx
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: svc-nginx
|
|
||||||
replicas: 3
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: svc-nginx
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: svc-nginx
|
|
||||||
image: nginx:latest
|
|
||||||
ports:
|
|
||||||
- containerPort: 80
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: wss-service-v2
|
|
||||||
namespace: default
|
|
||||||
annotations:
|
|
||||||
# These custom annotations are parsed by Aralez
|
|
||||||
aralez.rs/rate_limit: "50"
|
|
||||||
aralez.rs/x4xx_limit: "10"
|
|
||||||
aralez.rs/client_headers: '["X-Some-Client:Some Custom Header", "X-Example-Client:An Example Header"]'
|
|
||||||
aralez.rs/server_headers: '["X-Some-Server:Some Custom Header", "X-Example-Server:An Example Header"]'
|
|
||||||
spec:
|
|
||||||
ingressClassName: aralez # Matches the IngressClass metadata
|
|
||||||
rules:
|
|
||||||
- host: wss-service-v2.blabla.com
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /ws
|
|
||||||
pathType: Prefix
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: svc-nginx
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: svc-nginx
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
app: svc-nginx
|
|
||||||
ports:
|
|
||||||
- protocol: TCP
|
|
||||||
port: 80
|
|
||||||
targetPort: 80
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
provider: "kubernetes"
|
||||||
|
to_https: false
|
||||||
|
sticky_sessions: 86000
|
||||||
|
rate_limit: 100
|
||||||
|
x4xx_limit: 100
|
||||||
|
headers:
|
||||||
|
- "Access-Control-Allow-Origin:*"
|
||||||
|
- "Access-Control-Allow-Methods:POST, GET, OPTIONS"
|
||||||
|
- "Access-Control-Max-Age:86400"
|
||||||
|
- "Strict-Transport-Security:max-age=31536000; includeSubDomains; preload"
|
||||||
|
kubernetes:
|
||||||
|
services:
|
||||||
|
- hostname: "svc-nginx"
|
||||||
|
upstream: "svc-nginx"
|
||||||
|
path: "/"
|
||||||
|
tokenpath: "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
||||||
@@ -41,16 +41,12 @@ pub struct KubeEndpoint {
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct KubeConditions {
|
pub struct KubeConditions {
|
||||||
pub ready: Option<bool>,
|
pub ready: Option<bool>,
|
||||||
pub serving: Option<bool>,
|
|
||||||
pub terminating: Option<bool>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, serde::Deserialize)]
|
#[derive(Debug, serde::Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct KubePort {
|
pub struct KubePort {
|
||||||
pub name: Option<String>,
|
|
||||||
pub port: Option<u16>,
|
pub port: Option<u16>,
|
||||||
pub protocol: Option<String>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct KubernetesDiscovery;
|
pub struct KubernetesDiscovery;
|
||||||
|
|||||||
Reference in New Issue
Block a user