Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-functional-platformd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: 1.26
- run: sudo groupadd platformd -g 9012 && sudo useradd platformd -u 9012 -g 9012
- run: make functests-platformd
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ functests-database:
functests-platformd:
$(RUN) $(SUDO) FUNCTESTS_ENVOY_IMAGE=docker.io/envoyproxy/envoy:v1.31.4 \
FUNCTESTS_ENVOY_CONFIG=../../../dev/platformd/envoy-xds.yaml \
FUNCTESTS_PLATFORMD_UID=9012 \
FUNCTESTS_PLATFORMD_GID=9012 \
go test -v ./test/functional/platformd $(ARGS)

.PHONY: functests-shared
Expand Down
139 changes: 118 additions & 21 deletions api/platformd/workload/v1alpha2/api.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions api/platformd/workload/v1alpha2/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ option go_package = "github.com/spacechunks/explorer/api/platformd/workload/v1al

service WorkloadService {
rpc WorkloadStatus(WorkloadStatusRequest) returns (WorkloadStatusResponse);
rpc StopWorkload(WorkloadStopRequest) returns (WorkloadStopResponse);
}

message WorkloadStatusRequest {
Expand All @@ -35,4 +36,11 @@ message WorkloadStatusRequest {

message WorkloadStatusResponse {
platformd.workload.v1alpha2.WorkloadStatus status = 1;
}

message WorkloadStopRequest {
string id = 1;
}

message WorkloadStopResponse {
}
38 changes: 38 additions & 0 deletions api/platformd/workload/v1alpha2/api_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions cmd/controlplane/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func main() {
packModelDir = fs.String("resource-pack-model-dir", "", "path inside the resource pack to the directory where the models will live. e.g. assets/mynamespace/models/item") //nolint:lll
packItemDir = fs.String("resource-pack-item-dir", "", "path inside the resource pack to the directory where the items will live. e.g. assets/mynamespace/items") //nolint:lll
packTextureDir = fs.String("resource-pack-texture-dir", "", "path inside the resource pack to the directory where the textures will live. e.g. assets/mynamespace/textures/item") //nolint:lll
velocitySecret = fs.String("velocity-secret", "", "the velocity secret to set in the paper server configuration") //nolint:lll

)
if err := ff.Parse(fs, os.Args[1:],
Expand Down Expand Up @@ -107,6 +108,7 @@ func main() {
ResourcePackModelDir: *packModelDir,
ResourcePackItemDir: *packItemDir,
ResourcePackTextureDir: *packTextureDir,
VelocitySecret: *velocitySecret,
}
ctx = context.Background()
server = controlplane.NewServer(logger, cfg)
Expand Down
6 changes: 5 additions & 1 deletion cmd/platformd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ func main() {
var (
logger = slog.New(slog.NewTextHandler(os.Stdout, nil))
fs = flag.NewFlagSet("platformd", flag.ContinueOnError)
proxyServiceListenSock = fs.String("management-server-listen-sock", "/var/run/platformd/platformd.sock", "path to the unix domain socket to listen on") //nolint:lll
proxyServiceListenSock = fs.String("management-server-listen-sock", "/run/platformd/platformd.sock", "path to the unix domain socket to listen on") //nolint:lll
mgmtSockUID = fs.Uint64("management-server-listen-sock-uid", 9012, "unix domain socket uid")
mgmtSockGID = fs.Uint64("management-server-listen-sock-gid", 9012, "unix domain socket gid")
criListenSock = fs.String("cri-listen-sock", "/var/run/crio/crio.sock", "path to the unix domain socket the CRI is listening on") //nolint:lll
envoyImage = fs.String("envoy-image", "", "container image to use for envoy") //nolint:lll
coreDNSImage = fs.String("coredns-image", "", "container image to use for CoreDNS") //nolint:lll
Expand Down Expand Up @@ -89,6 +91,8 @@ func main() {
ContainerReadyTimeout: *checkContainerReadyTimeout,
WaitAfterServerInit: *checkWaitAfterServerInit,
},
ManagementSocketUID: *mgmtSockUID,
ManagementSocketGID: *mgmtSockGID,
}
ctx = context.Background()
server = platformd.NewServer(logger)
Expand Down
Loading
Loading