Skip to content

Commit

Permalink
Misc fixed to get kind cluster running in the new repo
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <mmahmoud@redhat.com>
  • Loading branch information
msherif1234 committed May 23, 2024
1 parent 4509157 commit b8568ae
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ ifeq ($(USE_IMAGE_DIGESTS), true)
endif

# Image URL to use all building/pushing image targets
BPFMAN_IMG ?= quay.io/bpfman/bpfman:latest
BPFMAN_AGENT_IMG ?= quay.io/bpfman/bpfman-agent:latest
BPFMAN_OPERATOR_IMG ?= quay.io/bpfman/bpfman-operator:latest
BPFMAN_OPERATOR_BUNDLE_IMG ?= quay.io/bpfman/bpfman-operator-bundle:latest
Expand Down Expand Up @@ -277,7 +276,7 @@ test-integration: ## Run Integration tests.
.PHONY: bundle
bundle: operator-sdk generate kustomize manifests ## Generate bundle manifests and metadata, then validate generated files.
cd config/bpfman-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-operator=${BPFMAN_OPERATOR_IMG}
cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman=${BPFMAN_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
cp config/manifests/dependencies.yaml bundle/metadata/
$(OPERATOR_SDK) bundle validate ./bundle
Expand Down Expand Up @@ -305,11 +304,10 @@ build-images: ## Build bpfman, bpfman-agent, and bpfman-operator images.
push-images: ## Push bpfman, bpfman-agent, bpfman-operator images.
docker push ${BPFMAN_OPERATOR_IMG}
docker push ${BPFMAN_AGENT_IMG}
docker push ${BPFMAN_IMG}

.PHONY: load-images-kind
load-images-kind: ## Load bpfman, bpfman-agent, and bpfman-operator images into the running local kind devel cluster.
kind load docker-image ${BPFMAN_IMG} ${BPFMAN_OPERATOR_IMG} ${BPFMAN_AGENT_IMG} --name ${KIND_CLUSTER_NAME}
kind load docker-image ${BPFMAN_OPERATOR_IMG} ${BPFMAN_AGENT_IMG} --name ${KIND_CLUSTER_NAME}

.PHONY: bundle-build
bundle-build: ## Build the bundle image.
Expand Down Expand Up @@ -365,7 +363,7 @@ setup-kind: ## Setup Kind cluster
.PHONY: deploy
deploy: manifests kustomize ## Deploy bpfman-operator to the K8s cluster specified in ~/.kube/config with the csi driver initialized.
cd config/bpfman-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-operator=${BPFMAN_OPERATOR_IMG}
cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman=${BPFMAN_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
$(KUSTOMIZE) build config/default | kubectl apply -f -

.PHONY: undeploy
Expand All @@ -387,7 +385,7 @@ run-on-kind: kustomize setup-kind build-images load-images-kind deploy ## Kind D
.PHONY: deploy-openshift
deploy-openshift: manifests kustomize ## Deploy bpfman-operator to the Openshift cluster specified in ~/.kube/config.
cd config/bpfman-operator-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-operator=${BPFMAN_OPERATOR_IMG}
cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman=${BPFMAN_IMG} && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
cd config/bpfman-deployment && $(KUSTOMIZE) edit set image quay.io/bpfman/bpfman-agent=${BPFMAN_AGENT_IMG}
$(KUSTOMIZE) build config/openshift | kubectl apply -f -

.PHONY: undeploy-openshift
Expand Down
1 change: 0 additions & 1 deletion config/bpfman-deployment/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ metadata:
data:
## Can be configured at runtime
bpfman.agent.image: quay.io/bpfman/bpfman-agent:latest
bpfman.image: quay.io/bpfman/bpfman:latest
## Can be set to "info", "debug", or "trace"
bpfman.agent.log.level: info
## See https://docs.rs/env_logger/latest/env_logger/ for configuration options
Expand Down
3 changes: 0 additions & 3 deletions config/bpfman-deployment/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ resources:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: quay.io/bpfman/bpfman
newName: quay.io/bpfman/bpfman
newTag: latest
- name: quay.io/bpfman/bpfman-agent
newName: quay.io/bpfman/bpfman-agent
newTag: latest
3 changes: 1 addition & 2 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ resources:
- bases/bpfman.io_uprobeprograms.yaml
- bases/bpfman.io_fentryprograms.yaml
- bases/bpfman.io_fexitprograms.yaml

- bases/bpfman.io_bpfapplications.yaml
- bases/bpfman.io_bpfapplications.yaml
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
Expand Down

0 comments on commit b8568ae

Please sign in to comment.