Hi Amar - great questions.
Yes, you should be able to accomplish both of these requests using Enterprise Gateway.
1. You could create different kernel specifications, one that is CPU-based, another that is GPU-based. Since each will have its own copy of kernel-pod.yaml file, you can modify the pod's yaml to have the appropriate node affinity, etc., relative to GPU allocation. See
Kernelspec Modifications for how to go about exposing the kernelspecs so you can customize the kernel-pod.yaml file.
Once parameterized kernels are "a thing", you'd likely be able to do this with a single kernelspec where the parameters dictate how configurations are applied - but those aren't a thing at the moment.
2. Enterprise Gateway provides some basic application-level authorization such that you can specify lists of authorized (and unauthorized users) within a kernel specification. These lists are checked prior to the kernel's launch. If authorized users exist in the list, then the invoking user must be in that list (i.e., non-existence is an implied denial).
Authorization can be applied at the
global level (such that the values span all kernelspecs) and at the
kernel level (as mentioned previously). The more specific authorization settings will be applied unless the user resides in the global unauthorized_users list - in which case that user is not permitted to start any kernels.
Regards,
Kevin.