Skip to content

[OCTRL-1091] Integrate k8s client into ECS core#833

Open
justonedev1 wants to merge 7 commits into
masterfrom
OCTRL-1091-merge
Open

[OCTRL-1091] Integrate k8s client into ECS core#833
justonedev1 wants to merge 7 commits into
masterfrom
OCTRL-1091-merge

Conversation

@justonedev1

@justonedev1 justonedev1 commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This is actual implementation of the ECS Kubernetes bridge.

Before merging it needs the OCTRL-1090

The goal of this PR was to take existing code that deploys Mesos tasks and adjusts it for the kubernetes client usage, basically linking CRDs defined and managed by managers in control-operator to the existing ECS task infrastructure and classes. The code from managerk8s.go was inspired roughly accroding to this table (generated by llm, but I went through it):

managerk8s.go Mesos counterpart Location
createK8sTaskEntries — InboundChannels loop, IPC endpoint, ::global alias makeTaskForMesosResources — same loop, IPC/TCP handling, global alias scheduler.go:1346
buildK8sNodeTaskRefsO2_ROLE/O2_SYSTEM env var injection loop makeTaskForMesosResourcesfillEnvDefault loop for the same two vars scheduler.go:1458
buildK8sNodeTaskRefs — ArgsCLI trimming/filtering makeTaskForMesosResourcescmd.Arguments handling scheduler.go:1437
newTaskForKubernetes newTaskForMesosOffer manager.go:169
deployKubernetesTasks — overall flow acquireTasks — Mesos deployment block manager.go:550
configureK8sTasksBuildPropertyMap per task, global bind map configureTasks — bind map building + BuildPropertyMaps manager.go:804
transitionAndWaitK8sEnvState — send transition, block until state reached transitionTasks — send Mesos command, block on response manager.go:901
killK8sTask doKillTask manager.go:1238
killK8sEnvironment releaseTasks manager.go:733
process — route watch event to roster task (called from watchK8sTasks) updateTaskState / updateTaskStatus manager.go:1071
watchK8sTasks — retry loop on watcher failure Mesos subscribe retry loop scheduler.go
nodeNameFromDescriptor — scan constraints for machine_id Mesos offer attribute matching / Satisfy(targetConstraints) scheduler.go:743
k8sEnvRegistry, createK8sEnvironmentCRD, waitForK8sEnvState, cmdEnvToK8sEnvVars (no direct Mesos equivalent)

It contains multiple changes:

  • upgrading deps after rebasing on master
  • new controlmodes to distinguish between Kubernetes and Mesos tasks
  • k8s manager which translates existing mesos infrastructure to kubernetes (creation, updating, transitioning ,...)
  • small change for environment CRDs
  • control-workflow manifests for readout, stfbuilder-senderoutput and stfsender
  • simple documentation

@justonedev1 justonedev1 changed the title [Octrl 1091] Integrate k8s client into ECS core [OCTRL 1091] Integrate k8s client into ECS core Jul 9, 2026
@justonedev1 justonedev1 changed the title [OCTRL 1091] Integrate k8s client into ECS core [OCTRL-1091] Integrate k8s client into ECS core Jul 9, 2026
@justonedev1 justonedev1 marked this pull request as ready for review July 9, 2026 15:13
@justonedev1 justonedev1 requested a review from knopers8 as a code owner July 9, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant