Add annotation to worker pods when using the dask k8s operator

Is there a way to add custom annotations to worker pods created by the k8s operator? As I understand it from this documentation, the CRD uses a podspec-v1-core to represent the pod, however, to support annotations it would need to support pod-v1-core (as that includes the metadata field).

The reason for custom annotations would be to inject secrets using vault (which relies on annotations to do so).

Am I missing something here? My current idea for a workaround would be a plugin, which relies on toplevel metadata annotations from the DaskCluster CR and passes those on to the scheduler and worker pods. Open to better suggestions though :slight_smile:

This isn’t possible today, but we should definitely add it.

I don’t think this needs to be a plugin. We could add this logic to the controller directly so that any annotations set on the DaskCluster will be passed to the Pod resources that it spawns.

Would you mind opening a GitHub issue for this?