Versions in this module Expand all Collapse all v0 v0.0.1 Nov 18, 2024 Changes in this version + const AppLabel + const JobFinalizedTimeout + const K8sStatePollInterval + const TempDebugManifest + func ExecCmd(command string) error + func ExecCmdWithOptions(command string, outputFunction func(string)) error + func GetLocalK8sDeps() (*kubernetes.Clientset, *rest.Config, error) + type Chaos struct + Client *K8sClient + Namespace string + ResourceByName map[string]string + func NewChaos(client *K8sClient, namespace string) *Chaos + func (c *Chaos) Run(app cdk8s.App, id string, resource string) (string, error) + func (c *Chaos) Stop(id string) error + func (c *Chaos) WaitForAllRecovered(id string) error + type ChaosState struct + ChaosDetails v1alpha1.ChaosStatus + type ConnectionInfo struct + Host string + Ports portforward.ForwardedPort + type ConnectionMode int + const LocalConnection + const RemoteConnection + type Forwarder struct + Client *K8sClient + Info map[string]interface{} + KeepConnection bool + func NewForwarder(client *K8sClient, keepConnection bool) *Forwarder + func (m *Forwarder) Connect(namespaceName string, selector string, insideK8s bool) error + func (m *Forwarder) FindPort(ks ...string) *URLConverter + func (m *Forwarder) PrintLocalPorts() + type K8sClient struct + ClientSet *kubernetes.Clientset + RESTConfig *rest.Config + func NewK8sClient() *K8sClient + func (m *K8sClient) AddLabel(namespace string, selector string, label string) error + func (m *K8sClient) AddPodAnnotation(namespace string, pod v1.Pod, key, value string) error + func (m *K8sClient) AddPodLabel(namespace string, pod v1.Pod, key, value string) error + func (m *K8sClient) AddPodsAnnotations(namespace, labelSelector string, annotations map[string]string) error + func (m *K8sClient) Apply(manifest string) error + func (m *K8sClient) CopyToPod(namespace, src, destination, containername string) (*bytes.Buffer, *bytes.Buffer, *bytes.Buffer, error) + func (m *K8sClient) Create(manifest string) error + func (m *K8sClient) DeleteResource(namespace string, resource string, instance string) error + func (m *K8sClient) DryRun(manifest string) error + func (m *K8sClient) EnumerateInstances(namespace string, selector string) error + func (m *K8sClient) ExecuteInPod(namespace, podName, containerName string, command []string) ([]byte, []byte, error) + func (m *K8sClient) LabelChaosGroup(namespace string, startInstance int, endInstance int, group string) error + func (m *K8sClient) LabelChaosGroupByLabels(namespace string, labels map[string]string, group string) error + func (m *K8sClient) ListNamespaces(selector string) (*v1.NamespaceList, error) + func (m *K8sClient) ListPods(namespace, selector string) (*v1.PodList, error) + func (m *K8sClient) NamespaceExists(namespace string) bool + func (m *K8sClient) RemoveNamespace(namespace string) error + func (m *K8sClient) RolloutRestartBySelector(namespace string, resource string, selector string) error + func (m *K8sClient) RolloutStatefulSets(namespace string) error + func (m *K8sClient) UniqueLabels(namespace string, selector string) ([]string, error) + func (m *K8sClient) WaitForJob(namespaceName string, jobName string, fundReturnStatus func(string)) error + func (m *K8sClient) WaitPodsReady(ns string, rcd *ReadyCheckData, expectedPodCount int) error + type Protocol int + const HTTP + const HTTPS + const POSTGRESQL + const WS + const WSS + const WSSUFFIX + type ReadyCheckData struct + ReadinessProbeCheckSelector string + Timeout time.Duration + type URLConverter struct + func NewURLConverter(fp ConnectionInfo, err error) *URLConverter + func (m *URLConverter) As(conn ConnectionMode, proto Protocol) (string, error)