Always include longhorn namespace
@@ -265,81 +265,48 @@ func Longhorn(c *Collector, longhornCollector *troubleshootv1beta2.Longhorn) (ma
}
func GetLonghornNodesDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/nodes", namespace)
}
- return "longhorn/nodes"
-}
func GetLonghornVolumesDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/volumes", namespace)
}
- return "longhorn/volumes"
-}
func GetLonghornReplicasDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/replicas", namespace)
}
- return "longhorn/replicas"
-}
func GetLonghornEnginesDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/engines", namespace)
}
- return "longhorn/engines"
-}
func GetLonghornEngineImagesDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/engineimages", namespace)
}
- return "longhorn/engineimages"
-}
func GetLonghornInstanceManagersDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/instancemanagers", namespace)
}
- return "longhorn/instancemanagers"
-}
func GetLonghornBackingImageManagersDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/backingimagemanagers", namespace)
}
- return "longhorn/backingimagemanagers"
-}
func GetLonghornBackingImagesDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/backingimages", namespace)
}
- return "longhorn/backingimages"
-}
func GetLonghornShareManagersDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/sharemanagers", namespace)
}
- return "longhorn/sharemanagers"
-}
func GetLonghornSettingsFile(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/settings.yaml", namespace)
}
- return "longhorn/settings.yaml"
-}
func GetLonghornLogsDirectory(namespace string) string {
- if namespace != DefaultLonghornNamespace {
return fmt.Sprintf("longhorn/%s/logs", namespace)
}
- return "longhorn/logs"
-}
func GetLonghornReplicaChecksum(clientConfig *rest.Config, replica longhornv1beta1types.Replica, podName string) (string, error) {
client, err := kubernetes.NewForConfig(clientConfig)
