Documentation ¶
Index ¶
- Variables
- func AttachFallbackToLogs(pod *corev1.Pod, logstream io.ReadCloser) error
- func DeleteWaitAnnotationKey(obj metav1.Object)
- func GetNamespacedName(obj metav1.Object) types.NamespacedName
- func PodConnect(ctx context.Context, kc kubernetes.Interface, namespace, name string, ...) error
- type PodListWatcher
- type RunListWatcher
- type WorkspaceListWatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( KubeClient = getKubeClient StokClient = getStokClient )
For testing purposes
View Source
var (
Attach = attachToPod
)
View Source
var (
GetLogs = getLogs
)
Functions ¶
func AttachFallbackToLogs ¶ added in v0.2.9
func AttachFallbackToLogs(pod *corev1.Pod, logstream io.ReadCloser) error
Attach to pod, falling back to streaming logs on error
func DeleteWaitAnnotationKey ¶ added in v0.2.10
Delete annotation WaitAnnotationKey, giving the runner the signal to start
func GetNamespacedName ¶ added in v0.2.8
func GetNamespacedName(obj metav1.Object) types.NamespacedName
func PodConnect ¶ added in v0.2.10
func PodConnect(ctx context.Context, kc kubernetes.Interface, namespace, name string, release func() error) error
PodConnect does the following: 1. Gets log stream of stdout of pod 2. Attaches to TTY of pod, failing that it falls back to copying log stream to user stdout 3. Releases the 'hold' on the pod, i.e. deletes an annotation, informing the pod runner that it can invoke the terraform process, safe in the knowledge that the user is at the very least streaming logs
Types ¶
type PodListWatcher ¶ added in v0.2.10
type PodListWatcher struct { Client kubernetes.Interface Namespace string Name string }
func (*PodListWatcher) List ¶ added in v0.2.10
func (plw *PodListWatcher) List(options metav1.ListOptions) (runtime.Object, error)
func (*PodListWatcher) Watch ¶ added in v0.2.10
func (plw *PodListWatcher) Watch(options metav1.ListOptions) (watch.Interface, error)
type RunListWatcher ¶ added in v0.2.10
type RunListWatcher struct { Client stokclient.Interface Namespace string Name string }
func (*RunListWatcher) List ¶ added in v0.2.10
func (lw *RunListWatcher) List(options metav1.ListOptions) (runtime.Object, error)
func (*RunListWatcher) Watch ¶ added in v0.2.10
func (lw *RunListWatcher) Watch(options metav1.ListOptions) (watch.Interface, error)
type WorkspaceListWatcher ¶ added in v0.2.10
type WorkspaceListWatcher struct { Client stokclient.Interface Namespace string Name string }
func (*WorkspaceListWatcher) List ¶ added in v0.2.10
func (lw *WorkspaceListWatcher) List(options metav1.ListOptions) (runtime.Object, error)
func (*WorkspaceListWatcher) Watch ¶ added in v0.2.10
func (lw *WorkspaceListWatcher) Watch(options metav1.ListOptions) (watch.Interface, error)
Directories ¶
Path | Synopsis |
---|---|
This package has the automatically generated clientset.
|
This package has the automatically generated clientset. |
fake
This package has the automatically generated fake clientset.
|
This package has the automatically generated fake clientset. |
scheme
This package contains the scheme of the automatically generated clientset.
|
This package contains the scheme of the automatically generated clientset. |
typed/stok.goalspike.com/v1alpha1
This package has the automatically generated typed clients.
|
This package has the automatically generated typed clients. |
typed/stok.goalspike.com/v1alpha1/fake
Package fake has the automatically generated clients.
|
Package fake has the automatically generated clients. |
Click to show internal directories.
Click to hide internal directories.