kubeclaw/Makefile
Marcus (agent-cos) 1a831bdfe5 Initial scaffold: project structure, CRDs, Makefile
- Agent CRD: deployment spec, workspace config, channels, judge integration
- AgentGroup CRD: multi-agent orchestration with shared configs
- JudgePolicy CRD: cluster-scoped authorization policies with per-agent overrides
- Makefile: build, generate, install, test, helm targets
- Go module: controller-runtime + apimachinery dependencies
2026-05-11 20:54:10 -07:00

70 lines
No EOL
1.3 KiB
Makefile

.PHONY: all build run install uninstall generate manifests test lint
# Container image settings
IMG ?= ghcr.io/sscoble/kubeclaw:latest
CONTAINER_RUNTIME ?= docker
# Environment
KUBECTL ?= kubectl
CONTROLLER_GEN ?= $(shell go env GOPATH)/bin/controller-gen
all: build
##@ Build
build: manifests generate fmt vet
go build -o bin/manager ./cmd/manager
run: manifests generate fmt vet
go run ./cmd/manager
##@ CRDs
manifests: $(CONTROLLER_GEN)
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./api/..." output:crd:artifacts:config=config/crd/bases
generate: $(CONTROLLER_GEN)
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./api/..."
install: manifests
$(KUBECTL) apply -f config/crd/bases
uninstall: manifests
$(KUBECTL) delete -f config/crd/bases
##@ Test
test: manifests generate fmt vet
go test ./... -coverprofile cover.out
##@ Lint
fmt:
go fmt ./...
vet:
go vet ./...
lint:
golangci-lint run
##@ Dependencies
$(CONTROLLER_GEN):
go install sigs.k8s.io/controller-runtime/cmd/controller-gen@latest
##@ Helm
helm-package:
helm package charts/kubeclaw -d bin/
helm-template:
helm template kubeclaw charts/kubeclaw
##@ Container
docker-build:
$(CONTAINER_RUNTIME) build -t ${IMG} .
docker-push:
$(CONTAINER_RUNTIME) push ${IMG}