Documentation ¶
Index ¶
- Variables
- func ConvertVolume(cw ClientWrapper, resourceNamespace, resourceName string, ...) (err error)
- func GetKubeconfig() (*rest.Config, error)
- func WaitFor(condition wait.ConditionFunc) error
- type ClientWrapper
- func (cw *ClientWrapper) AddTempPVC(patcher Patcher, namespace, chartName, pvcName, volumeSize string) (string, error)
- func (cw *ClientWrapper) CleanupMigrationObjects() error
- func (cw *ClientWrapper) CreateJob(namespace string, job *batchv1.Job) (string, error)
- func (cw *ClientWrapper) CreateMigrationNamespaceAndServiceAccount() error
- func (cw *ClientWrapper) CreateNamespace(name string) error
- func (cw *ClientWrapper) CreateServiceAccount(namespace, name string) error
- func (cw *ClientWrapper) DeleteCRB(name string) error
- func (cw *ClientWrapper) DeleteNamespace(name string) error
- func (cw *ClientWrapper) DeletePVC(namespace, name string) error
- func (cw *ClientWrapper) GetNamespaces() ([]corev1.Namespace, error)
- func (cw *ClientWrapper) GetPVByName(name string) (*corev1.PersistentVolume, error)
- func (cw *ClientWrapper) GetPVCByName(namespace, name string) (*corev1.PersistentVolumeClaim, error)
- func (cw *ClientWrapper) GetPVCsByResourceName(namespace, name string) ([]corev1.PersistentVolumeClaim, error)
- func (cw *ClientWrapper) GetPodByName(namespace, name string) (corev1.Pod, error)
- func (cw *ClientWrapper) GetResourceList(namespace string, resource schema.GroupVersionResource) ([]unstructured.Unstructured, error)
- func (cw *ClientWrapper) IsJobFinished(namespace, name string) wait.ConditionFunc
- func (cw *ClientWrapper) IsPVCBound(namespace, pvcName string) wait.ConditionFunc
- func (cw *ClientWrapper) IsPodReady(namespace, name string) wait.ConditionFunc
- func (cw *ClientWrapper) MigrateJob(namespace, fromPVC, toPVC string) (string, error)
- func (cw *ClientWrapper) ScaleDeployment(namespace, name string, replicas int) error
- func (cw *ClientWrapper) UnbindTempPVC(patcher Patcher, namespace, chartName, pvcName string) error
- func (cw *ClientWrapper) UpdateOriginalPVC(patcher Patcher, namespace, chartName, pvcName string) error
- type HelmChartPatcher
- type HelmReleasePatcher
- type Patcher
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HelmChartResource = schema.GroupVersionResource{ Group: "helm.cattle.io", Version: "v1", Resource: "helmcharts", } FluxHelmReleaseResource = schema.GroupVersionResource{ Group: "helm.toolkit.fluxcd.io", Version: "v2beta1", Resource: "helmreleases", } )
Functions ¶
func ConvertVolume ¶ added in v0.0.3
func ConvertVolume(cw ClientWrapper, resourceNamespace, resourceName string, volume *corev1.PersistentVolume, patcher Patcher) (err error)
func GetKubeconfig ¶ added in v0.0.3
func WaitFor ¶
func WaitFor(condition wait.ConditionFunc) error
Types ¶
type ClientWrapper ¶
type ClientWrapper struct {
// contains filtered or unexported fields
}
func GetClientWrapper ¶
func GetClientWrapper(config *rest.Config) ClientWrapper
func (*ClientWrapper) AddTempPVC ¶
func (cw *ClientWrapper) AddTempPVC(patcher Patcher, namespace, chartName, pvcName, volumeSize string) (string, error)
func (*ClientWrapper) CleanupMigrationObjects ¶ added in v0.0.3
func (cw *ClientWrapper) CleanupMigrationObjects() error
func (*ClientWrapper) CreateMigrationNamespaceAndServiceAccount ¶ added in v0.0.3
func (cw *ClientWrapper) CreateMigrationNamespaceAndServiceAccount() error
func (*ClientWrapper) CreateNamespace ¶
func (cw *ClientWrapper) CreateNamespace(name string) error
func (*ClientWrapper) CreateServiceAccount ¶
func (cw *ClientWrapper) CreateServiceAccount(namespace, name string) error
func (*ClientWrapper) DeleteCRB ¶
func (cw *ClientWrapper) DeleteCRB(name string) error
func (*ClientWrapper) DeleteNamespace ¶
func (cw *ClientWrapper) DeleteNamespace(name string) error
func (*ClientWrapper) DeletePVC ¶
func (cw *ClientWrapper) DeletePVC(namespace, name string) error
func (*ClientWrapper) GetNamespaces ¶
func (cw *ClientWrapper) GetNamespaces() ([]corev1.Namespace, error)
func (*ClientWrapper) GetPVByName ¶ added in v0.0.3
func (cw *ClientWrapper) GetPVByName(name string) (*corev1.PersistentVolume, error)
func (*ClientWrapper) GetPVCByName ¶ added in v0.0.3
func (cw *ClientWrapper) GetPVCByName(namespace, name string) (*corev1.PersistentVolumeClaim, error)
func (*ClientWrapper) GetPVCsByResourceName ¶ added in v0.0.3
func (cw *ClientWrapper) GetPVCsByResourceName(namespace, name string) ([]corev1.PersistentVolumeClaim, error)
func (*ClientWrapper) GetPodByName ¶
func (cw *ClientWrapper) GetPodByName(namespace, name string) (corev1.Pod, error)
func (*ClientWrapper) GetResourceList ¶
func (cw *ClientWrapper) GetResourceList(namespace string, resource schema.GroupVersionResource) ([]unstructured.Unstructured, error)
func (*ClientWrapper) IsJobFinished ¶
func (cw *ClientWrapper) IsJobFinished(namespace, name string) wait.ConditionFunc
func (*ClientWrapper) IsPVCBound ¶
func (cw *ClientWrapper) IsPVCBound(namespace, pvcName string) wait.ConditionFunc
func (*ClientWrapper) IsPodReady ¶
func (cw *ClientWrapper) IsPodReady(namespace, name string) wait.ConditionFunc
func (*ClientWrapper) MigrateJob ¶
func (cw *ClientWrapper) MigrateJob(namespace, fromPVC, toPVC string) (string, error)
TODO need -d on second write? https://github.com/utkuozdemir/pv-migrate/blob/master/USAGE.md
func (*ClientWrapper) ScaleDeployment ¶
func (cw *ClientWrapper) ScaleDeployment(namespace, name string, replicas int) error
func (*ClientWrapper) UnbindTempPVC ¶
func (cw *ClientWrapper) UnbindTempPVC(patcher Patcher, namespace, chartName, pvcName string) error
func (*ClientWrapper) UpdateOriginalPVC ¶
func (cw *ClientWrapper) UpdateOriginalPVC(patcher Patcher, namespace, chartName, pvcName string) error
type HelmChartPatcher ¶
type HelmChartPatcher struct{}
func (HelmChartPatcher) GetNamespacePath ¶ added in v0.0.3
func (hcp HelmChartPatcher) GetNamespacePath() []string
type HelmReleasePatcher ¶
type HelmReleasePatcher struct{}
func (HelmReleasePatcher) GetNamespacePath ¶ added in v0.0.3
func (hrp HelmReleasePatcher) GetNamespacePath() []string
Click to show internal directories.
Click to hide internal directories.