Documentation ¶
Index ¶
- Constants
- func ApplyCRDs(boilerplatePath, path string, k8sClient ClientInt) error
- func EnsureBoomArtifacts(monitor mntr.Monitor, apiLabels *labels.API, client ClientInt, version string, ...) error
- func EnsureCaosSystemNamespace(monitor mntr.Monitor, client ClientInt) error
- func EnsureNetworkingArtifacts(monitor mntr.Monitor, apiLabels *labels.API, client ClientInt, version string, ...) error
- func EnsureOrbconfigSecret(monitor mntr.Monitor, client ClientInt, orbconfig []byte) error
- func EnsureOrbiterArtifacts(monitor mntr.Monitor, apiLabels *labels.API, client *Client, pprof bool, ...) error
- func GetCRDs(boilerplatePath, path string) ([]string, error)
- func WriteCRDs(boilerplatePath, path, destinationFolder string) error
- type Client
- func (c *Client) ApplyCRDResource(crd *unstructured.Unstructured) error
- func (c *Client) ApplyClusterRole(rsc *rbac.ClusterRole) error
- func (c *Client) ApplyClusterRoleBinding(rsc *rbac.ClusterRoleBinding) error
- func (c *Client) ApplyConfigmap(rsc *core.ConfigMap) error
- func (c *Client) ApplyCronJob(rsc *v1beta1.CronJob) error
- func (c *Client) ApplyDeployment(rsc *apps.Deployment, force bool) error
- func (c *Client) ApplyIngress(rsc *extensions.Ingress) error
- func (c *Client) ApplyJob(rsc *batch.Job) error
- func (c *Client) ApplyJobDryRun(rsc *batch.Job) error
- func (c *Client) ApplyNamespace(rsc *core.Namespace) error
- func (c *Client) ApplyNamespacedCRDResource(group, version, kind, namespace, name string, crd *unstructured.Unstructured) error
- func (c *Client) ApplyPlainYAML(monitor mntr.Monitor, data []byte) error
- func (c *Client) ApplyPodDisruptionBudget(rsc *policy.PodDisruptionBudget) error
- func (c *Client) ApplyRole(rsc *rbac.Role) error
- func (c *Client) ApplyRoleBinding(rsc *rbac.RoleBinding) error
- func (c *Client) ApplySecret(rsc *core.Secret) error
- func (c *Client) ApplyService(rsc *core.Service) error
- func (c *Client) ApplyServiceAccount(rsc *core.ServiceAccount) error
- func (c *Client) ApplyStatefulSet(rsc *apps.StatefulSet, force bool) error
- func (c *Client) CheckCRD(name string) (*apixv1beta1.CustomResourceDefinition, bool, error)
- func (c *Client) DeleteCRDResource(group, version, kind, name string) error
- func (c *Client) DeleteClusterRole(name string) error
- func (c *Client) DeleteClusterRoleBinding(name string) error
- func (c *Client) DeleteConfigmap(namespace, name string) error
- func (c *Client) DeleteCronJob(namespace string, name string) error
- func (c *Client) DeleteDeployment(namespace, name string) error
- func (c *Client) DeleteIngress(namespace, name string) error
- func (c *Client) DeleteJob(namespace string, name string) error
- func (c *Client) DeleteNamespace(name string) error
- func (c *Client) DeleteNamespacedCRDResource(group, version, kind, namespace, name string) error
- func (c *Client) DeleteNode(name string) error
- func (c *Client) DeletePersistentVolumeClaim(namespace, name string, timeout time.Duration) error
- func (c *Client) DeletePod(namespace, name string) error
- func (c *Client) DeletePodDisruptionBudget(namespace string, name string) error
- func (c *Client) DeletePodsByLabels(namespace string, labels map[string]string) error
- func (c *Client) DeleteRole(namespace, name string) error
- func (c *Client) DeleteRoleBinding(namespace, name string) error
- func (c *Client) DeleteSecret(namespace, name string) error
- func (c *Client) DeleteService(namespace, name string) error
- func (c *Client) DeleteServiceAccount(namespace, name string) error
- func (c *Client) DeleteStatefulset(namespace, name string) error
- func (c *Client) Drain(machine Machine, node *core.Node, reason DrainReason, self bool) (err error)
- func (c *Client) ExecInPod(namespace, name, container, command string) error
- func (c *Client) ExecInPodOfDeployment(namespace, name, container, command string) error
- func (c *Client) ExecInPodWithOutput(namespace, name, container, command string) (string, error)
- func (c *Client) GetConfigMap(namespace, name string) (*core.ConfigMap, error)
- func (c *Client) GetDeployment(namespace, name string) (*apps.Deployment, error)
- func (c *Client) GetJob(namespace, name string) (*batch.Job, error)
- func (c *Client) GetNamespacedCRDResource(group, version, kind, namespace, name string) (*unstructured.Unstructured, error)
- func (c *Client) GetNode(id string) (node *core.Node, err error)
- func (c *Client) GetSecret(namespace string, name string) (*core.Secret, error)
- func (c *Client) ListCronJobs(namespace string, labels map[string]string) (*batchv1beta1.CronJobList, error)
- func (c *Client) ListNamespaces() (*core.NamespaceList, error)
- func (c *Client) ListNodes(filterID ...string) (nodes []core.Node, err error)
- func (c *Client) ListPersistentVolumeClaims(namespace string) (*core.PersistentVolumeClaimList, error)
- func (c *Client) ListPersistentVolumes() (*core.PersistentVolumeList, error)
- func (c *Client) ListPods(namespace string, labels map[string]string) (*core.PodList, error)
- func (c *Client) ListSecrets(namespace string, labels map[string]string) (*core.SecretList, error)
- func (c *Client) PatchDeployment(namespace, name string, data string) error
- func (c *Client) RemoveFromTaints(taints []core.Taint, reason DrainReason) (result []core.Taint)
- func (c *Client) ScaleDeployment(namespace, name string, replicaCount int) error
- func (c *Client) ScaleStatefulset(namespace, name string, replicaCount int) error
- func (c *Client) Tainted(node *core.Node, reason DrainReason) bool
- func (c *Client) UpdateNode(node *core.Node) (err error)
- func (c *Client) WaitForConfigMap(namespace string, name string, timeout time.Duration) error
- func (c *Client) WaitForSecret(namespace string, name string, timeout time.Duration) error
- func (c *Client) WaitUntilDeploymentReady(namespace string, name string, containerCheck, readyCheck bool, ...) error
- func (c *Client) WaitUntilJobCompleted(namespace string, name string, timeout time.Duration) error
- func (c *Client) WaitUntilStatefulsetIsReady(namespace string, name string, containerCheck, readyCheck bool, ...) error
- type ClientInt
- type DrainReason
- type File
- type IDFunc
- type Machine
- type NodeWithKubeadm
Constants ¶
View Source
const TaintKeyPrefix = "node.orbos.ch/"
Variables ¶
This section is empty.
Functions ¶
func EnsureBoomArtifacts ¶
func EnsureOrbconfigSecret ¶
func EnsureOrbiterArtifacts ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewK8sClient ¶
func NewK8sClientWithConfig ¶
func (*Client) ApplyCRDResource ¶
func (c *Client) ApplyCRDResource(crd *unstructured.Unstructured) error
func (*Client) ApplyClusterRole ¶
func (c *Client) ApplyClusterRole(rsc *rbac.ClusterRole) error
func (*Client) ApplyClusterRoleBinding ¶
func (c *Client) ApplyClusterRoleBinding(rsc *rbac.ClusterRoleBinding) error
func (*Client) ApplyDeployment ¶
func (c *Client) ApplyDeployment(rsc *apps.Deployment, force bool) error
func (*Client) ApplyIngress ¶
func (c *Client) ApplyIngress(rsc *extensions.Ingress) error
func (*Client) ApplyNamespacedCRDResource ¶
func (c *Client) ApplyNamespacedCRDResource(group, version, kind, namespace, name string, crd *unstructured.Unstructured) error
func (*Client) ApplyPlainYAML ¶
func (*Client) ApplyPodDisruptionBudget ¶
func (c *Client) ApplyPodDisruptionBudget(rsc *policy.PodDisruptionBudget) error
func (*Client) ApplyRoleBinding ¶
func (c *Client) ApplyRoleBinding(rsc *rbac.RoleBinding) error
func (*Client) ApplyServiceAccount ¶
func (c *Client) ApplyServiceAccount(rsc *core.ServiceAccount) error
func (*Client) ApplyStatefulSet ¶
func (c *Client) ApplyStatefulSet(rsc *apps.StatefulSet, force bool) error
func (*Client) CheckCRD ¶
func (c *Client) CheckCRD(name string) (*apixv1beta1.CustomResourceDefinition, bool, error)
func (*Client) DeleteCRDResource ¶
func (*Client) DeleteClusterRole ¶
func (*Client) DeleteClusterRoleBinding ¶
func (*Client) DeleteConfigmap ¶
func (*Client) DeleteDeployment ¶
func (*Client) DeleteIngress ¶
func (*Client) DeleteNamespace ¶
func (*Client) DeleteNamespacedCRDResource ¶
func (*Client) DeleteNode ¶
func (*Client) DeletePersistentVolumeClaim ¶
func (*Client) DeletePodDisruptionBudget ¶
func (*Client) DeletePodsByLabels ¶
func (*Client) DeleteRole ¶
func (*Client) DeleteRoleBinding ¶
func (*Client) DeleteSecret ¶
func (*Client) DeleteService ¶
func (*Client) DeleteServiceAccount ¶
func (*Client) DeleteStatefulset ¶
func (*Client) ExecInPodOfDeployment ¶
func (*Client) ExecInPodWithOutput ¶
func (*Client) GetConfigMap ¶
func (*Client) GetDeployment ¶
func (c *Client) GetDeployment(namespace, name string) (*apps.Deployment, error)
func (*Client) GetNamespacedCRDResource ¶
func (c *Client) GetNamespacedCRDResource(group, version, kind, namespace, name string) (*unstructured.Unstructured, error)
func (*Client) ListCronJobs ¶
func (c *Client) ListCronJobs(namespace string, labels map[string]string) (*batchv1beta1.CronJobList, error)
func (*Client) ListNamespaces ¶
func (c *Client) ListNamespaces() (*core.NamespaceList, error)
func (*Client) ListPersistentVolumeClaims ¶
func (c *Client) ListPersistentVolumeClaims(namespace string) (*core.PersistentVolumeClaimList, error)
func (*Client) ListPersistentVolumes ¶
func (c *Client) ListPersistentVolumes() (*core.PersistentVolumeList, error)
func (*Client) ListSecrets ¶
func (*Client) PatchDeployment ¶
func (*Client) RemoveFromTaints ¶
func (*Client) ScaleDeployment ¶
func (*Client) ScaleStatefulset ¶
func (*Client) WaitForConfigMap ¶
func (*Client) WaitForSecret ¶
func (*Client) WaitUntilDeploymentReady ¶
func (*Client) WaitUntilJobCompleted ¶
type ClientInt ¶
type ClientInt interface { ApplyService(rsc *core.Service) error DeleteService(namespace, name string) error GetJob(namespace, name string) (*batch.Job, error) ApplyJob(rsc *batch.Job) error ApplyJobDryRun(rsc *batch.Job) error DeleteJob(namespace string, name string) error WaitUntilJobCompleted(namespace string, name string, timeout time.Duration) error ApplyServiceAccount(rsc *core.ServiceAccount) error DeleteServiceAccount(namespace, name string) error ApplyStatefulSet(rsc *apps.StatefulSet, force bool) error DeleteStatefulset(namespace, name string) error ScaleStatefulset(namespace, name string, replicaCount int) error WaitUntilStatefulsetIsReady(namespace string, name string, containerCheck, readyCheck bool, timeout time.Duration) error ExecInPodWithOutput(namespace, name, container, command string) (string, error) ExecInPod(namespace, name, container, command string) error GetDeployment(namespace, name string) (*apps.Deployment, error) ApplyDeployment(rsc *apps.Deployment, force bool) error DeleteDeployment(namespace, name string) error PatchDeployment(namespace, name string, data string) error WaitUntilDeploymentReady(namespace string, name string, containerCheck, readyCheck bool, timeout time.Duration) error ScaleDeployment(namespace, name string, replicaCount int) error ExecInPodOfDeployment(namespace, name, container, command string) error CheckCRD(name string) (*apixv1beta1.CustomResourceDefinition, bool, error) GetNamespacedCRDResource(group, version, kind, namespace, name string) (*unstructured.Unstructured, error) ApplyNamespacedCRDResource(group, version, kind, namespace, name string, crd *unstructured.Unstructured) error DeleteNamespacedCRDResource(group, version, kind, namespace, name string) error ApplyCRDResource(crd *unstructured.Unstructured) error DeleteCRDResource(group, version, kind, name string) error ApplyCronJob(rsc *v1beta1.CronJob) error DeleteCronJob(namespace string, name string) error ListCronJobs(namespace string, labels map[string]string) (*batchv1beta1.CronJobList, error) ListSecrets(namespace string, labels map[string]string) (*core.SecretList, error) GetSecret(namespace string, name string) (*core.Secret, error) ApplySecret(rsc *core.Secret) error DeleteSecret(namespace, name string) error WaitForSecret(namespace string, name string, timeout time.Duration) error GetConfigMap(namespace, name string) (*core.ConfigMap, error) ApplyConfigmap(rsc *core.ConfigMap) error DeleteConfigmap(namespace, name string) error WaitForConfigMap(namespace string, name string, timeout time.Duration) error ApplyRole(rsc *rbac.Role) error DeleteRole(namespace, name string) error ApplyClusterRole(rsc *rbac.ClusterRole) error DeleteClusterRole(name string) error ApplyIngress(rsc *extensions.Ingress) error DeleteIngress(namespace, name string) error ApplyRoleBinding(rsc *rbac.RoleBinding) error DeleteRoleBinding(namespace, name string) error ApplyClusterRoleBinding(rsc *rbac.ClusterRoleBinding) error DeleteClusterRoleBinding(name string) error ApplyPodDisruptionBudget(rsc *policy.PodDisruptionBudget) error DeletePodDisruptionBudget(namespace string, name string) error ApplyNamespace(rsc *core.Namespace) error DeleteNamespace(name string) error ListPersistentVolumes() (*core.PersistentVolumeList, error) ApplyPlainYAML(mntr.Monitor, []byte) error ListPersistentVolumeClaims(namespace string) (*core.PersistentVolumeClaimList, error) DeletePersistentVolumeClaim(namespace, name string, timeout time.Duration) error }
type DrainReason ¶
type DrainReason int
const ( Updating DrainReason = iota Rebooting Deleting )
func (DrainReason) String ¶
func (i DrainReason) String() string
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package kubernetesmock is a generated GoMock package.
|
Package kubernetesmock is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.