Documentation
¶
Index ¶
- func CaptureK8SResources(kubeClient kubernetes.Interface, namespace, captureDir string, ...) error
- func CaptureMultiClusterOAMResources(dynamicClient dynamic.Interface, nsList []string, captureDir string, ...) error
- func CaptureOAMResources(dynamicClient dynamic.Interface, nsList []string, captureDir string, ...) error
- func CapturePodLog(kubeClient kubernetes.Interface, pod corev1.Pod, namespace, captureDir string, ...) error
- func CaptureVZResource(captureDir string, vz *v1beta1.Verrazzano, vzHelper VZHelper) error
- func CaptureVerrazzanoManagedCluster(dynamicClient dynamic.Interface, captureDir string, vzHelper VZHelper) error
- func CaptureVerrazzanoProjects(dynamicClient dynamic.Interface, captureDir string, vzHelper VZHelper) error
- func CheckAndRemoveBugReportExistsInDir(dir string) bool
- func CreateReportArchive(captureDir string, bugRepFile *os.File) error
- func DoesNamespaceExist(kubeClient kubernetes.Interface, namespace string, vzHelper VZHelper) (bool, error)
- func FindVerrazzanoResource(client client.Client) (*v1beta1.Verrazzano, error)
- func GetAppConfigScheme() schema.GroupVersionResource
- func GetComponentConfigScheme() schema.GroupVersionResource
- func GetIngressTraitConfigScheme() schema.GroupVersionResource
- func GetIsLiveCluster() bool
- func GetLatestReleaseVersion(client *http.Client) (string, error)
- func GetMCAppConfigScheme() schema.GroupVersionResource
- func GetMCComponentScheme() schema.GroupVersionResource
- func GetManagedClusterConfigScheme() schema.GroupVersionResource
- func GetMetricsTraitConfigScheme() schema.GroupVersionResource
- func GetMultiWriterErr() io.Writer
- func GetMultiWriterOut() io.Writer
- func GetNamespacesForAllComponents(vz *v1beta1.Verrazzano) []string
- func GetOperatorYaml(version string) (string, error)
- func GetPodList(client clipkg.Client, appLabel, appName, namespace string) ([]corev1.Pod, error)
- func GetPodListAll(client clipkg.Client, namespace string) ([]corev1.Pod, error)
- func GetVZManagedNamespaces(kubeClient kubernetes.Interface) []string
- func GetVerrazzanoResource(client client.Client, namespacedName types.NamespacedName) (*v1beta1.Verrazzano, error)
- func GetVersionOut() string
- func GetVzProjectsConfigScheme() schema.GroupVersionResource
- func InitRegexToReplacementMap()
- func IsErrorReported() bool
- func LogError(msg string)
- func LogMessage(msg string)
- func NewScheme() *runtime.Scheme
- func NewVerrazzanoForGroupVersion(groupVersion schema.GroupVersion) func() interface{}
- func NewVerrazzanoForVZVersion(version string) (schema.GroupVersion, client.Object, error)
- func RemoveDuplicate(origSlice []string) []string
- func SanitizeString(l string) string
- func SetIsLiveCluster()
- func SetK8sVer() error
- func SetMultiWriterErr(errStream io.Writer, errFile *os.File)
- func SetMultiWriterOut(outStream io.Writer, outFile *os.File)
- func SetVerboseOutput(enableVerbose bool)
- func SetVzVer(client *client.Client) error
- func UpdateVerrazzanoResource(client client.Client, vz *v1beta1.Verrazzano) error
- func VerifyVzInstallNamespaceExists() bool
- type ClusterSnapshotCtx
- type ReportCtx
- type VZHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CaptureK8SResources ¶
func CaptureK8SResources(kubeClient kubernetes.Interface, namespace, captureDir string, vzHelper VZHelper) error
CaptureK8SResources collects the Workloads (Deployment and ReplicaSet, StatefulSet, Daemonset), pods, events, ingress and services from the specified namespace, as JSON files
func CaptureMultiClusterOAMResources ¶ added in v1.4.4
func CaptureMultiClusterOAMResources(dynamicClient dynamic.Interface, nsList []string, captureDir string, vzHelper VZHelper) error
CaptureMultiClusterOAMResources captures OAM resources in multi-cluster environment
func CaptureOAMResources ¶
func CaptureOAMResources(dynamicClient dynamic.Interface, nsList []string, captureDir string, vzHelper VZHelper) error
CaptureOAMResources captures OAM resources in the given list of namespaces
func CapturePodLog ¶
func CapturePodLog(kubeClient kubernetes.Interface, pod corev1.Pod, namespace, captureDir string, vzHelper VZHelper, duration int64) error
captureLog captures the log from the pod in the captureDir
func CaptureVZResource ¶
func CaptureVZResource(captureDir string, vz *v1beta1.Verrazzano, vzHelper VZHelper) error
CaptureVZResource captures Verrazzano resources as a JSON file
func CaptureVerrazzanoManagedCluster ¶ added in v1.4.4
func CaptureVerrazzanoManagedCluster(dynamicClient dynamic.Interface, captureDir string, vzHelper VZHelper) error
CaptureVerrazzanoManagedCluster captures VerrazzanoManagedCluster in verrazzano-mc namespace, as a JSON file
func CaptureVerrazzanoProjects ¶ added in v1.4.4
func CaptureVerrazzanoProjects(dynamicClient dynamic.Interface, captureDir string, vzHelper VZHelper) error
CaptureVerrazzanoProjects captures the Verrazzano projects in the verrazzano-mc namespace, as a JSON file
func CheckAndRemoveBugReportExistsInDir ¶ added in v1.6.0
CheckAndRemoveBugReportExistsInDir checks vz bug report exists in dir or not
func CreateReportArchive ¶
CreateReportArchive creates the .tar.gz file specified by bugReportFile, from the files in captureDir
func DoesNamespaceExist ¶
func DoesNamespaceExist(kubeClient kubernetes.Interface, namespace string, vzHelper VZHelper) (bool, error)
DoesNamespaceExist checks whether the namespace exists in the cluster
func FindVerrazzanoResource ¶
func FindVerrazzanoResource(client client.Client) (*v1beta1.Verrazzano, error)
FindVerrazzanoResource - find the single Verrazzano resource
func GetAppConfigScheme ¶
func GetAppConfigScheme() schema.GroupVersionResource
GetAppConfigScheme returns GroupVersionResource for ApplicationConfiguration
func GetComponentConfigScheme ¶
func GetComponentConfigScheme() schema.GroupVersionResource
GetComponentConfigScheme returns GroupVersionResource for Component
func GetIngressTraitConfigScheme ¶
func GetIngressTraitConfigScheme() schema.GroupVersionResource
GetIngressTraitConfigScheme returns GroupVersionResource for IngressTrait
func GetIsLiveCluster ¶
func GetIsLiveCluster() bool
GetIsLiveCluster returns a boolean indicating whether it is live cluster analysis
func GetLatestReleaseVersion ¶
GetLatestReleaseVersion - get the version of the latest release of Verrazzano
func GetMCAppConfigScheme ¶
func GetMCAppConfigScheme() schema.GroupVersionResource
GetMCAppConfigScheme returns GroupVersionResource for MulticlusterApplicationConfiguration
func GetMCComponentScheme ¶
func GetMCComponentScheme() schema.GroupVersionResource
GetMCComponentScheme returns GroupVersionResource for MulticlusterComponent
func GetManagedClusterConfigScheme ¶
func GetManagedClusterConfigScheme() schema.GroupVersionResource
GetManagedClusterConfigScheme returns GroupVersionResource for VerrazzanoManagedCluster
func GetMetricsTraitConfigScheme ¶
func GetMetricsTraitConfigScheme() schema.GroupVersionResource
GetMetricsTraitConfigScheme returns GroupVersionResource for MetricsTrait
func GetMultiWriterErr ¶
GetMultiWriterErr returns the MultiWriter for standard error
func GetMultiWriterOut ¶
GetMultiWriterOut returns the MultiWriter for standard output
func GetNamespacesForAllComponents ¶
func GetNamespacesForAllComponents(vz *v1beta1.Verrazzano) []string
GetNamespacesForAllComponents returns the list of unique namespaces of all the components included in the Verrazzano resource
func GetOperatorYaml ¶
GetOperatorYaml returns Kubernetes manifests to deploy the Verrazzano platform operator The return value is operator.yaml for releases earlier than 1.4.0 and verrazzano-platform-operator.yaml from release 1.4.0 onwards
func GetPodList ¶
GetPodList returns list of pods matching the label in the given namespace
func GetPodListAll ¶ added in v1.4.4
GetPodListAll returns list of pods in the given namespace Will be used to fetch all pods in additional namespace
func GetVZManagedNamespaces ¶
func GetVZManagedNamespaces(kubeClient kubernetes.Interface) []string
GetVZManagedNamespaces returns the namespaces with label verrazzano-managed=true
func GetVerrazzanoResource ¶
func GetVerrazzanoResource(client client.Client, namespacedName types.NamespacedName) (*v1beta1.Verrazzano, error)
GetVerrazzanoResource - get a Verrazzano resource
func GetVersionOut ¶ added in v1.6.0
func GetVersionOut() string
GetVersionOut returns the customised k8s and vz version string
func GetVzProjectsConfigScheme ¶
func GetVzProjectsConfigScheme() schema.GroupVersionResource
GetVzProjectsConfigScheme returns GroupVersionResource for VerrazzanoProject
func InitRegexToReplacementMap ¶
func InitRegexToReplacementMap()
InitRegexToReplacementMap Initialize the regex string to replacement string map Append to this map for any future additions
func IsErrorReported ¶
func IsErrorReported() bool
IsErrorReported returns true when the command logs at least one error to the standard error
func NewVerrazzanoForGroupVersion ¶
func NewVerrazzanoForGroupVersion(groupVersion schema.GroupVersion) func() interface{}
func RemoveDuplicate ¶
RemoveDuplicate removes duplicates from origSlice
func SanitizeString ¶
SanitizeString sanitizes each line in a given file, Sanitizes based on the regex map initialized above
func SetIsLiveCluster ¶
func SetIsLiveCluster()
SetIsLiveCluster sets true to isLiveCluster, indicating the live cluster analysis usage
func SetK8sVer ¶ added in v1.6.0
func SetK8sVer() error
SetK8sVer returns cluster Kubernetes version
func SetMultiWriterErr ¶
SetMultiWriterErr sets MultiWriter for standard error
func SetMultiWriterOut ¶
SetMultiWriterOut sets MultiWriter for standard output
func SetVerboseOutput ¶
func SetVerboseOutput(enableVerbose bool)
SetVerboseOutput sets the verbose output for the commands bug-report and analyze
func UpdateVerrazzanoResource ¶
func UpdateVerrazzanoResource(client client.Client, vz *v1beta1.Verrazzano) error
func VerifyVzInstallNamespaceExists ¶ added in v1.6.0
func VerifyVzInstallNamespaceExists() bool
VerifyVzInstallNamespaceExists returns existence of verrazzano-install namespace
Types ¶
type ClusterSnapshotCtx ¶ added in v1.6.0
type VZHelper ¶
type VZHelper interface { GetOutputStream() io.Writer GetErrorStream() io.Writer GetInputStream() io.Reader GetClient(cmd *cobra.Command) (client.Client, error) GetKubeClient(cmd *cobra.Command) (kubernetes.Interface, error) GetHTTPClient() *http.Client GetDynamicClient(cmd *cobra.Command) (dynamic.Interface, error) GetDiscoveryClient(cmd *cobra.Command) (discovery.DiscoveryInterface, error) }