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

fix make run (ocp and local) #203

Merged
merged 1 commit into from
Nov 30, 2022
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
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