clusterconfig

package
v0.0.0-...-898015a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 71 Imported by: 0

Documentation

Overview

nolint: dupl

nolint: dupl

nolint: dupl

nolint: dupl

nolint: dupl

nolint: dupl, misspell

nolint: dupl

nolint: dupl, lll

nolint: dupl

nolint: dupl

nolint: dupl

nolint: dupl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncludeCSR

func IncludeCSR(c *CSRAnonymizedFeatures, opts ...FilterOptFunc) bool

func Map

func Map(it []string, fn func(string) string) []string

Map applies each of functions to passed slice

Types

type CSRAnonymizedFeatures

type CSRAnonymizedFeatures struct {
	TypeMeta   metav1.TypeMeta
	ObjectMeta metav1.ObjectMeta
	Spec       *StateFeatures
	Status     *StatusFeatures
}

type CSRAnonymizer

type CSRAnonymizer struct {
	*CSRAnonymizedFeatures
}

func (CSRAnonymizer) GetExtension

func (a CSRAnonymizer) GetExtension() string

GetExtension returns extension for CSR objects

func (CSRAnonymizer) Marshal

func (a CSRAnonymizer) Marshal() ([]byte, error)

type CSRs

type CSRs struct {
	Requests   []certificatesv1api.CertificateSigningRequest
	Anonymized []CSRAnonymizer
}

func (*CSRs) Anonymize

func (c *CSRs) Anonymize() *CSRs

func (*CSRs) Filter

func (c *CSRs) Filter(f FilterFeatures) *CSRs

func (*CSRs) Select

func (c *CSRs) Select() ([]CSRAnonymizer, error)

type CertFeatures

type CertFeatures struct {
	Verified  bool
	Issuer    pkix.Name
	Subject   pkix.Name
	NotBefore string
	NotAfter  string
}

type CompactedEvent

type CompactedEvent struct {
	Namespace     string    `json:"namespace"`
	LastTimestamp time.Time `json:"lastTimestamp"`
	Reason        string    `json:"reason"`
	Message       string    `json:"message"`
	Type          string    `json:"type"`
}

CompactedEvent holds one Namespace Event

type CompactedEventList

type CompactedEventList struct {
	Items []CompactedEvent `json:"items"`
}

CompactedEventList is collection of events

type ConfigMapAnonymizer

type ConfigMapAnonymizer struct {
	// contains filtered or unexported fields
}

ConfigMapAnonymizer implements serialization of configmap and potentially anonymizes if it is a certificate

func (ConfigMapAnonymizer) GetExtension

func (a ConfigMapAnonymizer) GetExtension() string

GetExtension returns extension for anonymized openshift objects

func (ConfigMapAnonymizer) Marshal

func (a ConfigMapAnonymizer) Marshal() ([]byte, error)

Marshal implements serialization of Node with anonymization

type ContainerImageSet

type ContainerImageSet map[int]string

ContainerImageSet is used to store unique container image URLs. The key is a continuous index starting from 0. The value is the image URL itself.

func (ContainerImageSet) Add

func (is ContainerImageSet) Add(image string) int

Add puts the image at the end of the set. It will be assigned the highest index and this index will be returned.

type ContainerInfo

type ContainerInfo struct {
	Images     ContainerImageSet `json:"images"`
	Containers PodsWithAge       `json:"containers"`
}

ContainerInfo encapsulates the essential information about running containers in a minimalized data structure.

type CsrFeatures

type CsrFeatures struct {
	ValidSignature     bool
	SignatureAlgorithm string
	PublicKeyAlgorithm string
	DNSNames           []string
	EmailAddresses     []string
	IPAddresses        []string
	URIs               []string
	Subject            pkix.Name
}

type FilterFeatures

type FilterFeatures func(c *CSRAnonymizedFeatures, opt ...FilterOptFunc) bool

type FilterOpt

type FilterOpt struct {
	// contains filtered or unexported fields
}

type FilterOptFunc

type FilterOptFunc = func(o *FilterOpt)

func WithTime

func WithTime(t time.Time) FilterOptFunc

type Gatherer

type Gatherer struct {
	// contains filtered or unexported fields
}

Gatherer is an object storing config and having all the gathering functions

func New

func New(
	gatherKubeConfig, gatherProtoKubeConfig, metricsGatherKubeConfig, alertsGatherKubeConfig *rest.Config,
	anonymizer *anonymization.Anonymizer, configObserver configobserver.Interface,
) *Gatherer

func (*Gatherer) GatherActiveAlerts

func (g *Gatherer) GatherActiveAlerts(ctx context.Context) ([]record.Record, []error)

