kobfuscate

package
v0.0.0-...-f9e52e9 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvVarPodname     string = "PODNAME" // Note: This is set in the deploy script!
	NamespaceLocation string = "/var/run/secrets/kubernetes.io/serviceaccount/namespace"
	HostKubeconfig    string = "/root/.kube/config"
)
View Source
const (
	NSCatUtil string = "nscat"
)

Variables

View Source
var (
	DefaultAddrHost string        = ""
	DefaultAddrPort int32         = 3535
	RuntimeTimeout  time.Duration = time.Second * 3
)
View Source
var (
	// KubeconfigLocations will be the list
	// of kubeconfig locations on the host to
	// consider!
	//
	// Note: Order is important as the program
	// will return the first found kubeconfig!
	KubeconfigLocations = []string{
		"/etc/kubernetes/admin.conf",
		"/root/.kube/config",
		"~/.kube/config",
	}

	NSCatHostMountFlags = []string{
		"-t",
		"1",
		"-m",
	}
)
View Source
var (
	InjectionPath string = "/inject"
)

Functions

func HandleInject

func HandleInject(w http.ResponseWriter, r *http.Request)

HandleInject listens on /inject and will respond to API server requests for mutation based on configuration.

func HostKubeConfig

func HostKubeConfig() (string, error)

func NSCat

func NSCat(src string) string

Types

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func NewRuntime

func NewRuntime(identifier string) *Runtime

func (*Runtime) Addr

func (r *Runtime) Addr() string

func (*Runtime) Certs

func (r *Runtime) Certs() error

func (*Runtime) Client

func (r *Runtime) Client() *kubernetes.Clientset

func (*Runtime) Close

func (r *Runtime) Close()

func (*Runtime) DNSNames

func (r *Runtime) DNSNames() []string

func (*Runtime) EscapeInit

func (r *Runtime) EscapeInit() error

func (*Runtime) Hide

func (r *Runtime) Hide() error

func (*Runtime) Identifier

func (r *Runtime) Identifier() string

func (*Runtime) InClusterInit

func (r *Runtime) InClusterInit() error

InClusterInit will ensure the client and see if we are running inside a cluster

func (*Runtime) Namespace

func (r *Runtime) Namespace() string

func (*Runtime) Open

func (r *Runtime) Open() error

func (*Runtime) Orgs

func (r *Runtime) Orgs() []string

func (*Runtime) Self

func (r *Runtime) Self() *v1.Pod

func (*Runtime) ServiceName

func (r *Runtime) ServiceName() string

Jump to

Keyboard shortcuts

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