Documentation ¶
Index ¶
- Constants
- func AddManagementKubeconfigFlags(kubeconfig, kubecontext *string, flags *pflag.FlagSet)
- func AddOutputFlag(cmd *cobra.Command, format *string)
- func BuildClient(kubeConfigPath, kubeContext string) (client.Client, error)
- func EnsureNamespace(ctx context.Context, kubeClient client.Client, namespace string) error
- func GetGlooMeshVersion(ctx context.Context, kubeConfigPath, kubeContext, namespace string) (string, error)
- func MarshalProtoWithFormat(msg proto.Message, format string) (string, error)
- func PortForwardFromDeployment(ctx context.Context, kubeConfig string, kubeContext string, deployName string, ...) (chan struct{}, string, error)
- func PortForwardFromPod(kubeConfig string, kubeContext string, podName string, podNamespace string, ...) (chan struct{}, string, error)
- type GlobalFlags
Constants ¶
const ( Yaml = "yaml" Json = "json" )
Variables ¶
This section is empty.
Functions ¶
func AddManagementKubeconfigFlags ¶
Set kubeconfig path and context flags for the management cluster.
func AddOutputFlag ¶ added in v0.12.7
augment the input cobra command with a flag specifying the output format, also add pre-run validation that the format string is valid
func EnsureNamespace ¶ added in v1.0.0
func GetGlooMeshVersion ¶ added in v1.0.0
func MarshalProtoWithFormat ¶ added in v0.12.7
marshal a proto message with the given format
func PortForwardFromDeployment ¶ added in v0.12.7
func PortForwardFromDeployment( ctx context.Context, kubeConfig string, kubeContext string, deployName string, deployNamespace string, localPort string, remotePort string, logger *logrus.Logger, ) (chan struct{}, string, error)
Open a port-forward against the specified deployment. Returns the stop channel and the local port. If localPort is unspecified, a free port will be chosen at random. Close the port forward by closing the returned channel.
func PortForwardFromPod ¶ added in v0.12.7
func PortForwardFromPod( kubeConfig string, kubeContext string, podName string, podNamespace string, localPort string, remotePort string, logger *logrus.Logger, ) (chan struct{}, string, error)
Open a port forward against the specified pod. Returns the stop channel and the local port. If localPort is unspecified, a free port will be chosen at random. Close the port forward by closing the returned channel.
Types ¶
type GlobalFlags ¶ added in v0.10.6
type GlobalFlags struct {
Verbose bool
}
func (*GlobalFlags) AddToFlags ¶ added in v0.10.6
func (g *GlobalFlags) AddToFlags(flags *pflag.FlagSet)