-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #614 from nik-netlox/main
CICD updated
- Loading branch information
Showing
16 changed files
with
494 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: sctp-lb1 | ||
annotations: | ||
loxilb.io/lbmode: "fullnat" | ||
loxilb.io/liveness: "yes" | ||
spec: | ||
externalTrafficPolicy: Local | ||
loadBalancerClass: loxilb.io/loxilb | ||
selector: | ||
what: sctp-test | ||
ports: | ||
- port: 55003 | ||
protocol: SCTP | ||
targetPort: 9999 | ||
type: LoadBalancer | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: sctp-test | ||
labels: | ||
what: sctp-test | ||
spec: | ||
containers: | ||
- name: sctp-test | ||
image: loxilbio/sctp-darn:latest | ||
imagePullPolicy: Always | ||
#command: ["/bin/sh", "-ec", "while :; do echo '.'; sleep 6 ; done"] | ||
command: ["sctp_darn","-H", "0.0.0.0","-P", "9999", "-l"] | ||
ports: | ||
- containerPort: 9999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
workers = (ENV['WORKERS'] || "2").to_i | ||
#box_name = (ENV['VAGRANT_BOX'] || "ubuntu/focal64") | ||
box_name = (ENV['VAGRANT_BOX'] || "sysnet4admin/Ubuntu-k8s") | ||
box_version = "0.7.1" | ||
Vagrant.configure("2") do |config| | ||
config.vm.box = "#{box_name}" | ||
config.vm.box_version = "#{box_version}" | ||
|
||
if Vagrant.has_plugin?("vagrant-vbguest") | ||
config.vbguest.auto_update = false | ||
end | ||
|
||
config.vm.define "host" do |host| | ||
host.vm.hostname = 'host' | ||
host.vm.network :private_network, ip: "192.168.82.2", :netmask => "255.255.255.0" | ||
host.vm.provision :shell, :path => "host.sh" | ||
host.vm.provider :virtualbox do |vbox| | ||
vbox.customize ["modifyvm", :id, "--memory", 2048] | ||
vbox.customize ["modifyvm", :id, "--cpus", 2] | ||
end | ||
end | ||
|
||
config.vm.define "master" do |master| | ||
master.vm.hostname = 'master' | ||
master.vm.network :private_network, ip: "192.168.82.128", :netmask => "255.255.255.0" | ||
master.vm.provision :shell, :path => "master.sh" | ||
master.vm.provider :virtualbox do |vbox| | ||
vbox.customize ["modifyvm", :id, "--memory", 8192] | ||
vbox.customize ["modifyvm", :id, "--cpus", 8] | ||
vbox.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
vagrant global-status | grep -i virtualbox | cut -f 1 -d ' ' | xargs -L 1 vagrant destroy -f | ||
vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: ext-tcp-lb | ||
spec: | ||
loadBalancerClass: loxilb.io/loxilb | ||
type: LoadBalancer | ||
ports: | ||
- protocol: TCP | ||
port: 8000 | ||
targetPort: 80 | ||
--- | ||
apiVersion: v1 | ||
kind: Endpoints | ||
metadata: | ||
name: ext-tcp-lb | ||
subsets: | ||
- addresses: | ||
- ip: 192.168.82.2 | ||
ports: | ||
- port: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
echo "20.20.20.1 k8s-svc" >> /etc/hosts | ||
apt-get update | ||
apt-get install -y software-properties-common lksctp-tools | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | ||
apt-get update | ||
apt-get install -y docker-ce | ||
docker run --cap-add SYS_ADMIN -dit --net=host --name tcp_ep ghcr.io/loxilb-io/nginx:stable | ||
sudo ip route add 20.20.20.1 via 192.168.82.100 | ||
echo "Host is up" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
clusters: | ||
- cluster: | ||
certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJkakNDQVIyZ0F3SUJBZ0lCQURBS0JnZ3Foa2pPUFFRREFqQWpNU0V3SHdZRFZRUUREQmhyTTNNdGMyVnkKZG1WeUxXTmhRREUzTVRFME16SXpNRGN3SGhjTk1qUXdNekkyTURVMU1UUTNXaGNOTXpRd016STBNRFUxTVRRMwpXakFqTVNFd0h3WURWUVFEREJock0zTXRjMlZ5ZG1WeUxXTmhRREUzTVRFME16SXpNRGN3V1RBVEJnY3Foa2pPClBRSUJCZ2dxaGtqT1BRTUJCd05DQUFTK296V2p3aEJRcHZrSDVCaXJFSVdnRnhNRGR0OFZsaXZLM1Y5Ym56T1EKQmdnUXVkQWxlQ0FYUmk4RjdhWU9ISXUwaGZPbkthRi84cnJTZnlvdWJrSkdvMEl3UURBT0JnTlZIUThCQWY4RQpCQU1DQXFRd0R3WURWUjBUQVFIL0JBVXdBd0VCL3pBZEJnTlZIUTRFRmdRVXYyT0xtZFo5TDFublNTTjExbUhCCmxQWmxjbGt3Q2dZSUtvWkl6ajBFQXdJRFJ3QXdSQUlnU05IbXNMakh5bkdMRTRFY04yVjVtZFNJaWRNdHNVUTcKSHIwbi9BdUg1NUVDSUVjSGExY3c1RGdOeEZvaDRCWWpQRGdycDIwam9DTVZ6d2ZXRGNzdVhLTUQKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= | ||
server: https://192.168.82.128:6443 | ||
name: default | ||
contexts: | ||
- context: | ||
cluster: default | ||
user: default | ||
name: default | ||
current-context: default | ||
kind: Config | ||
preferences: {} | ||
users: | ||
- name: default | ||
user: | ||
client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJrakNDQVRlZ0F3SUJBZ0lJV3BvZGdxci9Bb1V3Q2dZSUtvWkl6ajBFQXdJd0l6RWhNQjhHQTFVRUF3d1kKYXpOekxXTnNhV1Z1ZEMxallVQXhOekV4TkRNeU16QTNNQjRYRFRJME1ETXlOakExTlRFME4xb1hEVEkxTURNeQpOakExTlRFME4xb3dNREVYTUJVR0ExVUVDaE1P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CZ05WSFE0RUZnUVVrMndpTTBoUllZRERTSUgvcEtiQwpOVFM1RzNzd0NnWUlLb1pJemowRUF3SURSd0F3UkFJZ0djeTQ3dmhJT3lqdHgvMjkva2VTV2p5OFUrd3pmN1ROCkhraWhER21aS3pBQ0lGdEp0YnlGTmU0enRrSHZQRDdBKzcrUDYwaWZ3eGhDUGJlQW81Ny9UYXJnCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K | ||
client-key-data: LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUxkOVk0WUl3bjhyZzZ4NFAxb1ZZWE83dEZqRm8ydGRqZGp2bVhSMkhlL0VvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFbEpmWVR1bVd4L2NON2NaZTlpdEV4cGdtSnQvaU9FMWRjaTFlWnJUc3hoYTViL1REczlRMQpiWVNna2hFbTRhM1M2ZjRaK2VTaUliQ0dlZkJOZWtqbGhRPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: kube-loxilb | ||
namespace: kube-system | ||
--- | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: kube-loxilb | ||
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 | ||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: kube-loxilb | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kube-loxilb | ||
subjects: | ||
- kind: ServiceAccount | ||
name: kube-loxilb | ||
namespace: kube-system | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kube-loxilb | ||
namespace: kube-system | ||
labels: | ||
app: loxilb | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: loxilb | ||
template: | ||
metadata: | ||
labels: | ||
app: loxilb | ||
spec: | ||
hostNetwork: true | ||
tolerations: | ||
- effect: NoSchedule | ||
operator: Exists | ||
# Mark the pod as a critical add-on for rescheduling. | ||
- key: CriticalAddonsOnly | ||
operator: Exists | ||
- effect: NoExecute | ||
operator: Exists | ||
priorityClassName: system-node-critical | ||
serviceAccountName: kube-loxilb | ||
terminationGracePeriodSeconds: 0 | ||
containers: | ||
- name: kube-loxilb | ||
image: ghcr.io/loxilb-io/kube-loxilb:latest | ||
imagePullPolicy: Always | ||
command: | ||
- /bin/kube-loxilb | ||
args: | ||
- --loxiURL=http://172.17.0.2:11111 | ||
- --externalCIDR=20.20.20.1/32 | ||
#- --externalSecondaryCIDRs=124.124.124.1/24,125.125.125.1/24 | ||
#- --monitor | ||
#- --setBGP=64511 | ||
#- --extBGPPeers=50.50.50.1:65101,51.51.51.1:65102 | ||
#- --setRoles=0.0.0.0 | ||
#- --monitor | ||
#- --setBGP | ||
- --setLBMode=2 | ||
#- --config=/opt/loxilb/agent/kube-loxilb.conf | ||
resources: | ||
requests: | ||
cpu: "100m" | ||
memory: "50Mi" | ||
limits: | ||
cpu: "100m" | ||
memory: "50Mi" | ||
securityContext: | ||
privileged: true | ||
capabilities: | ||
add: ["NET_ADMIN", "NET_RAW"] |
Oops, something went wrong.