Skip to content

Commit

Permalink
Merge pull request #606 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
cicd: fixes for localvip sock rewrite
  • Loading branch information
UltraInstinct14 committed Mar 27, 2024
2 parents 428cee5 + 676573e commit 4a2d2a9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tcp-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ jobs:
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplb-local/
./config.sh
./validation.sh
./rmconfig.sh
cd -
46 changes: 44 additions & 2 deletions cicd/k3s-incluster/loxilb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
app: loxilb-app
spec:
hostNetwork: true
hostPID: true
dnsPolicy: ClusterFirstWithHostNet
tolerations:
- key: "node-role.kubernetes.io/master"
Expand All @@ -29,20 +30,61 @@ spec:
operator: Exists
- key: "node-role.kubernetes.io/control-plane"
operator: Exists
initContainers:
- name: mkllb-cgroup
command:
- sh
- -ec
- |
ls /usr/local/sbin/mkllb_cgroup && chmod 777 /usr/local/sbin/mkllb_cgroup;
cp -f /usr/local/sbin/mkllb_cgroup /hbin/mkllb_cgroup;
nsenter --cgroup=/hproc/1/ns/cgroup --mount=/hproc/1/ns/mnt /bin/mkllb_cgroup;
echo done;
rm /hbin/mkllb_cgroup;
image: "ghcr.io/loxilb-io/loxilb:latest"
imagePullPolicy: Always
volumeMounts:
- name: hproc
mountPath: /hproc
- name: hbin
mountPath: /hbin
terminationMessagePolicy: FallbackToLogsOnError
securityContext:
privileged: true
capabilities:
add:
- SYS_ADMIN
containers:
- name: loxilb-app
image: "ghcr.io/loxilb-io/loxilb:latest"
imagePullPolicy: Always
command: [ "/root/loxilb-io/loxilb/loxilb", "--egr-hooks", "--blacklist=cni[0-9a-z]|veth.|flannel.|cali.|tunl.|vxlan[.]calico" ]
imagePullPolicy: IfNotPresent
command: [ "/root/loxilb-io/loxilb/loxilb", "--egr-hooks", "--blacklist=cni[0-9a-z]|veth.|flannel.|cali.|tunl.|vxlan[.]calico", "--localvip" ]
ports:
- containerPort: 11111
- containerPort: 179
- containerPort: 50051
volumeMounts:
- name: llb-cgroup
mountPath: /opt/loxilb/cgroup
securityContext:
privileged: true
runAsUser: 0
capabilities:
add:
- SYS_ADMIN
volumes:
- name: hproc
hostPath:
path: /proc
type: Directory
- name: hbin
hostPath:
path: /bin
type: Directory
- name: llb-cgroup
hostPath:
path: /opt/loxilb/cgroup
type: DirectoryOrCreate
---
apiVersion: v1
kind: Service
Expand Down

0 comments on commit 4a2d2a9

Please sign in to comment.