feat: перенос IoT managed service из sless в отдельную репу
Компоненты: - iot-operator: controller-manager (IoTDevice CRD) + REST API (порт 9090) - mqtt-bridge: MQTT (EMQX) → Kafka bridge - kafka-consumer: Kafka → Postgres pipeline Модуль: gitea.services.ngcloud.ru/Nail/IoT Все 3 бинарника собираются, import paths адаптированы.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# Создано: 2026-04-12
|
||||
# Makefile для IoT managed service.
|
||||
|
||||
IMG ?= naeel/iot-operator:latest
|
||||
|
||||
.PHONY: build build-all docker-build docker-push test tidy
|
||||
|
||||
# Собрать все бинарники
|
||||
build-all: build-operator build-bridge build-consumer
|
||||
|
||||
build-operator:
|
||||
CGO_ENABLED=0 go build -o bin/iot-operator ./cmd/iot-operator/
|
||||
|
||||
build-bridge:
|
||||
CGO_ENABLED=0 go build -o bin/mqtt-bridge ./cmd/mqtt-bridge/
|
||||
|
||||
build-consumer:
|
||||
CGO_ENABLED=0 go build -o bin/kafka-consumer ./cmd/kafka-consumer/
|
||||
|
||||
# Docker
|
||||
docker-build:
|
||||
docker build -t $(IMG) .
|
||||
|
||||
docker-push:
|
||||
docker push $(IMG)
|
||||
|
||||
# Тесты и go mod
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
# Применить CRD в кластер
|
||||
install-crd:
|
||||
kubectl apply -f config/crd/bases/
|
||||
|
||||
# Деплой всех компонентов
|
||||
deploy:
|
||||
kubectl apply -f deployments/k8s/
|
||||
Reference in New Issue
Block a user