diff --git a/pkg/KubeArmorAnnotation/Makefile b/pkg/KubeArmorAnnotation/Makefile index 1708d56e2f..5d815bff67 100644 --- a/pkg/KubeArmorAnnotation/Makefile +++ b/pkg/KubeArmorAnnotation/Makefile @@ -92,8 +92,14 @@ deploy: manifests kustomize deploy-cert-manager ## Deploy controller to the K8s sed 's/kubearmor-annotation-controller-manager/kubearmor-annotation-manager/g' | \ sed -e "1,7d" | kubectl apply -f - -delete: delete-cert-manager ## Delete controller from the K8s cluster specified in ~/.kube/config. - $(KUSTOMIZE) build config/default | kubectl delete -f - +delete-annotation-controller: ## Delete controller from the K8s cluster specified in ~/.kube/config. + cd $(CURDIR); $(KUSTOMIZE) build config/default | \ + sed 's/control-plane: controller-manager/kubearmor-app: kubearmor-annotation-manager/g' | \ + sed 's/kubearmor-annotation-controller-manager/kubearmor-annotation-manager/g' | \ + sed -e "1,7d" | kubectl delete -f - + +delete: delete-annotation-controller delete-cert-manager ## Delete annotation controller and cert manager from the K8s cluster specified in ~/.kube/config. + deployment: manifests kustomize cd config/manager; $(KUSTOMIZE) edit set image controller=${IMG}:latest