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

yamls: transition to components #614

Merged
merged 3 commits into from
Oct 9, 2023
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
1 change: 0 additions & 1 deletion yaml/components/ipsec/README.md → docs/Ipsec.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ kubectl kustomize . > calico-vpp-ipsec.yaml
kubectl apply -f calico-vpp-ipsec.yaml
```


You will also need to create the secret for the PSK out of band

```bash
Expand Down
4 changes: 2 additions & 2 deletions test/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ test_apply ()
k_create_namespace $NAME

export VPP_DATAPLANE_DIRECTORY=$VPP_DATAPLANE_DIRECTORY
sed -e "s/_NODE_1_/${NODES[0]}/" -e "s/_NODE_2_/${NODES[1]}/" $YAML_FILE | \
cat $YAML_FILE | \
envsubst | \
kubectl apply -f -
}
Expand All @@ -128,7 +128,7 @@ test_delete ()
echo "${YAML_FILE} doesnt exist"
exit 1
fi
sed -e "s/_NODE_1_/${NODES[0]}/" -e "s/_NODE_2_/${NODES[1]}/" $YAML_FILE | \
cat $YAML_FILE | \
kubectl delete -f -
k_delete_namespace $1
}
Expand Down
2 changes: 0 additions & 2 deletions test/yaml/envoy/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ spec:
name: envoyyaml
- mountPath: /etc/vpp/vcl.conf
name: vclconf
nodeName: _NODE_1_
volumes:
- name: hostuser
hostPath:
Expand Down Expand Up @@ -68,7 +67,6 @@ spec:
name: hostuser
- mountPath: /etc/envoy/envoy.yaml
name: envoyyaml
nodeName: _NODE_1_
volumes:
- name: hostuser
hostPath:
Expand Down
4 changes: 0 additions & 4 deletions test/yaml/iperf/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 3
nodeName: _NODE_1_
---
apiVersion: apps/v1
kind: ReplicaSet
Expand Down Expand Up @@ -61,7 +60,6 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 3
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -193,7 +191,6 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_2_
---
apiVersion: v1
kind: Pod
Expand All @@ -208,4 +205,3 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_1_
2 changes: 0 additions & 2 deletions test/yaml/iperf/test_single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -54,4 +53,3 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_2_
4 changes: 0 additions & 4 deletions test/yaml/iperf/test_v4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 3
nodeName: _NODE_1_
---
apiVersion: apps/v1
kind: ReplicaSet
Expand Down Expand Up @@ -61,7 +60,6 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 3
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -150,7 +148,6 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_2_
---
apiVersion: v1
kind: Pod
Expand All @@ -165,4 +162,3 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_1_
4 changes: 0 additions & 4 deletions test/yaml/iperf/test_v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 3
nodeName: _NODE_1_
---
apiVersion: apps/v1
kind: ReplicaSet
Expand Down Expand Up @@ -61,7 +60,6 @@ spec:
initialDelaySeconds: 3
periodSeconds: 5
timeoutSeconds: 3
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -151,7 +149,6 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_2_
---
apiVersion: v1
kind: Pod
Expand All @@ -166,4 +163,3 @@ spec:
ports:
- containerPort: 5001
- containerPort: 5003
nodeName: _NODE_1_
4 changes: 0 additions & 4 deletions test/yaml/iperf3-vcl/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5201
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down Expand Up @@ -52,7 +51,6 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5201
nodeName: _NODE_2_
---
apiVersion: v1
kind: Pod
Expand All @@ -68,5 +66,3 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5201
nodeName: _NODE_1_

2 changes: 0 additions & 2 deletions test/yaml/iperf3/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5201
nodeName: _NODE_1_

---
apiVersion: v1
Expand Down Expand Up @@ -67,4 +66,3 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 5201
nodeName: _NODE_2_
1 change: 0 additions & 1 deletion test/yaml/metallb/test_metallb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ metadata:
subsets:
- addresses:
- ip: 10.10.186.88
nodeName: node1
ports:
- port: 9376
---
Expand Down
1 change: 0 additions & 1 deletion test/yaml/nginx/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down
1 change: 0 additions & 1 deletion test/yaml/scalepods/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
nodeName: _NODE_1_
---
apiVersion: v1
kind: Service
Expand Down
2 changes: 0 additions & 2 deletions test/yaml/simple-vcl/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ spec:
- name: simple-client
image: calicovpp/test-simple-vcl
imagePullPolicy: IfNotPresent
nodeName: _NODE_2_
---
apiVersion: v1
kind: Pod
Expand All @@ -25,4 +24,3 @@ spec:
- name: simple-client
image: calicovpp/test-simple-vcl
imagePullPolicy: IfNotPresent
nodeName: _NODE_1_
1 change: 0 additions & 1 deletion test/yaml/testpmd/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ spec:
volumeMounts:
- mountPath: /hugepages
name: hugepage
nodeName: _NODE_1_
volumes:
- name: hugepage
emptyDir:
Expand Down
1 change: 0 additions & 1 deletion test/yaml/trex/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ spec:
volumeMounts:
- mountPath: /hugepages
name: hugepage
nodeName: _NODE_2_
volumes:
- name: hugepage
emptyDir:
Expand Down
1 change: 0 additions & 1 deletion test/yaml/wrk/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ spec:
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
nodeName: _NODE_2_
---
28 changes: 19 additions & 9 deletions yaml/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@