GatherActiveAlerts Collects active alerts from the `Alertmanager` API V2 in the JSON format. Alert data is also still included in the [GatherMostRecentMetrics](#mostrecentmetrics) gatherer.

This adds new gatherer for gathering firing/active Prometheus alerts in JSON format as well. The original recent metrics gatherer still continues to gather the alerts (not in JSON) as well, but this can be removed in the future, and we will keep the data only in JSON.

### API Reference None

### Sample data - docs/insights-archive-sample/config/alerts.json

### Location in archive - `config/alerts.json`

### Config ID `clusterconfig/active_alerts`

### Released version - 4.12.0

### Backported versions None

### Changes None

func (*Gatherer) GatherCRD

func (g *Gatherer) GatherCRD(ctx context.Context) ([]record.Record, []error)

GatherCRD Collects the specified Custom Resource Definitions.

The following CRDs are gathered: - `volumesnapshots.snapshot.storage.k8s.io` (10745 bytes) - `volumesnapshotcontents.snapshot.storage.k8s.io` (13149 bytes)

### API Reference None

### Sample data - docs/insights-archive-sample/config/crd

### Location in archive - `config/crd/{name}.json`

### Config ID `clusterconfig/crds`

### Released version - 4.6.0

### Backported versions None

### Changes None

func (*Gatherer) GatherCephCluster

func (g *Gatherer) GatherCephCluster(ctx context.Context) ([]record.Record, []error)

GatherCephCluster Collects statuses of the`cephclusters.ceph.rook.io` resources from Openshift Data Foundation Stack.

### API Reference - https://github.com/rook/rook/blob/master/pkg/apis/ceph.rook.io/v1/types.go

### Sample data - docs/insights-archive-sample/config/storage/openshift-storage/cephclusters/ocs-storagecluster-cephcluster.json

### Location in archive | Version | Path | | --------- | ------------------------------------------------------- | | < 4.13.0 | config/storage/{namespace}/{name}.json | | >= 4.13.0 | config/storage/{namespace}/cephclusters/{name}.json |

### Config ID `clusterconfig/ceph_cluster`

### Released version - 4.12.0

### Backported versions - 4.8.49+ - 4.9.48+ - 4.10.31+ - 4.11.2+

### Changes In OCP 4.11 and OCP 4.12, the location of gathered data collides with data gathered by the [StorageCluster](#StorageCluster) gatherer. It is practically impossible to tell the two resources apart. Use with caution.

func (*Gatherer) GatherCertificateSigningRequests

func (g *Gatherer) GatherCertificateSigningRequests(ctx context.Context) ([]record.Record, []error)

GatherCertificateSigningRequests Collects anonymized `CertificateSigningRequests` which weren't Verified, or when `Now < ValidBefore` or `Now > ValidAfter`

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/certificates/v1beta1/certificatesigningrequest.go#L78 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#certificatesigningrequestlist-v1beta1certificates

### Sample data None

### Location in archive - `config/certificatesigningrequests`

### Config ID `clusterconfig/certificate_signing_requests`

### Released version - 4.5.0

### Backported versions - 4.3.25+ - 4.4.12+

### Changes None

func (*Gatherer) GatherClusterAPIServer

func (g *Gatherer) GatherClusterAPIServer(ctx context.Context) ([]record.Record, []error)

GatherClusterAPIServer Collects APIServer.config.openshift.io resource

### API Reference https://github.com/openshift/api/blob/master/config/v1/types_apiserver.go

### Sample data - docs/insights-archive-sample/config/apiserver.json

### Location in archive - `config/apiserver.json`

### Config ID `cluster_apiserver`

### Released version - 4.15.0

### Backported versions - 4.14.0+ - 4.13.19+ - 4.12.42+ - 4.11.54+

### Changes None

func (*Gatherer) GatherClusterAuthentication

func (g *Gatherer) GatherClusterAuthentication(ctx context.Context) ([]record.Record, []error)

GatherClusterAuthentication Collects the cluster `Authentication` with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/authentication.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#authentication-v1operator-openshift-io

### Sample data - docs/insights-archive-sample/config/authentication.json

### Location in archive - `config/authentication.json`

### Config ID `clusterconfig/authentication`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterFeatureGates

func (g *Gatherer) GatherClusterFeatureGates(ctx context.Context) ([]record.Record, []error)

GatherClusterFeatureGates Collects the cluster `FeatureGate` with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/featuregate.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#featuregate-v1-config-openshift-io

### Sample data - docs/insights-archive-sample/config/featuregate.json

### Location in archive - `config/featuregate.json`

### Config ID `clusterconfig/feature_gates`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterImage

func (g *Gatherer) GatherClusterImage(ctx context.Context) ([]record.Record, []error)

GatherClusterImage Collects cluster `images.config.openshift.io` resource definition.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/config_client.go#L72 - https://docs.openshift.com/container-platform/latest/rest_api/config_apis/image-config-openshift-io-v1.html#image-config-openshift-io-v1

### Sample data - docs/insights-archive-sample/config/image.json

### Location in archive - `config/image.json`

### Config ID `clusterconfig/image`

### Released version - 4.11.0

### Backported versions - 4.10.8+

### Changes None

func (*Gatherer) GatherClusterImagePruner

func (g *Gatherer) GatherClusterImagePruner(ctx context.Context) ([]record.Record, []error)

GatherClusterImagePruner Collects the image pruner configuration.

### API Reference None

### Sample data - docs/insights-archive-sample/clusteroperator/imageregistry.operator.openshift.io/imagepruner/cluster.json

### Location in archive | Version | Path | | --------- | ----------------------------------------------------------------------------------- | | < 4.6.0 | config/imagepruner.json | | >= 4.6.0 | config/clusteroperator/{group}/{kind}/{name}.json |

### Config ID `clusterconfig/image_pruners`

### Released version - 4.5.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterImageRegistry

func (g *Gatherer) GatherClusterImageRegistry(ctx context.Context) ([]record.Record, []error)

GatherClusterImageRegistry Collects the cluster Image Registry configuration

### API Reference None

### Sample data - docs/insights-archive-sample/config/clusteroperator/imageregistry.operator.openshift.io/config/cluster.json

### Location in archive | Version | Path | | --------- | ------------------------------------------------------------------------------ | | < 4.7.0 | config/imageregistry.json | | >= 4.7.0 | config/clusteroperator/imageregistry.operator.openshift.io/config/cluster.json | | >= 4.6.20 | config/persistentvolumes/{name}.json |

### Config ID `clusterconfig/image_registries`

### Released version - 4.5.0

### Backported versions - 4.3.40+ - 4.4.12+

### Changes - `PersistentVolumes` were introduced in version 4.7.0 and backported to 4.6.20+. - If the Image Registry configuration uses any `PersistentVolumeClaim` for the storage, the corresponding `PersistentVolume` definition is gathered.

func (*Gatherer) GatherClusterInfrastructure

func (g *Gatherer) GatherClusterInfrastructure(ctx context.Context) ([]record.Record, []error)

GatherClusterInfrastructure Collects the cluster `Infrastructure` with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/infrastructure.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#infrastructure-v1-config-openshift-io

### Sample data - docs/insights-archive-sample/config/infrastructure.json

### Location in archive - `config/infrastructure.json`

### Config ID `clusterconfig/infrastructures`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterIngress

func (g *Gatherer) GatherClusterIngress(ctx context.Context) ([]record.Record, []error)

GatherClusterIngress Collects the cluster `Ingress` with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/ingress.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#ingress-v1-config-openshift-io

### Sample data - docs/insights-archive-sample/config/ingress.json

### Location in archive - `config/ingress.json`

### Config ID `clusterconfig/ingress`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterNetwork

func (g *Gatherer) GatherClusterNetwork(ctx context.Context) ([]record.Record, []error)

GatherClusterNetwork Collects the cluster Network with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/network.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#network-v1-config-openshift-io

### Sample data - docs/insights-archive-sample/config/network.json

### Location in archive - `config/network.json`

### Config ID `clusterconfig/networks`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterOAuth

func (g *Gatherer) GatherClusterOAuth(ctx context.Context) ([]record.Record, []error)

GatherClusterOAuth Collects the cluster OAuth with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/oauth.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#oauth-v1-config-openshift-io

### Sample data - docs/insights-archive-sample/config/oauth.json

### Location in archive - `config/oauth.json`

### Config ID `clusterconfig/oauths`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterOperatorPodsAndEvents

func (g *Gatherer) GatherClusterOperatorPodsAndEvents(ctx context.Context) ([]record.Record, []error)

GatherClusterOperatorPodsAndEvents Collects information about pods and events from namespaces of degraded cluster operators. The collected information includes:

- Definitions for non-running (terminated, pending) Pods - Previous (if container was terminated) and current logs of all related pod containers - Namespace events

### API Reference None

### Sample data - docs/insights-archive-sample/pod - docs/insights-archive-sample/events

### Location in archive - `config/pod/{namespace}/{pod}.json` - `events/{namespace}.json` - `config/pod/{namespace}/logs/{pod}/{container}_{current|previous}.log`

### Config ID `clusterconfig/operators_pods_and_events`

### Released version - 4.8.2

### Backported versions - 4.6.35+ - 4.7.11+

### Changes - The data gathered by `ClusterOperatorPodsAndEvents` were originally gathered by [`ClusterOperators`](#ClusterOperators). The [`ClusterOperators`](#ClusterOperators) gather was split at 4.8.2 and the change was backported to 4.7.11 and 4.6.35. - The collected data was previously included as specifications for `ClusterOperators`, and it was initially introduced in version `4.3.0` and later backported to version `4.2.10+`.

func (*Gatherer) GatherClusterOperators

func (g *Gatherer) GatherClusterOperators(ctx context.Context) ([]record.Record, []error)

GatherClusterOperators Collects all the `ClusterOperators` definitions and their related resources from the `operator.openshift.io` group. Only metadata (group, version, kind) and spec attributes from the `operator.openshift.io` group are gathered.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/clusteroperator.go#L62 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#clusteroperatorlist-v1config-openshift-io

### Sample data - docs/insights-archive-sample/config/clusteroperator

### Location in archive | Version | Path | | --------- | -------------------------------------------------------- | | < 4.6.16 | config/clusteroperator/{kind}-{name}.json | | >= 4.6.16 | config/clusteroperator/{group}/{kind}/{name}.json | | < 4.8.2 | config/pod/{namespace}/{pod}.json | | < 4.8.2 | events/{namespace}.json |

### Config ID `clusterconfig/operators`

### Released version - 4.2.0

### Backported versions None

### Changes - `config/pod/{namespace}/{pod}.json` and `events/` were moved to [ClusterOperatorPodsAndEvents](#ClusterOperatorPodsAndEvents) since `4.8.2`, both were introduced at `4.3.0` as part of this gatherer and backported to `4.2.10+`. - gather status of the `insightsoperator.operator.openshift.io` resource from `4.16.0+`

func (*Gatherer) GatherClusterProxy

func (g *Gatherer) GatherClusterProxy(ctx context.Context) ([]record.Record, []error)

GatherClusterProxy Collects the cluster `Proxy` with cluster name.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/proxy.go#L30 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#proxy-v1-config-openshift-io

### Sample data - docs/insights-archive-sample/config/proxy.json

### Location in archive - `config/proxy.json`

### Config ID `clusterconfig/proxies`

### Released version - 4.3.0

### Backported versions None

### Changes None

func (*Gatherer) GatherClusterVersion

func (g *Gatherer) GatherClusterVersion(ctx context.Context) ([]record.Record, []error)

GatherClusterVersion Collects the `ClusterVersion` (including the cluster ID) with the name 'version' and its resources.

### API Reference - https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/clusterversion.go#L50 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#clusterversion-v1config-openshift-io

### Sample data - docs/insights-archive-sample/config/version.json - docs/insights-archive-sample/config/pod - docs/insights-archive-sample/events/ - docs/insights-archive-sample/config/id

### Location in archive | Version | Path | | --------- | ---------------------------------------------------------- | | >= 4.2.0 | config/version.json | | >= 4.2.0 | config/id | | >= 4.8.2 | config/pod/openshift-cluster-version/version.json | | >= 4.8.2 | events/openshift-cluster-version.json |

### Config ID `clusterconfig/version`

### Released version - 4.2.0

### Backported versions None

### Changes None

func (*Gatherer) GatherConfigMaps

func (g *Gatherer) GatherConfigMaps(ctx context.Context) ([]record.Record, []error)

GatherConfigMaps Collects all `ConfigMaps` from the `openshift-config` namespace and specific `ConfigMaps` from other namespaces (see Changes for details).

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go#L80 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#configmaplist-v1core

### Sample data - docs/insights-archive-sample/config/configmaps

### Location in archive | Version | Path | | --------- | ---------------------------------------------------------- | | < 4.7.0 | config/configmaps/{configmap} | | >= 4.7.0 | config/configmaps/{namespace}/{name}/{configmap} |

### Config ID `clusterconfig/config_maps`

### Released version - 4.5.0

### Backported versions - 4.3.25+ - 4.4.6+

### Changes

  • `cluster-monitoring-config` config map from `openshift-monitoring` namespace since versions 4.6.22+ and 4.7.0+
  • `install-config` key from the `cluster-config-v1` config map in the `kube-system` namespace since versions 4.9.0+; originally stored as `config/configmaps/kube-system/cluster-config-v1.json`, changed to `config/configmaps/kube-system/cluster-config-v1/install-config` since 4.13.0+
  • `gateway-mode-config` config map from `openshift-network-operator` namespace since 4.14.0+
  • `insights-config` config map from `openshift-insights` namespace since 4.15.0+

### Anonymization If the content of a `ConfigMap` contains a parseable PEM structure (like a certificate), it removes the inside of PEM blocks. For `ConfigMap` of type `BinaryData`, it is encoded as standard base64. In the archive under configmaps, we store the name of the namespace, the name of the `ConfigMap`, and then each key.

For example: ```config/configmaps/NAMESPACENAME/CONFIGMAPNAME/CONFIGMAPKEY1```

func (*Gatherer) GatherContainerImages

func (g *Gatherer) GatherContainerImages(ctx context.Context) ([]record.Record, []error)

GatherContainerImages Collects essential information about running containers. Specifically, the age of pods, the set of running images and the container names are collected.

### API Reference None

### Sample data - docs/insights-archive-sample/config/running_containers.json

### Location in archive - `config/running_containers.json`

### Config ID `clusterconfig/container_images`

### Released version - 4.7.0

### Backported versions - 4.5.33+ - 4.6.1+

### Changes None

func (*Gatherer) GatherContainerRuntimeConfig

func (g *Gatherer) GatherContainerRuntimeConfig(ctx context.Context) ([]record.Record, []error)

GatherContainerRuntimeConfig Collects `ContainerRuntimeConfig` information.

### API Reference - https://github.com/openshift/machine-config-operator/blob/master/pkg/apis/machineconfiguration.openshift.io/v1/types.go#L402 - https://docs.okd.io/latest/rest_api/machine_apis/containerruntimeconfig-machineconfiguration-openshift-io-v1.html

### Sample data - docs/insights-archive-sample/config/containerruntimeconfigs/set-log-and-pid.json

### Location in archive - `config/containerruntimeconfigs/{name}.json`

### Config ID `clusterconfig/container_runtime_configs`

### Released version - 4.7.0

### Backported versions - 4.6.18+

### Changes None

func (*Gatherer) GatherCostManagementMetricsConfigs

func (g *Gatherer) GatherCostManagementMetricsConfigs(ctx context.Context) ([]record.Record, []error)

GatherCostManagementMetricsConfigs Collects `CostManagementMetricsConfigs` definitions.

### API Reference None

### Sample data - docs/insights-archive-sample/config/cost_management_metrics_configs

### Location in archive - `config/cost_management_metrics_configs/{name}.json`

### Config ID `clusterconfig/cost_management_metrics_configs`

### Released version - 4.10.0

### Backported versions - 4.8.27+ - 4.9.13+

### Changes None

func (*Gatherer) GatherDVOMetrics

func (g *Gatherer) GatherDVOMetrics(ctx context.Context) ([]record.Record, []error)

GatherDVOMetrics Collects metrics from the Deployment Validation Operator's metrics service. The metrics are fetched via the /metrics endpoint and filtered to only include those with a `deployment_validation_operator_` prefix. If the DVO service is deployed in a namespace other than `openshift-deployment-validation-operator', then the names of the workloads (e.g., namespace, deployment) are collected. Otherwise, only the UIDs of those resources are collected.

If no service with label selector `name=deployment-validation-operator` is found, then there is no `dvo_metrics` file in the archive (and the warning is present in the archive metadata). If a service with the selector `name=deployment-validation-operator` is found, but no active DVO checks are available, then the `dvo_metrics` file in the archive is almost empty (only the URL of the service is there).

### API Reference None

### Sample data - docs/insights-archive-sample/config/dvo_metrics

### Location in archive - `config/dvo_metrics`

### Config ID `clusterconfig/dvo_metrics`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherHostSubnet

func (g *Gatherer) GatherHostSubnet(ctx context.Context) ([]record.Record, []error)

GatherHostSubnet Collects `HostSubnet` information.

### API Reference - https://github.com/openshift/client-go/blob/master/network/clientset/versioned/typed/network/v1/hostsubnet.go - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#hostsubnet-v1-network-openshift-io

### Sample data - docs/insights-archive-sample/config/hostsubnet

### Location in archive - `config/hostsubnet/{name}.json`

### Config ID `clusterconfig/host_subnets`

### Released version - 4.6.0

### Backported versions - 4.4.29+ - 4.5.15+

### Changes None

func (*Gatherer) GatherInstallPlans

func (g *Gatherer) GatherInstallPlans(ctx context.Context) ([]record.Record, []error)

GatherInstallPlans Collects top 100 `InstallPlans` from `openshift-*` namespaces. Because `InstallPlans` have unique generated names, it groups them by namespace and the "template" for name generation from field `generateName`. It also collects total number of all `InstallPlans` and all non-unique `InstallPlans`.

### API Reference - https://github.com/operator-framework/api/blob/master/pkg/operators/v1alpha1/installplan_types.go#L26

### Sample data - docs/insights-archive-sample/config/installplans.json

### Location in archive - `config/instalplans.json`

### Config ID `clusterconfig/install_plans`

### Released version - 4.7.0

### Backported versions - 4.5.33+ - 4.6.16+

### Changes None

func (*Gatherer) GatherJaegerCR

func (g *Gatherer) GatherJaegerCR(ctx context.Context) ([]record.Record, []error)

GatherJaegerCR Collects maximum of 5 `jaegers.jaegertracing.io` custom resources installed in the cluster.

### API Reference None

### Sample data - docs/insights-archive-sample/config/jaegertracing.io/jaeger1.json

### Location in archive - `config/jaegers.jaegertracing.io/{name}.json`

### Config ID `clusterconfig/jaegers`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherKubeControllerManagerLogs

func (g *Gatherer) GatherKubeControllerManagerLogs(ctx context.Context) ([]record.Record, []error)

GatherKubeControllerManagerLogs Collects logs from `kube-controller-manager` pods in the `openshift-kube-controller-manager` namespace with following substrings: - "Internal error occurred: error resolving resource", - "syncing garbage collector with updated resources from discovery",

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.10/rest_api/workloads_apis/pod-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data - docs/insights-archive-sample/config/pod/openshift-kube-controller-manager/logs/kube-controller-manager-ip-10-0-168-11.us-east-2.compute.internal/errors.log

### Location in archive - `config/pod/openshift-kube-controller-manager/logs/{pod-name}/errors.log`

### Config ID `clusterconfig/kube_controller_manager_logs`

### Released version - 4.11.0

### Backported versions - 4.10.6+ - 4.9.27+

### Changes None

func (*Gatherer) GatherMachine

func (g *Gatherer) GatherMachine(ctx context.Context) ([]record.Record, []error)

GatherMachine Collects `Machine` information.

### API Reference - https://github.com/openshift/api/blob/master/machine/v1beta1/types_machine.go - https://docs.openshift.com/container-platform/4.12/rest_api/machine_apis/machine-machine-openshift-io-v1beta1.html

### Sample data - docs/insights-archive-sample/config/machines/openshift-machine-api/

### Location in archive - `config/machines/`

### Config ID `clusterconfig/machines`

### Released version - 4.13.0

### Backported versions - 4.11.29+ - 4.12.5+

### Changes None

func (*Gatherer) GatherMachineAutoscalers

func (g *Gatherer) GatherMachineAutoscalers(ctx context.Context) ([]record.Record, []error)

GatherMachineAutoscalers Collects `MachineAutoscalers` definition.

### API Reference - https://github.com/openshift/cluster-autoscaler-operator/blob/master/pkg/apis/autoscaling/v1beta1/machineautoscaler_types.go - https://docs.openshift.com/container-platform/4.7/rest_api/autoscale_apis/machineautoscaler-autoscaling-openshift-io-v1beta1.html#machineautoscaler-autoscaling-openshift-io-v1beta1

### Sample data - docs/insights-archive-sample/config/machineautoscalers/openshift-machine-api/worker-us-east-1a.json

### Location in archive - `config/machineautoscalers/{namespace}/{name}.json`

### Config ID `clusterconfig/machine_autoscalers`

### Released version - 4.8.2

### Backported versions None

### Changes None

func (*Gatherer) GatherMachineConfigPool

func (g *Gatherer) GatherMachineConfigPool(ctx context.Context) ([]record.Record, []error)

GatherMachineConfigPool Collects `MachineConfigPool` information.

### API Reference - https://github.com/openshift/machine-config-operator/blob/master/pkg/apis/machineconfiguration.openshift.io/v1/types.go#L197 - https://docs.okd.io/latest/rest_api/machine_apis/machineconfigpool-machineconfiguration-openshift-io-v1.html

### Sample data - docs/insights-archive-sample/config/machineconfigpools

### Location in archive - `config/machineconfigpools`

### Config ID `clusterconfig/machine_config_pools`

### Released version - 4.7.0

### Backported versions - 4.5.33+ - 4.6.16+

### Changes None

func (*Gatherer) GatherMachineConfigs

func (g *Gatherer) GatherMachineConfigs(ctx context.Context) ([]record.Record, []error)

GatherMachineConfigs Collects `MachineConfigs` definitions. Following data is intentionally removed from the definitions: - `spec.config.storage.files` - `spec.config.passwd.users`

### API Reference - https://docs.openshift.com/container-platform/4.7/rest_api/machine_apis/machineconfig-machineconfiguration-openshift-io-v1.html

### Sample data - docs/insights-archive-sample/config/machineconfigs/75-worker-sap-data-intelligence.json

### Location in archive - `config/machineconfigs/{resource}.json`

### Config ID `clusterconfig/machine_configs`

### Released version - 4.9.0

### Backported versions - 4.8.5

### Changes None

func (*Gatherer) GatherMachineHealthCheck

func (g *Gatherer) GatherMachineHealthCheck(ctx context.Context) ([]record.Record, []error)

GatherMachineHealthCheck Collects `MachineHealthCheck` information.

### API Reference - https://github.com/openshift/api/blob/master/machine/v1beta1/types_machinehealthcheck.go - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#machinehealthcheck-v1beta1-machine-openshift-io

### Sample data - docs/insights-archive-sample/config/machinehealthchecks/openshift-machine-api/machine-api-termination-handler.json

### Location in archive - `config/machinehealthchecks/{namespace}/{resource}.json`

### Config ID `clusterconfig/machine_healthchecks`

### Released version - 4.8.0

### Backported versions None

### Changes None

func (*Gatherer) GatherMachineSet

func (g *Gatherer) GatherMachineSet(ctx context.Context) ([]record.Record, []error)

GatherMachineSet Collects `MachineSet` information.

### API Reference - https://github.com/openshift/api/blob/master/machine/v1beta1/types_machineset.go - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#machineset-v1beta1-machine-openshift-io

### Sample data - docs/insights-archive-sample/d50d0126-c90b-4428-a75f-dc08cd02960a-worker-test

### Location in archive - `config//machinesets/{resource}`

### Config ID `clusterconfig/machine_sets`

### Released version - 4.6.0

### Backported versions - 4.4.29+ - 4.5.15+

### Changes None

func (*Gatherer) GatherMonitoringPVs

func (g *Gatherer) GatherMonitoringPVs(ctx context.Context) ([]record.Record, []error)

GatherMonitoringPVs Collects Persistent Volumes from openshift-monitoring namespace which matches with ConfigMap configuration yaml

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/persistentvolume.go

### Sample data - docs/insights-archive-sample/config/persistentvolumes/monitoring-persistent-volume.json

### Location in archive - `config/persistentvolumes/{persistent_volume_name}.json`

### Config ID `clusterconfig/monitoring_persistent_volumes`

### Released version - 4.14

### Backported versions - 4.13.0 - 4.12.17 - 4.11.41

### Changes None

func (*Gatherer) GatherMostRecentMetrics

func (g *Gatherer) GatherMostRecentMetrics(ctx context.Context) ([]record.Record, []error)

GatherMostRecentMetrics Collects cluster Federated Monitoring metrics.

The GET REST query to URL /federate Gathered metrics:

  • `virt_platform`
  • `cluster_installer`
  • `vsphere_node_hw_version_total`
  • namespace CPU and memory usage
  • `console_helm_installs_total`
  • `console_helm_upgrades_total`
  • `console_helm_uninstalls_total`
  • `etcd_server_slow_apply_total`
  • `etcd_server_slow_read_indexes_total`
  • followed by at most 1000 lines of `ALERTS` metric

### API Reference None

### Sample data - docs/insights-archive-sample/config/metrics

### Location in archive - `config/metrics`

### Config ID `clusterconfig/metrics`

### Released version - 4.3.0

### Backported versions None

### Changes - `etcd_object_counts` introduced in version 4.3+ and removed in 4.12.0 - `cluster_installer` introduced in version 4.3+ - `ALERTS` introduced in version 4.3+ - `namespace:container_cpu_usage_seconds_total:sum_rate` introduced in version 4.5+ and changed to `namespace:container_cpu_usage:sum` in 4.16.0+ - `namespace:container_memory_usage_bytes:sum` introduced in version 4.5+ - `virt_platform metric` introduced in version 4.8+ and backported to 4.6.34+, 4.7.16+ versions - `vsphere_node_hw_version_total` introduced in version 4.8+ and backported to 4.7.11+ version - `console_helm_installs_total` introduced in version 4.11+ - `console_helm_upgrades_total` introduced in version 4.12+ - `console_helm_uninstalls_total` introduced in version 4.12+ - `openshift_apps_deploymentconfigs_strategy_total` introduced in version 4.13+ and backported to 4.12.5+ version - `etcd_server_slow_apply_total` introduced in version 4.16+ - `etcd_server_slow_read_indexes_total` introduced in version 4.16+

func (*Gatherer) GatherMutatingWebhookConfigurations

func (g *Gatherer) GatherMutatingWebhookConfigurations(ctx context.Context) ([]record.Record, []error)

GatherMutatingWebhookConfigurations Collects `MutatingWebhookConfiguration` resources.

### API Reference - https://docs.openshift.com/container-platform/4.8/rest_api/extension_apis/mutatingwebhookconfiguration-admissionregistration-k8s-io-v1.html

### Sample data - docs/insights-archive-sample/config/mutatingwebhookconfigurations

### Location in archive - `config/mutatingwebhookconfigurations/{resource}.json`

### Config ID `clusterconfig/mutating_webhook_configurations`

### Released version - 4.10.3

### Backported versions - 4.7.40+ - 4.8.24+ - 4.9.11+

### Changes None

func (*Gatherer) GatherNamespacesWithOverlappingUIDs

func (g *Gatherer) GatherNamespacesWithOverlappingUIDs(ctx context.Context) ([]record.Record, []error)

GatherNamespacesWithOverlappingUIDs Collects namespaces with overlapping UID ranges.

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/namespace.go - Response is an array of arrays of namespaces with overlapping UIDs. Each namespace is represented by its name and the UID range value from the `openshift.io/sa.scc.uid-range` annotation

### Sample data - docs/insights-archive-sample/config/namespaces_with_overlapping_uids.json

### Location in archive - `config/namespaces_with_overlapping_uids.json`

### Config ID `clusterconfig/overlapping_namespace_uids`

### Released version - 4.11.0

### Backported versions - 4.8.41+ - 4.9.31+ - 4.10.12+

### Changes None

func (*Gatherer) GatherNetNamespace

func (g *Gatherer) GatherNetNamespace(ctx context.Context) ([]record.Record, []error)

GatherNetNamespace Collects `NetNamespaces` networking information.

### API Reference - https://github.com/openshift/client-go/blob/master/network/clientset/versioned/typed/network/v1/netnamespace.go

### Sample data - docs/insights-archive-sample/config/netnamespaces.json

### Location in archive - `config/netnamespaces.json`

### Config ID `clusterconfig/netnamespaces`

### Released version - 4.7.0

### Backported versions - 4.6.20+

### Changes None

func (*Gatherer) GatherNodeLogs

func (g *Gatherer) GatherNodeLogs(ctx context.Context) ([]record.Record, []error)

GatherNodeLogs Collects control plane node logs from journal unit with following substrings:

  • E\\d{4} [0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}
  • connect: connection refused
  • failed (failure): command timed out
  • Failed to make webhook authenticator request: Post
  • raise JSONDecodeError("Expecting value", s, err.value) from None
  • ContainerStateWaiting{Reason:ContainerCreating
  • ContainersNotReady Message:containers with unready status
  • MountVolume.MountDevice failed for volume
  • kubernetes.io/csi: attacher.MountDevice failed to create newCsiDriverClient
  • Unable to attach or mount volumes: unmounted volumes
  • timed out waiting for the condition
  • CreateContainerError: context deadline exceeded
  • rpc error: code = ResourceExhausted desc = grpc: received message larger than max

### API Reference - https://docs.openshift.com/container-platform/4.9/rest_api/node_apis/node-core-v1.html#apiv1nodesnameproxypath

### Sample data - docs/insights-archive-sample/config/nodes/logs

### Location in archive - `config/nodes/logs/{hostname}.log`

### Config ID `clusterconfig/node_logs`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherNodes

func (g *Gatherer) GatherNodes(ctx context.Context) ([]record.Record, []error)

GatherNodes Collects all node resources.

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/node.go#L78 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#nodelist-v1core

### Sample data - docs/insights-archive-sample/config/node

### Location in archive - `config/node/{node}.json`

### Config ID `clusterconfig/nodes`

### Released version - 4.2.0

### Backported versions None

### Changes None

### Anonymization - Removes any annotation that does not match specific namespaces (`openshift.io/`, `k8s.io/`, `kubernetes.io/`). - Replaces the values of any label that matches the previously listed namespaces and not a region label (`failure-domain.beta.kubernetes.io/region`, `topology.kubernetes.io/region`) with 'x' strings while preserving its length. - Replaces the values of the node's status object fields such as `BootID`, `SystemUUID`, and `MachineID` with 'x' strings preserving the same length. - Clears the `Images` field of the node's status object, removing any information about the container images running on the node.

func (*Gatherer) GatherOLMOperators

func (g *Gatherer) GatherOLMOperators(ctx context.Context) ([]record.Record, []error)

GatherOLMOperators Collects the list of installed OLM operators. Each OLM operator (in the list) contains following data: - OLM operator name - OLM operator version - related `ClusterServiceVersion` conditions

### API Reference None

### Sample data - docs/insights-archive-sample/config/olm_operators.json

### Location in archive - `config/olm_operators`

### Config ID `clusterconfig/olm_operators`

### Released version - 4.7.0

### Backported versions - 4.6.26+

### Changes None

func (*Gatherer) GatherOpenShiftAPIServerOperatorLogs

func (g *Gatherer) GatherOpenShiftAPIServerOperatorLogs(ctx context.Context) ([]record.Record, []error)

GatherOpenShiftAPIServerOperatorLogs Collects logs from `openshift-apiserver-operator` with following substrings: - "the server has received too many requests and has asked us" - "because serving request timed out and response had been started"

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.6/rest_api/workloads_apis/pod-core-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data - docs/insights-archive-sample/config/pod/openshift-apiserver-operator/logs/openshift-apiserver-operator-6ddb679b87-4kn55/errors.log

### Location in archive - `config/pod/openshift-apiserver-operator/logs/{pod-name}/errors.log`

### Config ID `clusterconfig/openshift_apiserver_operator_logs`

### Released version - 4.7.0

### Backported versions None

### Changes None

func (*Gatherer) GatherOpenshiftAuthenticationLogs

func (g *Gatherer) GatherOpenshiftAuthenticationLogs(ctx context.Context) ([]record.Record, []error)

GatherOpenshiftAuthenticationLogs Collects logs from pods in `openshift-authentication` namespace with following substring: - "AuthenticationError: invalid resource name"

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.6/rest_api/workloads_apis/pod-core-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data - docs/insights-archive-sample/config/pod/openshift-authentication/logs/oauth-openshift-6c98668d5b-ftt5n/errors.log

### Location in archive - `config/pod/openshift-authentication/logs/{pod-name}/errors.log`

### Config ID `clusterconfig/openshift_authentication_logs`

### Released version - 4.7.0

### Backported versions None

### Changes None

func (*Gatherer) GatherOpenshiftLogging

func (g *Gatherer) GatherOpenshiftLogging(ctx context.Context) ([]record.Record, []error)

GatherOpenshiftLogging Collects `clusterlogging.logging.openshift.io` resources.

### API Reference - https://github.com/openshift/cluster-logging-operator/blob/master/pkg/apis/logging/v1/clusterlogging_types.go

### Sample data - docs/insights-archive-sample/config/logging/openshift-logging/instance.json

### Location in archive - `config/logging/{namespace}/{name}.json`

### Config ID `clusterconfig/openshift_logging`

### Released version - 4.9.0

### Backported versions None

### Changes None

func (*Gatherer) GatherOpenshiftMachineAPIEvents

func (g *Gatherer) GatherOpenshiftMachineAPIEvents(ctx context.Context) ([]record.Record, []error)

GatherOpenshiftMachineAPIEvents Collects warning ("abnormal") events from `openshift-machine-api` namespace

### API Reference None

### Sample data - docs/insights-archive-sample/events/openshift-machine-api.json

### Location in archive - `events/openshift-machine-api.json`

### Config ID `clusterconfig/openshift_machine_api_events`

### Released version - 4.12.0

### Backported versions None

### Changes None

func (*Gatherer) GatherOpenshiftSDNControllerLogs

func (g *Gatherer) GatherOpenshiftSDNControllerLogs(ctx context.Context) ([]record.Record, []error)

GatherOpenshiftSDNControllerLogs Collects logs from `sdn-controller` pod in `openshift-sdn` namespace with following substrings:

- "Node %s is not Ready": A node has been set offline for egress IPs because it is reported not ready at API - "Node %s may be offline... retrying": An egress node has failed the egress IP health check once, so it has big chances to be marked as offline soon or, at the very least, there has been a connectivity glitch. - "Node %s is offline": An egress node has failed enough probes to have been marked offline for egress IPs. If it has egress CIDRs assigned, its egress IPs have been moved to other nodes. Indicate issues at either the node or the network between the master and the node. - "Node %s is back online": This indicates that a node has recovered from the condition described at the previous message, by starting succeeding the egress IP health checks. Useful just in case that previous “Node %s is offline” messages are lost, so that we have a clue that there was failure previously.

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.6/rest_api/workloads_apis/pod-core-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data - docs/insights-archive-sample/config/pod/openshift-sdn/logs/sdn-f2694/errors.log - docs/insights-archive-sample/config/pod/openshift-sdn/logs/sdn-controller-l8gq9/errors.log

### Location in archive - `config/pod/openshift-sdn/logs/{pod-name}/errors.log`

### Config ID `clusterconfig/openshift_sdn_controller_logs`

### Released version - 4.7.0

### Backported versions - 4.6.21+

### Changes None

func (*Gatherer) GatherOpenshiftSDNLogs

func (g *Gatherer) GatherOpenshiftSDNLogs(ctx context.Context) ([]record.Record, []error)

GatherOpenshiftSDNLogs Collects logs from pods in `openshift-sdn` namespace with following substrings: - "Got OnEndpointsUpdate for unknown Endpoints", - "Got OnEndpointsDelete for unknown Endpoints", - "Unable to update proxy firewall for policy", - "Failed to update proxy firewall for policy",

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.6/rest_api/workloads_apis/pod-core-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data - docs/insights-archive-sample/config/pod/openshift-sdn/logs/sdn-f2694/errors.log

### Location in archive - `config/pod/openshift-sdn/logs/{name}/errors.log`

### Config ID `clusterconfig/openshift_sdn_logs`

### Released version - 4.7.0

### Backported versions - 4.6.19+

### Changes None

func (*Gatherer) GatherPodDisruptionBudgets

func (g *Gatherer) GatherPodDisruptionBudgets(ctx context.Context) ([]record.Record, []error)

GatherPodDisruptionBudgets Collects the cluster's `PodDisruptionBudgets`.

### API Reference - https://github.com/kubernetes/client-go/blob/v11.0.0/kubernetes/typed/policy/v1beta1/poddisruptionbudget.go#L80 - https://docs.okd.io/latest/rest_api/policy_apis/poddisruptionbudget-policy-v1beta1.html

### Sample data - docs/insights-archive-sample/config/pdbs/openshift-machine-config-operator/etcd-quorum-guard.json

### Location in archive - `config/pdbs/{namespace}/{name}.json`

### Config ID `clusterconfig/pdbs`

### Released version - 4.6.0

### Backported versions - 4.4.30+ - 4.5.15+

### Changes - The gatherer was changed to gather pdbs only from namespaces with "openshift" prefix and the limit of gathered records to 100 since 4.14.

func (*Gatherer) GatherPodNetworkConnectivityChecks

func (g *Gatherer) GatherPodNetworkConnectivityChecks(ctx context.Context) ([]record.Record, []error)

GatherPodNetworkConnectivityChecks Collects a summary of failed `PodNetworkConnectivityChecks` from last 24 hours.

Time of the most recently failed check with each reason and message is recorded.

### API Reference - podnetworkconnectivitychecks.controlplane.operator.openshift.io/v1alpha1 - https://pkg.go.dev/github.com/openshift/api/operatorcontrolplane/v1alpha1

### Sample data - docs/insights-archive-sample/config/podnetworkconnectivitychecks.json

### Location in archive - `config/podnetworkconnectivitychecks.json`

### Config ID `clusterconfig/pod_network_connectivity_checks`

### Released version - 4.8.2

### Backported versions None

### Changes None

func (*Gatherer) GatherPrometheusTSDBStatus

func (g *Gatherer) GatherPrometheusTSDBStatus(ctx context.Context) ([]record.Record, []error)

GatherPrometheusTSDBStatus Collects Prometheus TSDB status.

### API Reference None

### Sample data - docs/insights-archive-sample/config/tsdb.json

### Location in archive - `config/tsdb.json`

### Config ID `clusterconfig/tsdb_status`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherSAPConfig

func (g *Gatherer) GatherSAPConfig(ctx context.Context) ([]record.Record, []error)

GatherSAPConfig Collects selected security context constraints and cluster role bindings from clusters running a SAP payload.

### API Reference - https://pkg.go.dev/github.com/openshift/client-go/authorization/clientset/versioned/typed/authorization/v1 - https://pkg.go.dev/github.com/openshift/client-go/security/clientset/versioned/typed/security/v1

### Sample data - docs/insights-archive-sample/config/securitycontextconstraint - docs/insights-archive-sample/config/clusterrolebinding

### Location in archive - `config/clusterrolebinding/{name}.json` - `config/securitycontentconstraint/{name}.json`

### Config ID `clusterconfig/sap_config`

### Released version - 4.7.0

### Backported versions - 4.6.20+

### Changes None

func (*Gatherer) GatherSAPDatahubs

func (g *Gatherer) GatherSAPDatahubs(ctx context.Context) ([]record.Record, []error)

GatherSAPDatahubs Collects `datahubs.installers.datahub.sap.com` resources from SAP/SDI clusters.

### API Reference None

### Sample data - docs/insights-archive-sample/customresources/installers.datahub.sap.com/datahubs/sdi/default.json

### Location in archive - `customresources/installers.datahub.sap.com/datahubs/{namespace}/{name}.json`

### Config ID `clusterconfig/sap_datahubs`

### Released version - 4.8.2

### Backported versions - 4.7.5+ - 4.6.26+

### Changes None

func (*Gatherer) GatherSAPPods

func (g *Gatherer) GatherSAPPods(ctx context.Context) ([]record.Record, []error)

GatherSAPPods Collects information about pods running in SAP/SDI namespaces.

- Only pods with a failing status are collected. - Failed pods belonging to a job that has later succeeded are ignored.

> **Note** > This data is collected only if the `installers.datahub.sap.com` resource is found in the cluster.

### API Reference - https://pkg.go.dev/k8s.io/client-go/kubernetes/typed/core/v1 - https://pkg.go.dev/k8s.io/client-go/kubernetes/typed/batch/v1 - https://pkg.go.dev/k8s.io/client-go/dynamic

### Sample data None

### Location in archive - `config/pod/{namespace}/{name}.json`

### Config ID `clusterconfig/sap_pods`

### Released version - 4.8.2

### Backported versions - 4.7.5+ - 4.6.25+

### Changes None

func (*Gatherer) GatherSAPVsystemIptablesLogs

func (g *Gatherer) GatherSAPVsystemIptablesLogs(ctx context.Context) ([]record.Record, []error)

GatherSAPVsystemIptablesLogs Collects logs from SAP `vsystem-iptables` containers including one from license management pods with the following substring:

  • "can't initialize iptables table",

> **Note** > This data is collected only if the `installers.datahub.sap.com` resource is found in the cluster.

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.6/rest_api/workloads_apis/pod-core-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data - docs/insights-archive-sample/config/pod/sdi/logs/license-manager-da1d2e8fadfb8dd7022f08-4hjh7-6887768c5b-qzxb6/errors.log

### Location in archive - `config/pod/{namespace}/logs/{pod-name}/errors.log`

### Config ID `clusterconfig/sap_license_management_logs`

### Released version - 4.8.2

### Backported versions - 4.7.5+ - 4.6.25+

### Changes None

func (*Gatherer) GatherSchedulerLogs

func (g *Gatherer) GatherSchedulerLogs(ctx context.Context) ([]record.Record, []error)

GatherSchedulerLogs Collects logs from pods in `openshift-kube-scheduler-namespace` from app `openshift-kube-scheduler` with following substring: - "PodTopologySpread"

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/pod_expansion.go#L48 - https://docs.openshift.com/container-platform/4.6/rest_api/workloads_apis/pod-core-v1.html#apiv1namespacesnamespacepodsnamelog

### Sample data None

### Location in archive - `config/pod/openshift-kube-scheduler/logs/{pod-name}/messages.log`

### Config ID `clusterconfig/scheduler_logs`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherSchedulers

func (g *Gatherer) GatherSchedulers(ctx context.Context) ([]record.Record, []error)

GatherSchedulers Collects information about schedulers

### API Reference - https://docs.openshift.com/container-platform/4.9/rest_api/config_apis/scheduler-config-openshift-io-v1.html

### Sample data - docs/insights-archive-sample/config/schedulers/cluster.json

### Location in archive - `config/schedulers/cluster.json`

### Config ID `clusterconfig/schedulers`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherServiceAccounts

func (g *Gatherer) GatherServiceAccounts(ctx context.Context) ([]record.Record, []error)

GatherServiceAccounts Collects `ServiceAccount` stats from kubernetes default and `openshift-*` namespaces.

### API Reference - https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/serviceaccount.go#L83 - https://docs.openshift.com/container-platform/4.3/rest_api/index.html#serviceaccount-v1-core

### Sample data - docs/insights-archive-sample/config/serviceaccounts.json

### Location in archive - `config/serviceaccounts.json`

### Config ID `clusterconfig/service_accounts`

### Released version - 4.7.0

### Backported versions - 4.5.34+ - 4.6.20+

### Changes None

func (*Gatherer) GatherSilencedAlerts

func (g *Gatherer) GatherSilencedAlerts(ctx context.Context) ([]record.Record, []error)

GatherSilencedAlerts Collects the alerts that have been silenced.

### API Reference None

### Sample data - docs/insights-archive-sample/config/silenced_alerts.json

### Location in archive - `config/silenced_alerts.json`

### Config ID `config/silenced_alerts`

### Released version - 4.10.0

### Backported versions None

### Changes None

func (*Gatherer) GatherStorageClasses

func (g *Gatherer) GatherStorageClasses(ctx context.Context) ([]record.Record, []error)

GatherStorageClasses Collects the cluster `StorageClass` available in cluster.

### API Reference - https://docs.openshift.com/container-platform/4.13/rest_api/storage_apis/storageclass-storage-k8s-io-v1.html

### Sample data - docs/insights-archive-sample/config/storage/storageclasses/standard-csi.json

### Location in archive - `config/storage/storageclasses/{name}.json`

### Config ID `clusterconfig/storage_classes`

### Released version - 4.15

### Backported versions None

### Changes None

func (*Gatherer) GatherStorageCluster

func (g *Gatherer) GatherStorageCluster(ctx context.Context) ([]record.Record, []error)

GatherStorageCluster Collects `storageclusters.ocs.openshift.io` resources

### API Reference - https://github.com/red-hat-storage/ocs-operator/blob/main/api/v1/storagecluster_types.go

### Sample data - docs/insights-archive-sample/config/storage/openshift-storage/storageclusters/ocs-storagecluster.json

| Version | Path | | --------- | -------------------------------------------------------- | | < 4.12.0 | config/storage/{namespace}/{name}.json | | >= 4.12.0 | config/storage/{namespace}/storageclusters/{name}.json |

### Config ID `clusterconfig/storage_cluster`

### Released version - 4.11.0

### Backported versions None

### Changes - Renamed from `OpenshiftStorage` to `StorageCluster` in version `4.12.0+` - Config ID changed from `clusterconfig/openshift_storage` to `clusterconfig/storage_cluster` in version `4.12.0+` - In OCP 4.11 and OCP 4.12, the location of gathered data collides with data gathered by the CephCluster](#CephCluster) gatherer. It is practically impossible to tell the two resources apart. Use with caution.

func (*Gatherer) GatherSupportSecret

func (g *Gatherer) GatherSupportSecret(ctx context.Context) ([]record.Record, []error)

GatherSupportSecret Collects anonymized support secret if there is any

### API Reference None

### Sample data - docs/insights-archive-sample/config/secrets/openshift-config/support/data.json

### Location in archive - `config/secrets/openshift-config/support/data.json`

### Config ID `clusterconfig/support_secret`

### Released version - 4.11.0

### Backported versions None

### Changes None

func (*Gatherer) GatherValidatingWebhookConfigurations

func (g *Gatherer) GatherValidatingWebhookConfigurations(ctx context.Context) ([]record.Record, []error)

GatherValidatingWebhookConfigurations Collects `ValidatingWebhookConfiguration` resources

### API Reference - https://docs.openshift.com/container-platform/4.8/rest_api/extension_apis/validatingwebhookconfiguration-admissionregistration-k8s-io-v1.html

### Sample data - docs/insights-archive-sample/config/validatingwebhookconfigurations/

### Location in archive - `config/validatingwebhookconfigurations/{name}.json`

### Config ID `clusterconfig/validating_webhook_configurations`

### Released version - 4.10.3

### Backported versions - 4.7.40+ - 4.8.24+ - 4.9.11+

### Changes None

func (*Gatherer) GetGatheringFunctions

func (g *Gatherer) GetGatheringFunctions(context.Context) (map[string]gatherers.GatheringClosure, error)

func (*Gatherer) GetName

func (g *Gatherer) GetName() string

type MonitoringPVGatherer

type MonitoringPVGatherer struct {
	// contains filtered or unexported fields
}

type NamespaceSet

type NamespaceSet map[namespaceWithRange]struct{}

func NewSet

func NewSet(namespaces ...namespaceWithRange) NamespaceSet

NewSet creates a set of namesapces from a list of values.

func (NamespaceSet) BothOverlap

func (ns NamespaceSet) BothOverlap(n1, n2 namespaceWithRange) bool

BothOverlap checks if the namespaces n1 and n2 are overlapping with all ranges in the set

func (NamespaceSet) Insert

func (ns NamespaceSet) Insert(namespaces ...namespaceWithRange) NamespaceSet

Insert adds namespaces to the set.

type PodsWithAge

type PodsWithAge map[string]RunningImages

PodsWithAge maps the YYYY-MM string representation of start time to list of pods running since that month.

func (PodsWithAge) Add

func (p PodsWithAge) Add(startMonth string, image, count int)

Add inserts the specified container information into the data structure.

type RawJSON

type RawJSON []byte

func (RawJSON) GetExtension

func (r RawJSON) GetExtension() string

GetExtension returns json extension

func (RawJSON) Marshal

func (r RawJSON) Marshal() ([]byte, error)

Marshal just returns bytes

type RunningImages

type RunningImages map[int]int

RunningImages assigns information about running containers to a specific image index. The index is a reference to an item in the related `ContainerImageSet` instance.

type ServiceAccountsMarshaller

type ServiceAccountsMarshaller struct {
	// contains filtered or unexported fields
}

ServiceAccountsMarshaller implements serialization of Service Accounts

func (ServiceAccountsMarshaller) GetExtension

func (a ServiceAccountsMarshaller) GetExtension() string

GetExtension returns extension for anonymized openshift objects

func (ServiceAccountsMarshaller) Marshal

func (a ServiceAccountsMarshaller) Marshal() ([]byte, error)

Marshal implements serialization of ServiceAccount

type SetOfNamespaceSets

type SetOfNamespaceSets []NamespaceSet

func (SetOfNamespaceSets) BothOverlap

func (ss SetOfNamespaceSets) BothOverlap(n1, n2 namespaceWithRange) (NamespaceSet, bool)

BothOverlap tries to find a NamespaceSet where all the members overlap with n1 and n2

func (SetOfNamespaceSets) GetExtension

func (ss SetOfNamespaceSets) GetExtension() string

func (SetOfNamespaceSets) Marshal

func (ss SetOfNamespaceSets) Marshal() ([]byte, error)

type StateFeatures

type StateFeatures struct {
	UID      string
	Username string
	Groups   []string
	Usages   []certificatesv1api.KeyUsage

	Request *CsrFeatures
}

type StatusFeatures

type StatusFeatures struct {
	Conditions []certificatesv1api.CertificateSigningRequestCondition
	Cert       *CertFeatures
}

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL