Documentation ¶
Index ¶
- Constants
- Variables
- func GetBackend(baseURL, backendName string) (api.Backend, error)
- func GetBackends(baseURL string) ([]string, error)
- func GetBaseURL() (string, error)
- func GetErrorFromHTTPResponse(response *http.Response, responseBody []byte) error
- func GetExitCodeFromError(err error) int
- func GetStorageClass(baseURL, storageClassName string) (api.StorageClass, error)
- func GetStorageClasses(baseURL string) ([]string, error)
- func GetVolume(baseURL, volumeName string) (storage.VolumeExternal, error)
- func GetVolumes(baseURL string) ([]string, error)
- func ReadDaemonSetFromFile(filePath string) (*v1beta1.DaemonSet, error)
- func ReadDeploymentFromFile(filePath string) (*v1beta1.Deployment, error)
- func ReadPVCFromFile(filePath string) (*v1.PersistentVolumeClaim, error)
- func ReadServiceFromFile(filePath string) (*v1.Service, error)
- func ReadStatefulSetFromFile(filePath string) (*appsv1.StatefulSet, error)
- func SetExitCodeFromError(err error)
- func TunnelCommand(commandArgs []string)
- func TunnelCommandRaw(commandArgs []string) ([]byte, error)
- func WriteBackends(backends []api.Backend)
- func WriteJSON(out interface{})
- func WriteStorageClasses(storageClasses []api.StorageClass)
- func WriteVolumes(volumes []storage.VolumeExternal)
- func WriteYAML(out interface{})
Constants ¶
View Source
const ( PreferredNamespace = tridentconfig.OrchestratorName DefaultPVCName = tridentconfig.OrchestratorName DefaultPVName = tridentconfig.OrchestratorName DefaultVolumeName = tridentconfig.OrchestratorName DefaultVolumeSize = "2Gi" BackendConfigFilename = "backend.json" NamespaceFilename = "trident-namespace.yaml" ServiceAccountFilename = "trident-serviceaccount.yaml" ClusterRoleFilename = "trident-clusterrole.yaml" ClusterRoleBindingFilename = "trident-clusterrolebinding.yaml" PVCFilename = "trident-pvc.yaml" DeploymentFilename = "trident-deployment.yaml" ServiceFilename = "trident-service.yaml" StatefulSetFilename = "trident-statefulset.yaml" DaemonSetFilename = "trident-daemonset.yaml" )
View Source
const ( FormatJSON = "json" FormatName = "name" FormatWide = "wide" FormatYAML = "yaml" ModeDirect = "direct" ModeTunnel = "tunnel" ModeInstall = "install" CLIKubernetes = "kubectl" CLIOpenshift = "oc" PodServer = "127.0.0.1:8000" ExitCodeSuccess = 0 ExitCodeFailure = 1 TridentLabelKey = "app" TridentLabelValue = "trident.netapp.io" TridentLabel = TridentLabelKey + "=" + TridentLabelValue TridentCSILabelKey = "app" TridentCSILabelValue = "controller.csi.trident.netapp.io" TridentCSILabel = TridentCSILabelKey + "=" + TridentCSILabelValue TridentNodeLabelKey = "app" TridentNodeLabelValue = "node.csi.trident.netapp.io" TridentNodeLabel = TridentNodeLabelKey + "=" + TridentNodeLabelValue TridentInstallerLabelKey = "app" TridentInstallerLabelValue = "trident-installer.netapp.io" TridentInstallerLabel = TridentInstallerLabelKey + "=" + TridentInstallerLabelValue )
View Source
const (
LogLimitBytes = 10485760 // 10 MiB
)
Variables ¶
View Source
var ( OperatingMode string KubernetesCLI string TridentPodName string TridentPodNamespace string ExitCode int Debug bool Server string OutputFormat string CSI bool )
View Source
var AllBackends bool
View Source
var AllStorageClasses bool
View Source
var AllVolumes bool
View Source
var RootCmd = &cobra.Command{ SilenceUsage: true, Use: "tridentctl", Short: "A CLI tool for NetApp Trident", Long: `A CLI tool for managing the NetApp Trident external storage provisioner for Kubernetes`, }
Functions ¶
func GetBackends ¶
func GetBaseURL ¶
func GetExitCodeFromError ¶
func GetStorageClass ¶
func GetStorageClass(baseURL, storageClassName string) (api.StorageClass, error)
func GetStorageClasses ¶
func GetVolumes ¶
func ReadDaemonSetFromFile ¶
ReadDaemonSetFromFile parses and returns a daemonset object from a file.
func ReadDeploymentFromFile ¶
func ReadDeploymentFromFile(filePath string) (*v1beta1.Deployment, error)
ReadDeploymentFromFile parses and returns a deployment object from a file.
func ReadPVCFromFile ¶
func ReadPVCFromFile(filePath string) (*v1.PersistentVolumeClaim, error)
ReadPVCFromFile parses and returns a PVC object from a file.
func ReadServiceFromFile ¶
ReadServiceFromFile parses and returns a service object from a file.
func ReadStatefulSetFromFile ¶
func ReadStatefulSetFromFile(filePath string) (*appsv1.StatefulSet, error)
ReadStatefulSetFromFile parses and returns a statefulset object from a file.
func SetExitCodeFromError ¶
func SetExitCodeFromError(err error)
func TunnelCommand ¶
func TunnelCommand(commandArgs []string)
func TunnelCommandRaw ¶
func WriteBackends ¶
func WriteStorageClasses ¶
func WriteStorageClasses(storageClasses []api.StorageClass)
func WriteVolumes ¶
func WriteVolumes(volumes []storage.VolumeExternal)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.