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

Load local image in local-deploy #192

Merged
merged 5 commits into from
May 3, 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
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,20 @@ create-kind-cluster: $(KIND) ## Create cluster
delete-kind-cluster: $(KIND) ## Delete cluster
$(KIND) delete cluster

.PHONY: kind-load-image
kind-load-image: ## Load image to kind
ifeq ($(OCI_RUNTIME),$(shell which docker))
# This is an optimization for docker provider. "kind load docker-image" can load an image directly from docker's
# local registry. For other providers (i.e. podman), we must use "kind load image-archive" instead.
$(KIND) load docker-image $(DOCKER_IMG):$(DOCKER_TAG)
else
$(eval tmpfile="/tmp/flp.tar")
-rm $(tmpfile)
$(OCI_RUNTIME) save $(DOCKER_IMG):$(DOCKER_TAG) -o $(tmpfile)
$(KIND) load image-archive $(tmpfile)
-rm $(tmpfile)
endif

##@ metrics

.PHONY: generate-configuration
Expand All @@ -236,7 +250,7 @@ generate-configuration: $(KIND) ## Generate metrics configuration
##@ End2End

.PHONY: local-deployments-deploy
local-deployments-deploy: $(KIND) deploy-prometheus deploy-loki deploy-grafana deploy deploy-netflow-simulator
local-deployments-deploy: $(KIND) deploy-prometheus deploy-loki deploy-grafana build-image kind-load-image deploy deploy-netflow-simulator
kubectl get pods
kubectl rollout status -w deployment/flowlogs-pipeline
kubectl logs -l app=flowlogs-pipeline
Expand Down
4 changes: 3 additions & 1 deletion contrib/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ spec:
- containerPort: 6343
- containerPort: 2055
- containerPort: 2056
imagePullPolicy: Always
# When deployed on KinD, the image is pre-pushed to KinD from the local registry.
# When deployed on OCP, OCP will pull the image from quay.io.
imagePullPolicy: IfNotPresent
volumeMounts:
- name: configuration
mountPath: "/etc/flowlogs-pipeline/"
Expand Down