exectracewrapper

package module
v0.0.0-...-cbef761 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: GPL-2.0, MIT Imports: 15 Imported by: 0

README

Exectrace for Coder v2

A wrapper around Coder's open source exectrace library for providing workspace process logging in Kubernetes on Linux for Coder v2.

Note: The enterprise directory of this repo, including the exectrace binary and image, are enterprise-licensed. Workspace process logging is an enterprise feature in Coder v2.

If you are looking for documentation on how to use workspace process logging in Coder v1, please refer to the documentation and reach out to us if you need any assistance.

This works by creating a sidecar inside the same Linux process namespace and logging all processes created inside the namespace, even processes in nested namespaces (i.e. from Docker containers).

Usage in Kubernetes

Use the Kubernetes template in the templates/kubernetes directory as your starting point. This template is similar to the kubernetes template shipped with Coder.

The main changes are:

  • Adds some shell code before starting the Coder agent to submit the process ID namespace inum to the sibling container, which ensures that workspace startup waits for the exectrace container to be running.
  • Adds the exectrace container to the pod.

Usage in Kubernetes with Envbox

Same as above, but use the kubernetes-envbox template instead.

Usage outside of Kubernetes

This binary/image only supports Kubernetes, although technically it can be made to work outside of Kubernetes by ensuring the workspace and the sidecar are inside the same process ID namespace. Support for usage outside of Kubernetes is not offered, but please reach out to us if you need this outside of Kubernetes and we will see what we can do.

License

Coder Enterprise license. See LICENSE.enterprise.

Documentation

Overview

This file is licensed under the Coder Enterprise License. Please see ../LICENSE.enterprise.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, log slog.Logger, opts Options) error

Types

type Options

type Options struct {
	UseLocalPidNS     bool
	InitListenAddress string
	StartupTimeout    time.Duration
}

Directories

Path Synopsis
cmd
exectrace
This file is licensed under the Coder Enterprise License.
This file is licensed under the Coder Enterprise License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL