Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cicd: fixes for localvip sock rewrite #606

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading