Documentation
¶
Index ¶
- Constants
- Variables
- func HandleInject(w http.ResponseWriter, r *http.Request)
- func HostKubeConfig() (string, error)
- func NSCat(src string) string
- type Runtime
- func (r *Runtime) Addr() string
- func (r *Runtime) Certs() error
- func (r *Runtime) Client() *kubernetes.Clientset
- func (r *Runtime) Close()
- func (r *Runtime) DNSNames() []string
- func (r *Runtime) EscapeInit() error
- func (r *Runtime) Hide() error
- func (r *Runtime) Identifier() string
- func (r *Runtime) InClusterInit() error
- func (r *Runtime) Namespace() string
- func (r *Runtime) Open() error
- func (r *Runtime) Orgs() []string
- func (r *Runtime) Self() *v1.Pod
- func (r *Runtime) ServiceName() string
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 ¶
Types ¶
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func (*Runtime) Client ¶
func (r *Runtime) Client() *kubernetes.Clientset
func (*Runtime) EscapeInit ¶
func (*Runtime) Identifier ¶
func (*Runtime) InClusterInit ¶
InClusterInit will ensure the client and see if we are running inside a cluster
func (*Runtime) ServiceName ¶
Click to show internal directories.
Click to hide internal directories.