Skip to content

Run dpl workflows from ECS in k8s - #850

Open
justonedev1 wants to merge 5 commits into
masterfrom
run_dpl_backup
Open

Run dpl workflows from ECS in k8s#850
justonedev1 wants to merge 5 commits into
masterfrom
run_dpl_backup

Conversation

@justonedev1

Copy link
Copy Markdown
Collaborator

this should be multiple PRs, but I wanted to create this PR before I leave for holidays. However at least all independant issues are separate commits. If you have any questions, I will be responding via MM or maybe even in comments here.

@justonedev1
justonedev1 requested a review from knopers8 as a code owner August 20, 2026 21:41

@knopers8 knopers8 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm leaving some todo comments for myself, don't look Michal!!

Comment thread core/task/managerk8s.go
// jitOnK8sEnabled reports whether ECS may route JIT/DPL task classes to the
// K8s path. Missing/false means JIT keeps running through Mesos, same as
// before this bridge existed.
func jitOnK8sEnabled() bool {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not used anywhere, todo. I would even consider working towards having a global switch, affecting not just jitted DPL, but everything we run.

tasks:
mtichak-ost.cern.ch:
# mtichak-ost:
mtichak-ost:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understand why it is changed again

pod:
containers:
- args:
- source /etc/profile.d/o2.sh && o2-dpl-raw-proxy -b --session default --dataspec

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why it is all one big argument

@@ -0,0 +1,110 @@
apiVersion: aliecs.alice.cern/v1alpha1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to understand why we only have the QC CheckRunner template here, but not all of them. Maybe it's an example.

images:
- name: environment-manager
newName: gitlab-registry.cern.ch/aliceo2group/dockerfiles/aliecs/environment-manager
newTag: latest

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to understand why it's a part of this PR and why it's needed. Maybe it was removed just to be able to use a custom-built image instead of the latest.

flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.IntVar(&maxConcurrentReconciles, "max-concurrent-reconciles", 1,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why we needed to make it an option to run DPL

envVars:
- O2_DETECTOR
- O2_PARTITION
- OCC_CONTROL_PORT

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear why it's removed. after all we use the allocator only for JIT-generated templates.


var clientsForContainers map[string]*OccClient = make(map[string]*OccClient)
// var clientsForContainers map[string]*OccClient = make(map[string]*OccClient)
var clientsForContainers sync.Map

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess that's to allow for concurrent reconciles.

}

stateReply, err := client.GetState(ctx)
stateReply, err := client.(*OccClient).GetState(ctx)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could cast just after retrieving from the map.

type TaskReference struct {
Name string `json:"name"`
TaskID string `json:"taskID,omitempty"`
NameSuffix string `json:"nameSuffix,omitempty"`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo add comment that it's mostly for jit-blabla, so I don't scratch my head when refactoring.

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.

2 participants