...

Package porter

import "k8s.io/kubernetes/test/images/agnhost/porter"
Overview
Index

Overview ▾

Index ▾

Package files

porter.go

Variables

CmdPorter is used by agnhost Cobra.

var CmdPorter = &cobra.Command{
    Use:   "porter",
    Short: "Serves requested data on ports specified in ENV variables",
    Long: `Serves requested data on ports specified in environment variables of the form SERVE_{PORT,TLS_PORT,SCTP_PORT}_[NNNN]. 

eg:
* SERVE_PORT_9001 - serve TCP connections on port 9001
* SERVE_TLS_PORT_9002 - serve TLS-encrypted TCP connections on port 9002
* SERVE_SCTP_PORT_9003 - serve SCTP connections on port 9003

The included "localhost.crt" is a PEM-encoded TLS cert with SAN IPs "127.0.0.1" and "[::1]", expiring in January 2084, generated from "src/crypto/tls".

To use a different cert/key, mount them into the pod and set the "CERT_FILE" and "KEY_FILE" environment variables to the desired paths.`,
    Args: cobra.MaximumNArgs(0),
    Run:  main,
}

JSONResponse enables --json-response flag

var JSONResponse bool