Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add runK8sConfig to CeleryK8sRunLauncher #27081

Open
mtofano opened this issue Jan 13, 2025 · 0 comments
Open

Add runK8sConfig to CeleryK8sRunLauncher #27081

mtofano opened this issue Jan 13, 2025 · 0 comments
Labels
deployment: k8s Related to deploying Dagster to Kubernetes type: feature-request

Comments

@mtofano
Copy link

mtofano commented Jan 13, 2025

What's the use case?

Hi there!

I was using the K8sRunLauncher and everything was working great. I thought I could leverage the CeleryK8sRunLauncher in order to be a bit more efficient for my particular use cases.

In our environment, the pod that gets created for the job run when using the K8sRunLauncher requires a few annotations to run properly as the service account. I was able to add this in to the runLauncher config as such:

runLauncher:
  type: K8sRunLauncher
  config:
      runK8sConfig:
        podSpecConfig:
          imagePullSecrets:
            - name: mwam-qe-pull
        podTemplateSpecMetadata:
          annotations:
            kerberos.mwam.local/inject-init: "enabled"
            kerberos.mwam.local/ad-svc-account: "svc-dagster-qe-t"
            kerberos.mwam.local/fix-cache-permissions: "true"

This worked well and solved all my issues. However, when moving to the CeleryK8sRunLauncher, I don't see the runK8sConfig section available in the helm chart. I tried to add the annotations to runLauncher.config.celeryK8sRunLauncher.annotation, but that only gets applied to the worker pods, not the ephemeral job run pods.

I was able to get around this by specifying the configuration in code on the job:

@job(
    tags={
        "dagster-k8s/config": {
            "pod_template_spec_metadata": {
                "annotations": {
                    "kerberos.mwam.local/inject-init": "enabled",
                    "kerberos.mwam.local/ad-svc-account": "svc-dagster-qe-t",
                    "kerberos.mwam.local/fix-cache-permissions": "true",
                }
            },
        },
    },
)

It would be extremely helpful if we could specify the same runK8sConfig section for the CeleryK8sRunLauncher as well for all job run pods. Having to do so in the codebase is a bit tedious.

Is this something that is already supported and perhaps I am missing it? Any help is greatly appreciated here!

Ideas of implementation

Support runK8sConfig for all job run pods when using the CeleryK8sRunLauncher.

Additional information

No response

Message from the maintainers

Impacted by this issue? Give it a 👍! We factor engagement into prioritization.

@garethbrickman garethbrickman added the deployment: k8s Related to deploying Dagster to Kubernetes label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment: k8s Related to deploying Dagster to Kubernetes type: feature-request
Projects
None yet
Development

No branches or pull requests

2 participants