Skip to content

Commit

Permalink
fix make run (ocp and local) (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
eranra authored Nov 30, 2022
1 parent 51ed266 commit 000070b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .mk/local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ local-run: create-kind-cluster local-redeploy local-deploy-operator ## local-red
local-deploy-operator:
# TODO: restore traffic generator, but using IPFIX instead of NFv5 (could be inspired from https://github.com/netobserv/flowlogs-pipeline/blob/main/pkg/test/ipfix.go)
@echo "====> Running the operator locally (in background process)"
go run ./main.go &
go run ./main.go \
-ebpf-agent-image=quay.io/netobserv/netobserv-ebpf-agent:main \
-flowlogs-pipeline-image=quay.io/netobserv/flowlogs-pipeline:main \
-console-plugin-image=quay.io/netobserv/network-observability-console-plugin:main &
@echo "====> Waiting for flowlogs-pipeline pod to be ready"
while : ; do kubectl get ds flowlogs-pipeline && break; sleep 1; done
kubectl wait --timeout=180s --for=condition=ready pod -l app=flowlogs-pipeline
Expand Down
5 changes: 4 additions & 1 deletion .mk/ocp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ ocp-deploy-operator: ## run flp from the operator
@echo "====> Enable netobserv-plugin in OCP console"
oc patch console.operator.openshift.io cluster --type='json' -p '[{"op": "add", "path": "/spec/plugins", "value": ["netobserv-plugin"]}]'
@echo "====> Running the operator locally"
go run ./main.go
go run ./main.go \
-ebpf-agent-image=quay.io/netobserv/netobserv-ebpf-agent:main \
-flowlogs-pipeline-image=quay.io/netobserv/flowlogs-pipeline:main \
-console-plugin-image=quay.io/netobserv/network-observability-console-plugin:main

.PHONY: undeploy-operator
undeploy-operator: ## stop the operator locally
Expand Down
5 changes: 2 additions & 3 deletions .mk/sample.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ deploy-sample-workload:
@echo -e "\n==> Deploy sample workload"
-kubectl create namespace sample-workload
oc adm policy add-scc-to-user privileged system:serviceaccount:sample-workload:default
kubectl -n sample-workload apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/main/release/kubernetes-manifests.yaml
kubectl -n sample-workload apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/release/v0.4.1/release/kubernetes-manifests.yaml
kubectl -n sample-workload run syn-flood --privileged --image=bilalcaliskan/syn-flood:latest --restart=Never -- --host frontend-external.sample-workload.svc.cluster.local --port 80 --floodType syn

# undeploy sample workload
.PHONY: undeploy-sample-workload
undeploy-sample-workload:
@echo -e "\n==> Undeploy sample workload"
kubectl -n sample-workload delete --ignore-not-found=true -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/main/release/kubernetes-manifests.yaml
kubectl -n sample-workload delete --ignore-not-found=true -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/release/v0.4.1/release/kubernetes-manifests.yaml
-kubectl -n sample-workload delete --ignore-not-found=true pod syn-flood
-kubectl delete --ignore-not-found=true namespace sample-workload

0 comments on commit 000070b

Please sign in to comment.