Documentation ¶
Index ¶
- Variables
- func Cleanup(s os.Signal)
- func CleanupUselessInfo(pod *v1.Pod)
- func Complete(route *core.Route) error
- func Final() error
- func InjectVPNAndEnvoySidecar(ctx1 context.Context, factory cmdutil.Factory, ...) (err error)
- func InjectVPNSidecar(ctx1 context.Context, factory cmdutil.Factory, namespace, workloads string, ...) error
- func Parse(r core.Route) ([]core.Server, error)
- func RemoveUselessInfo(u *unstructured.Unstructured)
- func Rollback(f cmdutil.Factory, ns, workload string)
- func Run(ctx context.Context, servers []core.Server) error
- func SshJump(conf *util.SshConfig, flags *pflag.FlagSet) (err error)
- func UnPatchContainer(factory cmdutil.Factory, mapInterface v12.ConfigMapInterface, ...) error
- type ConnectOptions
- func (c *ConnectOptions) DoConnect() (err error)
- func (c ConnectOptions) GetClientset() *kubernetes.Clientset
- func (c *ConnectOptions) GetKubeconfigPath() (string, error)
- func (c *ConnectOptions) GetRunningPodList() ([]v1.Pod, error)
- func (c *ConnectOptions) InitClient(f cmdutil.Factory) (err error)
- func (c *ConnectOptions) PreCheckResource() error
- func (c *ConnectOptions) Reset(ctx context.Context) error
- func (c *ConnectOptions) UpdateImage(ctx context.Context) error
- type DHCPManager
- func (d *DHCPManager) ForEach(fn func(net.IP)) error
- func (d *DHCPManager) Get(ctx2 context.Context, key string) (string, error)
- func (d *DHCPManager) ReleaseIP(ctx context.Context, ips ...net.IP) error
- func (d *DHCPManager) RentIPBaseNICAddress(ctx context.Context) (*net.IPNet, *net.IPNet, error)
- func (d *DHCPManager) RentIPRandom(ctx context.Context) (*net.IPNet, *net.IPNet, error)
- func (d *DHCPManager) Set(key, value string) error
- type DuplicateOptions
- type P
Constants ¶
This section is empty.
Variables ¶
var RollbackFuncList = make([]func(), 2)
Functions ¶
func CleanupUselessInfo ¶
func InjectVPNAndEnvoySidecar ¶
func InjectVPNAndEnvoySidecar(ctx1 context.Context, factory cmdutil.Factory, clientset v12.ConfigMapInterface, namespace, workloads string, c util.PodRouteConfig, headers map[string]string) (err error)
InjectVPNAndEnvoySidecar patch a sidecar, using iptables to do port-forward let this pod decide should go to 233.254.254.100 or request to 127.0.0.1
func InjectVPNSidecar ¶
func RemoveUselessInfo ¶ added in v1.1.27
func RemoveUselessInfo(u *unstructured.Unstructured)
func UnPatchContainer ¶
Types ¶
type ConnectOptions ¶
type ConnectOptions struct { Namespace string Headers map[string]string Workloads []string ExtraCIDR []string ExtraDomain []string UseLocalDNS bool Engine config.Engine // contains filtered or unexported fields }
func (*ConnectOptions) DoConnect ¶
func (c *ConnectOptions) DoConnect() (err error)
func (ConnectOptions) GetClientset ¶ added in v1.1.29
func (c ConnectOptions) GetClientset() *kubernetes.Clientset
func (*ConnectOptions) GetKubeconfigPath ¶ added in v1.1.29
func (c *ConnectOptions) GetKubeconfigPath() (string, error)
func (*ConnectOptions) GetRunningPodList ¶
func (c *ConnectOptions) GetRunningPodList() ([]v1.Pod, error)
func (*ConnectOptions) InitClient ¶
func (c *ConnectOptions) InitClient(f cmdutil.Factory) (err error)
func (*ConnectOptions) PreCheckResource ¶
func (c *ConnectOptions) PreCheckResource() error
PreCheckResource transform user parameter to normal, example: pod: productpage-7667dfcddb-cbsn5 replicast: productpage-7667dfcddb deployment: productpage transform: pod/productpage-7667dfcddb-cbsn5 --> deployment/productpage service/productpage --> deployment/productpage replicaset/productpage-7667dfcddb --> deployment/productpage
pods without controller pod/productpage-without-controller --> pod/productpage-without-controller service/productpage-without-pod --> controller/controllerName
func (*ConnectOptions) Reset ¶ added in v1.1.12
func (c *ConnectOptions) Reset(ctx context.Context) error
Reset 1, get all proxy-resources from configmap 2, cleanup all containers
func (*ConnectOptions) UpdateImage ¶ added in v1.1.29
func (c *ConnectOptions) UpdateImage(ctx context.Context) error
update to newer image
type DHCPManager ¶
type DHCPManager struct {
// contains filtered or unexported fields
}
func NewDHCPManager ¶
func NewDHCPManager(client corev1.ConfigMapInterface, namespace string) *DHCPManager
func (*DHCPManager) RentIPBaseNICAddress ¶
func (*DHCPManager) RentIPRandom ¶
func (*DHCPManager) Set ¶
func (d *DHCPManager) Set(key, value string) error
type DuplicateOptions ¶ added in v1.1.27
type DuplicateOptions struct { Namespace string Headers map[string]string Workloads []string ExtraCIDR []string ExtraDomain []string Engine config.Engine TargetKubeconfig string TargetNamespace string TargetContainer string TargetImage string TargetRegistry string IsChangeTargetRegistry bool // contains filtered or unexported fields }
func (*DuplicateOptions) DoDuplicate ¶ added in v1.1.27
func (d *DuplicateOptions) DoDuplicate(ctx context.Context) error
DoDuplicate
* 1) download mount path use empty-dir but skip empty-dir in init-containers * 2) get env from containers * 3) create serviceAccount as needed * 4) modify podTempSpec inject kubevpn container
func (*DuplicateOptions) InitClient ¶ added in v1.1.27
func (d *DuplicateOptions) InitClient(f cmdutil.Factory) (err error)