Documentation ¶
Index ¶
- func ClearEnv(ctx context.Context) error
- func ClearSingleClusterEnv(ctx context.Context) error
- type Env
- type KubeContext
- func (k *KubeContext) CreateNamespace(ctx context.Context, ns string)
- func (k *KubeContext) Curl(ctx context.Context, ns, fromDeployment, fromContainer, url string) string
- func (k *KubeContext) DeleteNamespace(ctx context.Context, ns string)
- func (k *KubeContext) DeployBookInfo(ctx context.Context, ns string)
- func (k *KubeContext) DisableContainer(ctx context.Context, ns string, deploymentName string, containerName string)
- func (k *KubeContext) EnableContainer(ctx context.Context, ns string, deploymentName string)
- func (k *KubeContext) GetPod(ctx context.Context, ns, app string) *Pod
- func (k *KubeContext) LabelNamespace(ctx context.Context, ns, label string)
- func (k *KubeContext) SetDeploymentEnvVars(ctx context.Context, ns string, deploymentName string, containerName string, ...)
- func (k *KubeContext) WaitForRollout(ctx context.Context, ns, deployment string)
- type Pod
- type SingleClusterEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearSingleClusterEnv ¶
Types ¶
type KubeContext ¶
type KubeContext struct { Context string Config *rest.Config Clientset *kubernetes.Clientset TrafficPolicyClient networkingv1.TrafficPolicyClient MeshClient discoveryv1.MeshClient DestinationClient discoveryv1.DestinationClient WorkloadClient discoveryv1.WorkloadClient SecretClient kubernetes_core.SecretClient VirtualMeshClient networkingv1.VirtualMeshClient DestinationRuleClient istionetworkingv1alpha3.DestinationRuleClient VirtualServiceClient istionetworkingv1alpha3.VirtualServiceClient ServiceEntryClient istionetworkingv1alpha3.ServiceEntryClient AccessLogRecordClient observabilityv1.AccessLogRecordClient IssuedCertificateClient certificatesv1.IssuedCertificateClient }
func NewKubeContext ¶
func NewKubeContext(kubecontext string) KubeContext
If kubecontext is empty string, use current context.
func (*KubeContext) CreateNamespace ¶
func (k *KubeContext) CreateNamespace(ctx context.Context, ns string)
func (*KubeContext) Curl ¶
func (k *KubeContext) Curl(ctx context.Context, ns, fromDeployment, fromContainer, url string) string
func (*KubeContext) DeleteNamespace ¶
func (k *KubeContext) DeleteNamespace(ctx context.Context, ns string)
func (*KubeContext) DeployBookInfo ¶
func (k *KubeContext) DeployBookInfo(ctx context.Context, ns string)
func (*KubeContext) DisableContainer ¶
func (k *KubeContext) DisableContainer( ctx context.Context, ns string, deploymentName string, containerName string, )
Modify the deployment's container entrypoint command to "sleep 20h" to disable the application.
func (*KubeContext) EnableContainer ¶
func (k *KubeContext) EnableContainer( ctx context.Context, ns string, deploymentName string, )
Remove the sleep command to re-enable the application container.
func (*KubeContext) LabelNamespace ¶
func (k *KubeContext) LabelNamespace(ctx context.Context, ns, label string)
func (*KubeContext) SetDeploymentEnvVars ¶
func (*KubeContext) WaitForRollout ¶
func (k *KubeContext) WaitForRollout(ctx context.Context, ns, deployment string)
type Pod ¶
type Pod struct { corev1.Pod Cluster *KubeContext }
type SingleClusterEnv ¶
type SingleClusterEnv struct {
Management KubeContext
}
func GetSingleClusterEnv ¶
func GetSingleClusterEnv() SingleClusterEnv
func StartSingleClusterEnv ¶
func StartSingleClusterEnv(ctx context.Context) SingleClusterEnv
func StartSingleClusterEnvOnce ¶
func StartSingleClusterEnvOnce(ctx context.Context) SingleClusterEnv
func (SingleClusterEnv) DumpState ¶
func (s SingleClusterEnv) DumpState()
Click to show internal directories.
Click to hide internal directories.