k8s

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2019 The Fossul Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVirtualMachineDisk

func AddVirtualMachineDisk(namespace, accessWithinCluster, diskName, pvcName string) error

func CreateBackupCustomResource

func CreateBackupCustomResource(accessWithinCluster, namespace, crName, profileName, configName, policyName string) error

func CreatePersistentVolumeClaimFromSnapshot

func CreatePersistentVolumeClaimFromSnapshot(pvcName, pvcSize, snapshotName, namespace, storageClassName, accessWithinCluster string) error

func CreatePersistentVolumeClaimFromSnapshotWithModes

func CreatePersistentVolumeClaimFromSnapshotWithModes(pvcName, pvcSize, snapshotName, namespace, storageClassName, accessWithinCluster string, accessModes []v1.PersistentVolumeAccessMode, volumeMode *v1.PersistentVolumeMode) error

func CreateSnapshot

func CreateSnapshot(snapshotName, namespace, snapshotClassName, pvcName, accessWithinCluster string, t int) error

func CreateVirtualMachineSnapshot

func CreateVirtualMachineSnapshot(namespace, accessWithinCluster, vmName string) error

func DeleteBackupCustomResource

func DeleteBackupCustomResource(accessWithinCluster, namespace, crName string) error

func DeletePersistentVolumeClaim

func DeletePersistentVolumeClaim(pvcName, namespace, accessWithinCluster string, timeoutSeconds int) error

func DeleteSnapshot

func DeleteSnapshot(name, namespace, accessWithinCluster string) error

func DeleteVirtualMachineDisk

func DeleteVirtualMachineDisk(namespace, accessWithinCluster, diskName string) error

func DeleteVirtualMachineSnapshot

func DeleteVirtualMachineSnapshot(namespace, accessWithinCluster, snapshotName string) error

func ExecuteCommand

func ExecuteCommand(podName, containerName, namespace, accessWithinCluster string, args ...string) util.Result

func ExecuteCommandWithStdout

func ExecuteCommandWithStdout(podName, containerName, namespace, accessWithinCluster string, args ...string) (util.Result, string)

func FreezeVirtualMachine

func FreezeVirtualMachine(namespace, accessWithinCluster, vmName string, unfreezeTimeout time.Duration) error

func GeneratePersistentVolumeClaimVolumeName

func GeneratePersistentVolumeClaimVolumeName(pvcName string) *v1.PersistentVolumeClaimVolumeSource

func GetBackupCustomResource

func GetBackupCustomResource(accessWithinCluster, namespace, crName string) (*unstructured.Unstructured, error)

func GetDeployment

func GetDeployment(namespace, deploymentName, accessWithinCluster string) (*apps.Deployment, error)

func GetDeploymentConfig

func GetDeploymentConfig(namespace, deploymentConfigName, accessWithinCluster string) (*apps.DeploymentConfig, error)

func GetDeploymentConfigScaleInteger

func GetDeploymentConfigScaleInteger(namespace, deploymentConfigName, accessWithinCluster string) (int32, error)

func GetDeploymentScaleInteger

func GetDeploymentScaleInteger(namespace, deploymentName, accessWithinCluster string) (*int32, error)

func GetGlusterVolumePath

func GetGlusterVolumePath(pvName, accessWithinCluster string) (string, error)

func GetOwner

func GetOwner(namespace, service, accessWithinCluster string) (string, string, error)

func GetPersistentVolume

func GetPersistentVolume(pvName, accessWithinCluster string) (*v1.PersistentVolume, error)

func GetPersistentVolumeClaim

func GetPersistentVolumeClaim(namespace, pvcName, accessWithinCluster string) (*v1.PersistentVolumeClaim, error)

func GetPersistentVolumeName

func GetPersistentVolumeName(namespace, pvcName, accessWithinCluster string) (string, error)

func GetPod

func GetPod(podName, namespace, accessWithinCluster string) (*v1.Pod, error)

func GetPodByName

func GetPodByName(namespace, podName, accessWithinCluster string) (string, error)

func GetPodContainer

func GetPodContainer(podName, namespace, accessWithinCluster string) (string, error)

