Skip to content

Commit

Permalink
added calico patches
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Avramenko <[email protected]>
  • Loading branch information
Mixaster995 committed Dec 21, 2021
1 parent 9643412 commit e2dfaaa
Show file tree
Hide file tree
Showing 16 changed files with 149 additions and 31 deletions.
2 changes: 1 addition & 1 deletion calico/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ resources:
- https://raw.githubusercontent.com/projectcalico/vpp-dataplane/v0.17.0-calicov3.20.2/yaml/generated/calico-vpp-nohuge.yaml

patchesStrategicMerge:
- patch.yaml
- patch.yaml
6 changes: 5 additions & 1 deletion examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ 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=bbe46ecf104280e96ae3a32d4757149e792f0d11
if [[ "${CALICO}" == "on" ]]; then
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic/calico?ref=bbe46ecf104280e96ae3a32d4757149e792f0d11
else
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/basic/base?ref=bbe46ecf104280e96ae3a32d4757149e792f0d11
fi
```

3. Wait for admission-webhook-k8s:
Expand Down
12 changes: 12 additions & 0 deletions examples/basic/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

---
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.

6 changes: 5 additions & 1 deletion examples/multiforwarder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ kubectl create ns nsm-system

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

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

namespace: nsm-system

bases:
- ../../../apps/nsmgr
- ../../../apps/forwarder-vpp
- ../../../apps/forwarder-sriov
- ../../../apps/registry-k8s
- ../../../apps/admission-webhook-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
12 changes: 0 additions & 12 deletions examples/multiforwarder/kustomization.yaml

This file was deleted.

6 changes: 5 additions & 1 deletion examples/sriov/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ kubectl create ns nsm-system

Apply NSM resources for basic tests:
```bash
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/sriov?ref=bbe46ecf104280e96ae3a32d4757149e792f0d11
if [[ "${CALICO}" == on ]]; then # calico
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/sriov/calico?ref=bbe46ecf104280e96ae3a32d4757149e792f0d11
else
kubectl apply -k https://github.com/networkservicemesh/deployments-k8s/examples/sriov/base?ref=bbe46ecf104280e96ae3a32d4757149e792f0d11
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

0 comments on commit e2dfaaa

Please sign in to comment.