-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathloxilb-service-proxy-non-privileged.yml
105 lines (105 loc) · 2.36 KB
/
loxilb-service-proxy-non-privileged.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: loxilb-lb
namespace: kube-system
spec:
selector:
matchLabels:
app: loxilb-app
template:
metadata:
name: loxilb-lb
labels:
app: loxilb-app
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
tolerations:
- key: "node-role.kubernetes.io/master"
operator: Exists
- key: "node-role.kubernetes.io/control-plane"
operator: Exists
#affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: "node-role.kubernetes.io/master"
# operator: Exists
# - key: "node-role.kubernetes.io/control-plane"
# operator: Exists
volumes:
- name: hllb
hostPath:
path: /etc/loxilb
type: DirectoryOrCreate
containers:
- name: loxilb-app
image: "ghcr.io/loxilb-io/loxilb:latest"
imagePullPolicy: Always
command:
- /root/loxilb-io/loxilb/loxilb
args:
- --egr-hooks
- --ipvs-compat
- --blacklist=eth0
volumeMounts:
- name: hllb
mountPath: /etc/loxilb
ports:
- containerPort: 11111
- containerPort: 179
securityContext:
#privileged: true
capabilities:
add:
- SYS_ADMIN
- DAC_OVERRIDE
- FOWNER
- SETGID
- SETUID
- IPC_LOCK
- SYS_MODULE
- SYS_ADMIN
- SYS_RESOURCE
- CHOWN
- KILL
- NET_ADMIN
- NET_RAW
- BPF
---
apiVersion: v1
kind: Service
metadata:
name: loxilb-egress-service
namespace: kube-system
annotations:
loxilb.io/egress: "yes"
loxilb.io/probetype: "none"
spec:
externalTrafficPolicy: Local
type: LoadBalancer
loadBalancerClass: loxilb.io/loxilb
selector:
app: loxilb-app
ports:
- name: loxilb-egress
port: 9999
targetPort: 9999
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: loxilb-lb-service
namespace: kube-system
spec:
clusterIP: None
selector:
app: loxilb-app
ports:
- name: loxilb-app
port: 11111
targetPort: 11111
protocol: TCP