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

[integration-k8s-kind#325] Add Calico patches for VPP Forwarder #3305

Closed
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
7 changes: 5 additions & 2 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ kubectl create ns nsm-system
```

2. Apply NSM resources for basic tests:

```bash
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic?ref=6b88da39e40e64d665add469616315a9c289ecdb
if [[ "${CALICO}" == "on" ]]; then # calico
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic/calico?ref=6b88da39e40e64d665add469616315a9c289ecdb
else
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic/base?ref=6b88da39e40e64d665add469616315a9c289ecdb
fi
```

## Cleanup
Expand Down
11 changes: 11 additions & 0 deletions examples/basic/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: nsm-system

bases:
- ../../../apps/nsmgr
- ../../../apps/forwarder-vpp
- ../../../apps/registry-k8s
- ../../../apps/admission-webhook-k8s
24 changes: 24 additions & 0 deletions examples/basic/calico/calico-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: forwarder-vpp
spec:
template:
spec:
hostPID: true
containers:
- name: forwarder-vpp
env:
- name: NSM_VPP_API_SOCKET
value: /var/run/vpp/vpp-api.sock
- name: NSM_VPP_INIT
value: NONE
volumeMounts:
- name: vpp
mountPath: /var/run/vpp
volumes:
- name: vpp
hostPath:
path: /var/run/vpp
type: Directory
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ kind: Kustomization
namespace: nsm-system

bases:
- ../../apps/nsmgr
- ../../apps/forwarder-vpp
- ../../apps/registry-k8s
- ../base

patchesStrategicMerge:
- forwarder-vpp.yaml
- calico-patch.yaml
11 changes: 0 additions & 11 deletions examples/basic/kustomization.yaml

This file was deleted.

8 changes: 6 additions & 2 deletions examples/multiforwarder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
kubectl create ns nsm-system
```

Apply NSM resources for basic tests:
2. Apply NSM resources for multiforwarder tests:
```bash
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/multiforwarder?ref=6b88da39e40e64d665add469616315a9c289ecdb
if [[ "${CALICO}" == "on" ]]; then # calico
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/multiforwarder/calico?ref=6b88da39e40e64d665add469616315a9c289ecdb
else
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/multiforwarder/base?ref=6b88da39e40e64d665add469616315a9c289ecdb
fi
```

## Cleanup
Expand Down
11 changes: 11 additions & 0 deletions examples/multiforwarder/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: nsm-system

bases:
- ../../../apps/nsmgr
- ../../../apps/forwarder-vpp
- ../../../apps/forwarder-sriov
- ../../../apps/registry-k8s
24 changes: 24 additions & 0 deletions examples/multiforwarder/calico/calico-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: forwarder-vpp
spec:
template:
spec:
hostPID: true
containers:
- name: forwarder-vpp
env:
- name: NSM_VPP_API_SOCKET
value: /var/run/vpp/vpp-api.sock
- name: NSM_VPP_INIT
value: NONE
volumeMounts:
- name: vpp
mountPath: /var/run/vpp
volumes:
- name: vpp
hostPath:
path: /var/run/vpp
type: Directory
11 changes: 11 additions & 0 deletions examples/multiforwarder/calico/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: nsm-system

bases:
- ../base

patchesStrategicMerge:
- calico-patch.yaml
11 changes: 0 additions & 11 deletions examples/multiforwarder/kustomization.yaml

This file was deleted.

8 changes: 6 additions & 2 deletions examples/sriov/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
kubectl create ns nsm-system
```

Apply NSM resources for basic tests:
2. Apply NSM resources for SR-IOV tests:
```bash
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/sriov?ref=6b88da39e40e64d665add469616315a9c289ecdb
if [[ "${CALICO}" == on ]]; then # calico
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/sriov/calico?ref=6b88da39e40e64d665add469616315a9c289ecdb
else
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/sriov/base?ref=6b88da39e40e64d665add469616315a9c289ecdb
fi
```

## Cleanup
Expand Down
13 changes: 13 additions & 0 deletions examples/sriov/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: nsm-system

bases:
- ../../../apps/nsmgr
- ../../../apps/forwarder-vpp
- ../../../apps/registry-k8s

patchesStrategicMerge:
- sriov-patch.yaml
File renamed without changes.
24 changes: 24 additions & 0 deletions examples/sriov/calico/calico-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: forwarder-vpp
spec:
template:
spec:
hostPID: true
containers:
- name: forwarder-vpp
env:
- name: NSM_VPP_API_SOCKET
value: /var/run/vpp/vpp-api.sock
- name: NSM_VPP_INIT
value: NONE
volumeMounts:
- name: vpp
mountPath: /var/run/vpp
volumes:
- name: vpp
hostPath:
path: /var/run/vpp
type: Directory
11 changes: 11 additions & 0 deletions examples/sriov/calico/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: nsm-system

bases:
- ../base

patchesStrategicMerge:
- calico-patch.yaml