func GetPodIp

func GetPodIp(namespace, podName, accessWithinCluster string) (string, error)

func GetPodName

func GetPodName(namespace, podSelector, accessWithinCluster string) (string, error)

func GetReplicationController

func GetReplicationController(rcName, namespace, accessWithinCluster string) (*v1.ReplicationController, error)

func GetSnapshot

func GetSnapshot(name, namespace, accessWithinCluster string) (*snapshotv1.VolumeSnapshot, error)

func GetSnapshotHandle

func GetSnapshotHandle(contentName *string, namespace string, accessWithinCluster string) (string, error)

func GetStorageClassProvisionerName

func GetStorageClassProvisionerName(storageClassName, accessWithinCluster string) (string, error)

func GetVirtualMachine

func GetVirtualMachine(namespace, accessWithinCluster, vmName string) (*virtv1.VirtualMachine, error)

func GetVolumeSnapshotClassName

func GetVolumeSnapshotClassName(storageDriverName, accessWithinCluster string) (string, error)

func IsRemoteCommand

func IsRemoteCommand(arg string) bool

func ListBackupCustomResources

func ListBackupCustomResources(accessWithinCluster, namespace string) (*unstructured.UnstructuredList, error)

func ListPersistentVolumeClaims

func ListPersistentVolumeClaims(namespace, accessWithinCluster string) (*v1.PersistentVolumeClaimList, error)

func ListSnapshots

func ListSnapshots(namespace, accessWithinCluster string) (*snapshotv1.VolumeSnapshotList, error)

func ListVirtualMachineSnapshots

func ListVirtualMachineSnapshots(namespace, accessWithinCluster, vmName string) (*snapshotv1.VirtualMachineSnapshotList, error)

func ListVirtualMachines

func ListVirtualMachines(namespace, accessWithinCluster string) (*virtv1.VirtualMachineInstanceList, error)

func PauseVirtualMachine

func PauseVirtualMachine(namespace, accessWithinCluster, vmName string, unfreezeTimeout time.Duration) error

func ScaleDownDeployment

func ScaleDownDeployment(namespace, deploymentConfigName, accessWithinCluster string, size int32, t int) error

func ScaleDownDeploymentConfig

func ScaleDownDeploymentConfig(namespace, deploymentConfigName, accessWithinCluster string, size int32, t int) error

func ScaleUpDeployment

func ScaleUpDeployment(namespace, deploymentConfigName, accessWithinCluster string, size int32, t int) error

func ScaleUpDeploymentConfig

func ScaleUpDeploymentConfig(namespace, deploymentConfigName, accessWithinCluster string, size int32, t int) error

func StartVirtualMachine

func StartVirtualMachine(namespace, accessWithinCluster, vmName string) error

func StopVirtualMachine

func StopVirtualMachine(namespace, accessWithinCluster, vmName string) error

func UnFreezeVirtualMachine

func UnFreezeVirtualMachine(namespace, accessWithinCluster, vmName string, unfreezeTimeout time.Duration) error

func UnPauseVirtualMachine

func UnPauseVirtualMachine(namespace, accessWithinCluster, vmName string, unfreezeTimeout time.Duration) error

func UpdateBackupCustomResource

func UpdateBackupCustomResource(accessWithinCluster, namespace, crName, op, specKey, specValue string) error

func UpdateDeploymentConfigVolume

func UpdateDeploymentConfigVolume(pvcName, restorePvcName, namespace, deploymentConfigName, accessWithinCluster string) error

func UpdateDeploymentVolume

func UpdateDeploymentVolume(pvcName, restorePvcName, namespace, deploymentName, accessWithinCluster string) error

func UpdateVirtualMachineDisk

func UpdateVirtualMachineDisk(namespace, accessWithinCluster, vmName, diskName, pvcName string) error

func UpdateVirtualMachineVolumeSource

func UpdateVirtualMachineVolumeSource(namespace, accessWithinCluster, vmName, pvcName string) error

Types

This section is empty.

Directories

Path Synopsis
snapshotctrl
virtctrl

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL