Skip to content

Commit

Permalink
Added service-mesh yamls
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Jan 25, 2024
1 parent 6947e8b commit 86de903
Showing 1 changed file with 140 additions and 0 deletions.
140 changes: 140 additions & 0 deletions manifest/mesh/loxilb-mesh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: loxilb-lb
namespace: kube-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: loxilb-lb
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- watch
- list
- patch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- watch
- list
- patch
- apiGroups:
- ""
resources:
- endpoints
- services
- services/status
verbs:
- get
- watch
- list
- patch
- update
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- watch
- list
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: loxilb-lb
namespace: kube-system
labels:
app: loxilb-app
spec:
selector:
matchLabels:
app: loxilb-app
template:
metadata:
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
priorityClassName: system-node-critical
serviceAccountName: loxilb-lb
containers:
- name: loxilb-lb
image: "ghcr.io/loxilb-io/loxilb:latest"
imagePullPolicy: Always
#command: [ "/root/loxilb-io/loxilb/loxilb", "--egr-hooks", "--blacklist=cni.|veth.|flannel.|cali.|tunl.|vxlan[.]calico", "--ipvs-compat", "--k8s-api=cluster" ]
command: [ "/root/loxilb-io/loxilb/loxilb", "--ipvs-compat"]
ports:
- containerPort: 11111
- containerPort: 179
- containerPort: 50051
securityContext:
privileged: true
capabilities:
add:
- SYS_ADMIN
env:
- name: MY_NODE_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
---
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
- name: loxilb-app-bgp
port: 179
targetPort: 179
protocol: TCP
- name: loxilb-app-gobgp
port: 50051
targetPort: 50051
protocol: TCP

0 comments on commit 86de903

Please sign in to comment.