Skip to content

Commit 47f275b

Browse files
authored
feat: grpc remediation service (#490)
1 parent 4038245 commit 47f275b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2367
-827
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,16 @@ terraform.rc
436436
.terraform
437437
.terraform.lock.hcl
438438

439+
# ============================================================================
440+
# Environment Management
441+
# ============================================================================
442+
443+
### Version Management Tools ###
444+
mise.toml
445+
446+
### VSCode ###
447+
*.code-workspace
448+
439449
# ============================================================================
440450
# Project-Specific Files
441451
# ============================================================================

.ko.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ platforms: [linux/amd64, linux/arm64]
1818
env: [CGO_ENABLED=0]
1919

2020
builds:
21-
2221
- id: fault-quarantine
2322
dir: fault-quarantine
2423
main: .
@@ -69,7 +68,7 @@ builds:
6968
org.opencontainers.image.version: "{{.Env.VERSION}}"
7069
org.opencontainers.image.revision: "{{.Env.GIT_COMMIT}}"
7170
org.opencontainers.image.created: "{{.Env.BUILD_DATE}}"
72-
71+
7372
- id: csp-health-monitor
7473
dir: health-monitors/csp-health-monitor
7574
main: ./cmd/csp-health-monitor
@@ -155,6 +154,23 @@ builds:
155154
org.opencontainers.image.revision: "{{.Env.GIT_COMMIT}}"
156155
org.opencontainers.image.created: "{{.Env.BUILD_DATE}}"
157156

157+
- id: janitor-provider
158+
dir: janitor-provider
159+
main: .
160+
ldflags:
161+
- "-s -w"
162+
- "-X main.version={{.Env.VERSION}} -X main.commit={{.Env.GIT_COMMIT}} -X main.date={{.Env.BUILD_DATE}}"
163+
annotations:
164+
org.opencontainers.image.description: "Example provider for NVSentinel Janitor"
165+
labels:
166+
org.opencontainers.image.source: "https://github.com/nvidia/nvsentinel"
167+
org.opencontainers.image.licenses: "Apache-2.0"
168+
org.opencontainers.image.title: "NVSentinel Janitor-Provider"
169+
org.opencontainers.image.description: "Example implementation of the CSP provider interface for Janitor"
170+
org.opencontainers.image.version: "{{.Env.VERSION}}"
171+
org.opencontainers.image.revision: "{{.Env.GIT_COMMIT}}"
172+
org.opencontainers.image.created: "{{.Env.BUILD_DATE}}"
173+
158174
- id: platform-connectors
159175
dir: platform-connectors
160176
main: .

api/Makefile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ build:
6868
protos-generate: $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) protos-clean ## Generate Go code from Proto definitions.
6969
@echo "Generating Proto code..."
7070
@mkdir -p $(GEN_DIR)
71-
cd proto && protoc \
71+
cd proto && \
72+
protoc \
7273
-I . \
7374
-I ../$(THIRD_PARTY_DIR) \
7475
--plugin="protoc-gen-go=$(PROTOC_GEN_GO)" \
@@ -77,7 +78,17 @@ protos-generate: $(PROTOC_GEN_GO) $(PROTOC_GEN_GO_GRPC) protos-clean ## Generate
7778
--go_opt=paths=source_relative \
7879
--go-grpc_out=../$(GEN_DIR) \
7980
--go-grpc_opt=paths=source_relative \
80-
device/v1alpha1/*.proto
81+
device/v1alpha1/*.proto && \
82+
protoc \
83+
-I . \
84+
-I ../$(THIRD_PARTY_DIR) \
85+
--plugin="protoc-gen-go=$(PROTOC_GEN_GO)" \
86+
--plugin="protoc-gen-go-grpc=$(PROTOC_GEN_GO_GRPC)" \
87+
--go_out=../$(GEN_DIR) \
88+
--go_opt=paths=source_relative \
89+
--go-grpc_out=../$(GEN_DIR) \
90+
--go-grpc_opt=paths=source_relative \
91+
csp/v1alpha1/*.proto
8192
@echo "Cleaning up dependencies..."
8293
go mod tidy
8394
@echo "Done."

0 commit comments

Comments
 (0)