Wrapper function for analyzer's exclude flag
@@ -206,3 +206,79 @@ type Analyze struct {
WeaveReport *WeaveReportAnalyze `json:"weaveReport,omitempty" yaml:"weaveReport,omitempty"`
Sysctl *SysctlAnalyze `json:"sysctl,omitempty" yaml:"sysctl,omitempty"`
}
+
+func (a *Analyze) GetExclude() *multitype.BoolOrString {
+ if a.ClusterVersion != nil {
+ return a.ClusterVersion.Exclude
+ }
+ if a.StorageClass != nil {
+ return a.StorageClass.Exclude
+ }
+ if a.CustomResourceDefinition != nil {
+ return a.CustomResourceDefinition.Exclude
+ }
+ if a.Ingress != nil {
+ return a.Ingress.Exclude
+ }
+ if a.Secret != nil {
+ return a.Secret.Exclude
+ }
+ if a.ConfigMap != nil {
+ return a.ConfigMap.Exclude
+ }
+ if a.ImagePullSecret != nil {
+ return a.ImagePullSecret.Exclude
+ }
+ if a.DeploymentStatus != nil {
+ return a.DeploymentStatus.Exclude
+ }
+ if a.StatefulsetStatus != nil {
+ return a.StatefulsetStatus.Exclude
+ }
+ if a.JobStatus != nil {
+ return a.JobStatus.Exclude
+ }
+ if a.ReplicaSetStatus != nil {
+ return a.ReplicaSetStatus.Exclude
+ }
+ if a.ClusterPodStatuses != nil {
+ return a.ClusterPodStatuses.Exclude
+ }
+ if a.ContainerRuntime != nil {
+ return a.ContainerRuntime.Exclude
+ }
+ if a.Distribution != nil {
+ return a.Distribution.Exclude
+ }
+ if a.NodeResources != nil {
+ return a.NodeResources.Exclude
+ }
+ if a.TextAnalyze != nil {
+ return a.TextAnalyze.Exclude
+ }
+ if a.Postgres != nil {
+ return a.Postgres.Exclude
+ }
+ if a.Mysql != nil {
+ return a.Mysql.Exclude
+ }
+ if a.Redis != nil {
+ return a.Redis.Exclude
+ }
+ if a.CephStatus != nil {
+ return a.CephStatus.Exclude
+ }
+ if a.Longhorn != nil {
+ return a.Longhorn.Exclude
+ }
+ if a.RegistryImages != nil {
+ return a.RegistryImages.Exclude
+ }
+ if a.WeaveReport != nil {
+ return a.WeaveReport.Exclude
+ }
+ if a.Sysctl != nil {
+ return a.Sysctl.Exclude
+ }
+ return nil
+}
