BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
EyalGonen
Lapis Lazuli | Level 10

Hi experts,

 

SAS Viya 2023.11

When an end-user opens SAS Studio, a "compute server" type pod is launched on his behalf (correct me if I am wrong here). Question is how a cluster admin can associate a launched compute-server pod seen in the list of pods in Azure portal with an end-user?

 

Update: I found out that in the pod's properties there is an annotation called "sas.com/owner" which contains the UID of the owner user. I do not know how to easily locate this uid in the identities service.  I know that I can find the UID given a username with the /identities/users/{{username}}/identifier endpoint but how to I find the username given the UID?

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

I would go for the labels associated with a pod, see the example below.

labels:
    app: sas-workload-orchestrator
    launcher.sas.com/job-type: compute-server
    launcher.sas.com/requested-by-client: sas.studio
    launcher.sas.com/username: christine
    sas.com/created-by: sas-launcher
    sas.com/deployment: sas-viya
    swo.sas.com/containerName: sas-programming-environment
    swo.sas.com/jobID: '40'

This gives you directly the userid your are after.

View solution in original post

2 REPLIES 2
BrunoMueller
SAS Super FREQ

I would go for the labels associated with a pod, see the example below.

labels:
    app: sas-workload-orchestrator
    launcher.sas.com/job-type: compute-server
    launcher.sas.com/requested-by-client: sas.studio
    launcher.sas.com/username: christine
    sas.com/created-by: sas-launcher
    sas.com/deployment: sas-viya
    swo.sas.com/containerName: sas-programming-environment
    swo.sas.com/jobID: '40'

This gives you directly the userid your are after.

gwootton
SAS Super FREQ
As @BrunoMueller mentions you can use the launcher.sas.com/username label. In the Azure Portal under the AKS cluster -> Workloads -> Pods you can add a label filter to specify the user and see the pods associated with that user that way. You could similarly use kubectl:
kubectl -n namespace get pods -l launcher.sas.com/username=sasdemo
--
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 617 views
  • 3 likes
  • 3 in conversation