A SAS Deployment is stuck in a Pending state


After you apply a SASDeployment Custom Resource (CR), the state does not move past PENDING:

kubectl -n viya get sasdeployment
NAME STATE CADENCENAME CADENCEVERSION CADENCERELEASE AGE
sas-viya PENDING lts 2025.09 20260610.1781131304701 2y309d

The sas-deployment-operator-reconcile job pods are unable to obtain the lock for the sas-deployment-cr-leader. As a result, the pod log repeats messages similar to the following:

I0612 15:08:59.980195 1 leaderelection.go:250] attempting to acquire leader lease viya/sas-deployment-cr-leader...
E0612 15:09:00.035281 1 leaderelection.go:332] error retrieving resource lock viya/sas-deployment-cr-leader: Get "https://10.254.0.1:443/apis/coordination.k8s.io/v1/namespaces/viya/leases/
sas-deployment-cr-leader": Forbidden

Displaying the SASDeployment CR shows that the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables are set as annotations:

Annotations:  environment.orchestration.sas.com/HTTPS_PROXY: http://webproxy.company.com:1111
              environment.orchestration.sas.com/HTTP_PROXY: http://webproxy.company.com:1111
              environment.orchestration.sas.com/NO_PROXY: localhost,my.host.com, ....
                

When you run the sas-orchestration create sas-deployment-cr command, it picks up any HTTP_PROXY, HTTPS_PROXY, or NO_PROXY environment variables that are set. 

Workaround

Then, apply the SASDeployment CR. The state should change to Reconciling, then Succeeded.