-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Isaak Dorfman
committed
Aug 19, 2021
1 parent
7604d7e
commit 357b529
Showing
6 changed files
with
111 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
.PHONY: install \ | ||
clean | ||
|
||
install: | ||
bash ./deploy-all.sh | ||
install: install-partner-pods | ||
bash ./deploy-test-pods.sh | ||
|
||
install-partner-pods: | ||
bash ./deploy-partner-pods.sh | ||
|
||
clean: | ||
bash ./clean-all.sh |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
mkdir -p ./temp | ||
|
||
if [[ -z "${NAMESPACE_TO_GENERATE}" ]]; then | ||
export NAMESPACE_TO_GENERATE="tnf" | ||
fi | ||
|
||
export res=$(oc get namespace $NAMESPACE_TO_GENERATE 2>&1) | ||
if [[ ${res#Error from server (NotFound)} != ${res} ]] || [[ ${res#No resources found} != ${res} ]]; then | ||
cat ./local-test-infra/namespace.yaml | ./script/mo > ./temp/rendered-namespace.yaml | ||
oc apply -f ./temp/rendered-namespace.yaml | ||
rm ./temp/rendered-namespace.yaml | ||
else | ||
echo "namespace ${NAMESPACE_TO_GENERATE} already exists, no reason to recreate" | ||
fi | ||
|
||
if [[ -n "${TNF_MINIKUBE_ONLY}" ]] && [[ ${TNF_MINIKUBE_ONLY} = "true" ]]; then | ||
echo "Running with Minikube, no FsDiff pod created" | ||
else | ||
cat ./local-test-infra/fsdiff-deployment.yaml | ./script/mo > ./temp/rendered-fsdiff-template.yaml | ||
oc apply -f ./temp/rendered-fsdiff-template.yaml | ||
rm ./temp/rendered-fsdiff-template.yaml | ||
sleep 3 | ||
oc wait pod -n $NAMESPACE_TO_GENERATE --for=condition=ready -l "app=node-master" --timeout=30s | ||
fi | ||
|
||
|
||
cat ./local-test-infra/local-partner-deployment.yaml | ./script/mo > ./temp/rendered-partner-template.yaml | ||
oc apply -f ./temp/rendered-partner-template.yaml | ||
rm ./temp/rendered-partner-template.yaml | ||
sleep 3 | ||
oc wait pod -n $NAMESPACE_TO_GENERATE --for=condition=ready -l "app=partner" --timeout=30s |
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,12 @@ | ||
mkdir -p ./temp | ||
|
||
if [[ -z "${NAMESPACE_TO_GENERATE}" ]]; then | ||
export NAMESPACE_TO_GENERATE="tnf" | ||
fi | ||
|
||
|
||
cat ./local-test-infra/local-pod-under-test.yaml | ./script/mo > ./temp/rendered-local-pod-under-test-template.yaml | ||
oc apply -f ./temp/rendered-local-pod-under-test-template.yaml | ||
rm ./temp/rendered-local-pod-under-test-template.yaml | ||
sleep 3 | ||
oc wait pod -n $NAMESPACE_TO_GENERATE --for=condition=ready -l "app=test" --timeout=30s |
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,63 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: node-master | ||
namespace: {{ NAMESPACE_TO_GENERATE }} | ||
test-network-function.com/generic: fs_diff_master | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: node-master | ||
template: | ||
metadata: | ||
labels: | ||
app: node-master | ||
test-network-function.com/generic: fs_diff_master | ||
test-network-function.com/container: fs_diff_master | ||
annotations: | ||
test-network-function.com/defaultnetworkinterface: '"eth0"' # optional | ||
name: node-master | ||
spec: | ||
# hostPID: true | ||
containers: | ||
- command: | ||
- tail | ||
- -f | ||
- /dev/null | ||
image: quay.io/testnetworkfunction/cnf-test-partner:latest # quay.io/testnetworkfunction/test-network-function | ||
name: master | ||
resources: | ||
limits: | ||
memory: 512Mi | ||
cpu: 0.25 | ||
volumeMounts: | ||
- mountPath: /var/lib/containers | ||
name: var-lib-containers | ||
- mountPath: /var/run/containers | ||
name: var-run-containers | ||
- mountPath: /run/runc | ||
name: runc-dir | ||
- mountPath: /var/run/containers/storage/overlay-containers | ||
name: overlay-containers | ||
securityContext: | ||
privileged: true | ||
restartPolicy: Always | ||
volumes: | ||
- name: var-lib-containers | ||
hostPath: | ||
path: /var/lib/containers | ||
type: Directory | ||
- name: var-run-containers | ||
hostPath: | ||
path: /var/run/containers | ||
type: Directory | ||
- name: runc-dir | ||
hostPath: | ||
path: /run/runc | ||
type: Directory | ||
- name: overlay-containers | ||
hostPath: | ||
path: /var/run/containers/storage/overlay-containers | ||
type: Directory |
File renamed without changes.