TAG ?= prerelease
CALICO_TAG ?= master
TAG ?= v3.26.0
CALICO_TAG ?= v3.26.0

.PHONY: build
build: clean
@kubectl kustomize overlays/multinet > generated/calico-vpp-multinet.yaml
@kubectl kustomize overlays/default-huge > generated/calico-vpp.yaml
@kubectl kustomize base > generated/calico-vpp-nohuge.yaml
@kubectl kustomize overlays/dpdk > generated/calico-vpp-dpdk.yaml
@kubectl kustomize overlays/eks > generated/calico-vpp-eks.yaml
@kubectl kustomize overlays/eks-dpdk > generated/calico-vpp-eks-dpdk.yaml
@kubectl kustomize overlays/kind > generated/calico-vpp-kind.yaml
kubectl kustomize base > generated/calico-vpp-nohuge.yaml
kubectl kustomize overlays/default-huge > generated/calico-vpp.yaml
kubectl kustomize overlays/default-multinet > generated/calico-vpp-multinet.yaml
kubectl kustomize overlays/dpdk > generated/calico-vpp-dpdk.yaml
kubectl kustomize overlays/eks > generated/calico-vpp-eks.yaml
kubectl kustomize overlays/eks-dpdk > generated/calico-vpp-eks-dpdk.yaml
kubectl kustomize overlays/kind > generated/calico-vpp-kind.yaml
kubectl kustomize overlays/kind-multinet > generated/calico-vpp-kind-multinet.yaml
# Do not export the test-* overlays, but still check they compile
kubectl kustomize overlays/test-vagrant > /dev/null
kubectl kustomize overlays/test-vagrant-mounts > /dev/null
kubectl kustomize overlays/test-vagrant-mounts-flat > /dev/null
kubectl kustomize overlays/test-vagrant-multinet-mounts > /dev/null
kubectl kustomize overlays/test-vagrant-srv6 > /dev/null
kubectl kustomize overlays/test-vagrant-srv6-mounts > /dev/null
kubectl kustomize overlays/test-vagrant-v6 > /dev/null
kubectl kustomize overlays/test-vagrant-v6-mounts > /dev/null
@sed -i.bak "s|:latest|:$(TAG)|g" generated/*.yaml
@rm -f generated/*.yaml.bak
@sed -i.bak "s|:master|:$(CALICO_TAG)|g" generated/*.yaml
Expand Down
2 changes: 2 additions & 0 deletions yaml/components/multinet/multinet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
data:
CALICOVPP_FEATURE_GATES: |-
{
"memifEnabled": true,
"vclEnabled": true,
"multinetEnabled": true
}
---
Expand Down
8 changes: 8 additions & 0 deletions yaml/components/srv6/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1alpha1 # <-- Component notation
kind: Component

resources:
- srv6res.yaml

patchesStrategicMerge:
- srv6.yaml
6 changes: 6 additions & 0 deletions yaml/components/vagrant-mounts/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1alpha1 # <-- Component notation
kind: Component

patchesStrategicMerge:
- mounts.yaml
- update.yaml
4 changes: 2 additions & 2 deletions yaml/generated/calico-vpp-dpdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ spec:
envFrom:
- configMapRef:
name: calico-vpp-config
image: docker.io/calicovpp/vpp:prerelease
image: docker.io/calicovpp/vpp:v3.26.0
imagePullPolicy: IfNotPresent
name: vpp
resources:
Expand Down Expand Up @@ -264,7 +264,7 @@ spec:
envFrom:
- configMapRef:
name: calico-vpp-config
image: docker.io/calicovpp/agent:prerelease
image: docker.io/calicovpp/agent:v3.26.0
imagePullPolicy: IfNotPresent
name: agent
resources:
Expand Down
4 changes: 2 additions & 2 deletions yaml/generated/calico-vpp-eks-dpdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ spec:
envFrom:
- configMapRef:
name: calico-vpp-config
image: docker.io/calicovpp/vpp:prerelease
image: docker.io/calicovpp/vpp:v3.26.0
imagePullPolicy: IfNotPresent
name: vpp
resources:
Expand Down Expand Up @@ -275,7 +275,7 @@ spec:
envFrom:
- configMapRef:
name: calico-vpp-config
image: docker.io/calicovpp/agent:prerelease
image: docker.io/calicovpp/agent:v3.26.0
imagePullPolicy: IfNotPresent
name: agent
resources:
Expand Down
4 changes: 2 additions & 2 deletions yaml/generated/calico-vpp-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ spec:
envFrom:
- configMapRef:
name: calico-vpp-config
image: docker.io/calicovpp/vpp:prerelease
image: docker.io/calicovpp/vpp:v3.26.0
imagePullPolicy: IfNotPresent
name: vpp
resources:
Expand Down Expand Up @@ -273,7 +273,7 @@ spec:
envFrom:
- configMapRef:
name: calico-vpp-config
image: docker.io/calicovpp/agent:prerelease
image: docker.io/calicovpp/agent:v3.26.0
imagePullPolicy: IfNotPresent
name: agent
resources:
Expand Down
Loading