(cloudshell *cloudshellv1alpha1.CloudShell)
| 1123 | } |
| 1124 | |
| 1125 | func (c *Controller) GetBindingWorkerFor(cloudshell *cloudshellv1alpha1.CloudShell) (*corev1.Pod, error) { |
| 1126 | podName := cloudshell.Labels[constants.CloudshellPodLabelKey] |
| 1127 | if len(podName) == 0 { |
| 1128 | return nil, nil |
| 1129 | } |
| 1130 | |
| 1131 | pod, err := c.podLister.Pods(cloudshell.GetNamespace()).Get(podName) |
| 1132 | if err != nil { |
| 1133 | if apierrors.IsNotFound(err) { |
| 1134 | return nil, nil |
| 1135 | } |
| 1136 | return nil, err |
| 1137 | } |
| 1138 | |
| 1139 | return pod, nil |
| 1140 | } |
| 1141 | |
| 1142 | func execCommand(cloudshell *cloudshellv1alpha1.CloudShell, command []string, config *rest.Config) error { |
| 1143 | config.GroupVersion = &corev1.SchemeGroupVersion |
no test coverage detected