...

Package nosnat

import "k8s.io/kubernetes/test/images/agnhost/no-snat-test"
Overview
Index

Overview ▾

Index ▾

Package files

main.go

Variables

CmdNoSnatTest is used by agnhost Cobra.

var CmdNoSnatTest = &cobra.Command{
    Use:   "no-snat-test",
    Short: "Creates the /checknosnat and /whoami endpoints",
    Long: `Serves the following endpoints on the given port (defaults to "8080").

- /whoami - returns the request's IP address.
- /checknosnat - queries  "ip/whoami" for each provided IP ("/checknosnat?ips=ip1,ip2"),
  and if all the response bodies match the "POD_IP" environment variable, it will return a 200 response, 500 otherwise.`,
    Args: cobra.MaximumNArgs(0),
    Run:  main,
}