Documentation ¶
Index ¶
- Constants
- Variables
- func BaseAutosupportURL() string
- func BaseURL() string
- func CreateOpenShiftTridentSCC(user, appLabelVal string) error
- func DeleteOpenShiftTridentSCC(user, labelVal string) error
- func GetBackend(backendName string) (storage.BackendExternal, error)
- func GetBackendByBackendUUID(backendUUID string) (storage.BackendExternal, error)
- func GetBackends() ([]string, error)
- func GetErrorFromHTTPResponse(response *http.Response, responseBody []byte) error
- func GetExitCodeFromError(err error) int
- func GetNode(nodeName string) (*utils.Node, error)
- func GetNodes() ([]string, error)
- func GetSnapshot(snapshotID string) (storage.SnapshotExternal, error)
- func GetSnapshots(volume string) ([]string, error)
- func GetStorageClass(storageClassName string) (api.StorageClass, error)
- func GetStorageClasses() ([]string, error)
- func GetVolume(volumeName string) (storage.VolumeExternal, error)
- func GetVolumes() ([]string, error)
- func ObliviateCRDs(kubeClientVal k8sclient.KubernetesClient, crdClientsetVal crdclient.Interface, ...) error
- func SetExitCodeFromError(err error)
- func TunnelCommand(commandArgs []string)
- func TunnelCommandRaw(commandArgs []string) ([]byte, []byte, error)
- func WriteBackends(backends []storage.BackendExternal)
- func WriteJSON(out interface{})
- func WriteNodes(nodes []utils.Node)
- func WriteSnapshots(snapshots []storage.SnapshotExternal)
- func WriteStorageClasses(storageClasses []api.StorageClass)
- func WriteVolumes(volumes []storage.VolumeExternal)
- func WriteYAML(out interface{})
- type ImageList
- type ImageSet
Constants ¶
View Source
const ( PreferredNamespace = tridentconfig.OrchestratorName DefaultPVCName = tridentconfig.OrchestratorName DefaultPVName = tridentconfig.OrchestratorName // CRD names BackendConfigCRDName = "tridentbackendconfigs.trident.netapp.io" BackendCRDName = "tridentbackends.trident.netapp.io" MirrorRelationshipCRDName = "tridentmirrorrelationships.trident.netapp.io" NodeCRDName = "tridentnodes.trident.netapp.io" SnapshotCRDName = "tridentsnapshots.trident.netapp.io" SnapshotInfoCRDName = "tridentsnapshotinfos.trident.netapp.io" StorageClassCRDName = "tridentstorageclasses.trident.netapp.io" TransactionCRDName = "tridenttransactions.trident.netapp.io" VersionCRDName = "tridentversions.trident.netapp.io" VolumeCRDName = "tridentvolumes.trident.netapp.io" VolumePublicationCRDName = "tridentvolumepublications.trident.netapp.io" VolumeReferenceCRDName = "tridentvolumereferences.trident.netapp.io" ControllerClusterRoleBindingFilename = "trident-controller-clusterrolebinding.yaml" NodeLinuxClusterRoleBindingFilename = "trident-node-linux-clusterrolebinding.yaml" NodeWindowsClusterRoleBindingFilename = "trident-node-windows-clusterrolebinding.yaml" ControllerClusterRoleFilename = "trident-controller-clusterrole.yaml" NodeLinuxClusterRoleFilename = "trident-node-linux-clusterrole.yaml" NodeWindowsClusterRoleFilename = "trident-node-windows-clusterrole.yaml" ControllerServiceAccountFilename = "trident-controller-serviceaccount.yaml" NodeLinuxServiceAccountFilename = "trident-node-linux-serviceaccount.yaml" NodeWindowsServiceAccountFilename = "trident-node-windows-serviceaccount.yaml" CRDsFilename = "trident-crds.yaml" DaemonSetFilename = "trident-daemonset.yaml" WindowsDaemonSetFilename = "trident-windows-daemonset.yaml" DeploymentFilename = "trident-deployment.yaml" NamespaceFilename = "trident-namespace.yaml" PodSecurityPolicyFilename = "trident-podsecuritypolicy.yaml" ServiceFilename = "trident-service.yaml" ResourceQuotaFilename = "trident-resourcequota.yaml" TridentEncryptionKeys = "trident-encryption-keys" TridentCSI = "trident-csi" TridentCSIWindows = "trident-csi-windows" TridentLegacy = "trident" TridentMainContainer = "trident-main" TridentControllerResourceName = "trident-controller" TridentNodeLinuxResourceName = "trident-node-linux" TridentNodeWindowsResourceName = "trident-node-windows" CSIDriver = "csi.trident.netapp.io" TridentPSP = "tridentpods" )
View Source
const ( FormatJSON = "json" FormatName = "name" FormatWide = "wide" FormatYAML = "yaml" FormatMarkdown = "markdown" ModeDirect = "direct" ModeTunnel = "tunnel" ModeInstall = "install" CLIKubernetes = "kubectl" CLIOpenshift = "oc" PodServer = "127.0.0.1:8000" PodAutosupportCollector = "127.0.0.1:8003" ExitCodeSuccess = 0 ExitCodeFailure = 1 TridentLegacyLabelKey = "app" TridentLegacyLabelValue = "trident.netapp.io" TridentLegacyLabel = TridentLegacyLabelKey + "=" + TridentLegacyLabelValue 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 TridentMigratorLabelKey = "app" TridentMigratorLabelValue = "trident-migrator.netapp.io" TridentMigratorLabel = TridentMigratorLabelKey + "=" + TridentMigratorLabelValue TridentPersistentObjectLabelKey = "object" TridentPersistentObjectLabelValue = "persistent.trident.netapp.io" TridentPersistentObjectLabel = TridentPersistentObjectLabelKey + "=" + TridentPersistentObjectLabelValue TridentOperatorLabelKey = "app" TridentOperatorLabelValue = "operator.trident.netapp.io" TridentOperatorLabel = TridentOperatorLabelKey + "=" + TridentOperatorLabelValue AutosupportCollectorURL = "/autosupport/v1" )
Variables ¶
View Source
var ( OperatingMode string KubernetesCLI string TridentPodName string TridentPodNamespace string ExitCode int Debug bool Server string AutosupportCollector string OutputFormat string )
View Source
var ( CRDnames = []string{ BackendConfigCRDName, BackendCRDName, MirrorRelationshipCRDName, NodeCRDName, VolumeReferenceCRDName, SnapshotCRDName, SnapshotInfoCRDName, StorageClassCRDName, TransactionCRDName, VersionCRDName, VolumeCRDName, VolumePublicationCRDName, } )
View Source
var (
K8sVersion string
)
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 BaseAutosupportURL ¶
func BaseAutosupportURL() string
func CreateOpenShiftTridentSCC ¶
CreateOpenShiftTridentSCC creates an SCC solely for use with the trident user. This only works for OpenShift.
func DeleteOpenShiftTridentSCC ¶
DeleteOpenShiftTridentSCC deletes the trident-only SCC that the trident user uses. This only works for OpenShift.
func GetBackend ¶
func GetBackend(backendName string) (storage.BackendExternal, error)
func GetBackendByBackendUUID ¶
func GetBackendByBackendUUID(backendUUID string) (storage.BackendExternal, error)
func GetBackends ¶
func GetExitCodeFromError ¶
func GetSnapshot ¶
func GetSnapshot(snapshotID string) (storage.SnapshotExternal, error)
func GetSnapshots ¶
func GetStorageClass ¶
func GetStorageClass(storageClassName string) (api.StorageClass, error)
func GetStorageClasses ¶
func GetVolumes ¶
func ObliviateCRDs ¶
func SetExitCodeFromError ¶
func SetExitCodeFromError(err error)
func TunnelCommand ¶
func TunnelCommand(commandArgs []string)
func WriteBackends ¶
func WriteBackends(backends []storage.BackendExternal)
func WriteNodes ¶
func WriteSnapshots ¶
func WriteSnapshots(snapshots []storage.SnapshotExternal)
func WriteStorageClasses ¶
func WriteStorageClasses(storageClasses []api.StorageClass)
func WriteVolumes ¶
func WriteVolumes(volumes []storage.VolumeExternal)
Types ¶
Source Files ¶
- create.go
- create_backend.go
- delete.go
- delete_backend.go
- delete_node.go
- delete_snapshot.go
- delete_storageclass.go
- delete_volume.go
- get.go
- get_backend.go
- get_node.go
- get_snapshot.go
- get_storageclass.go
- get_volume.go
- images.go
- import.go
- import_volume.go
- install.go
- logs.go
- obliviate.go
- obliviate_alpha_snapshot_crd.go
- obliviate_crd.go
- obliviate_secret.go
- pause.go
- root.go
- send.go
- send_autosupport.go
- system_linux.go
- uninstall.go
- update.go
- update_backend.go
- update_backend_state.go
- upgrade.go
- upgrade_volume.go
- version.go
Click to show internal directories.
Click to hide internal directories.