From fa6127a339e325dae5df256b2dd372db2e0a6941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Reme=C5=A1?= Date: Thu, 17 Jun 2021 09:49:40 +0200 Subject: [PATCH 1/2] Gathered data doc update - add some known previous locations --- docs/gathered-data.md | 5 +++++ pkg/gatherers/clusterconfig/config_maps.go | 1 + pkg/gatherers/clusterconfig/image_pruners.go | 1 + pkg/gatherers/clusterconfig/image_registries.go | 1 + pkg/gatherers/clusterconfig/operators.go | 2 ++ 5 files changed, 10 insertions(+) diff --git a/docs/gathered-data.md b/docs/gathered-data.md index ca9f686ebe..68896257ae 100644 --- a/docs/gathered-data.md +++ b/docs/gathered-data.md @@ -60,6 +60,7 @@ Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.ht fetches the image pruner configuration +* Previous location in the older archives: config/imagepruner.json * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/imagepruner/cluster.json * Id in config: image_pruners @@ -71,6 +72,7 @@ fetches the cluster Image Registry configuration **Conditional data**: If the Image Registry configuration uses any PersistentVolumeClaim for the storage, the corresponding PersistentVolume definition is gathered +* Previous location in the older archives: config/imageregistry.json * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/config/cluster.json * Id in config: image_registries * Since versions: @@ -159,6 +161,8 @@ collects all the ClusterOperators definitions and their resources. The Kubernetes api https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/clusteroperator.go#L62 Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#clusteroperatorlist-v1config-openshift-io +* Previous location of operators related resources in the older archives: config/clusteroperator/{kind}-{name} +* Location of operators related resources: config/clusteroperator/{group}/{kind}/{name} * Location of operators in archive: config/clusteroperator/ * See: docs/insights-archive-sample/config/clusteroperator * Id in config: operators @@ -208,6 +212,7 @@ For example config/configmaps/NAMESPACENAME/CONFIGMAPNAME/CONFIGMAPKEY1 The Kubernetes api https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go#L80 Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#configmaplist-v1core +* Previous location in the older archives: config/configmaps/{configmap-name}/ * Location in archive: config/configmaps/{namespace-name}/{configmap-name}/ * See: docs/insights-archive-sample/config/configmaps * Id in config: config_maps diff --git a/pkg/gatherers/clusterconfig/config_maps.go b/pkg/gatherers/clusterconfig/config_maps.go index 202d28e2f8..44624a5137 100644 --- a/pkg/gatherers/clusterconfig/config_maps.go +++ b/pkg/gatherers/clusterconfig/config_maps.go @@ -26,6 +26,7 @@ import ( // The Kubernetes api https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go#L80 // Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#configmaplist-v1core // +// * Previous location in the older archives: config/configmaps/{configmap-name}/ // * Location in archive: config/configmaps/{namespace-name}/{configmap-name}/ // * See: docs/insights-archive-sample/config/configmaps // * Id in config: config_maps diff --git a/pkg/gatherers/clusterconfig/image_pruners.go b/pkg/gatherers/clusterconfig/image_pruners.go index 0810c62ee1..4a7f0d3c65 100644 --- a/pkg/gatherers/clusterconfig/image_pruners.go +++ b/pkg/gatherers/clusterconfig/image_pruners.go @@ -16,6 +16,7 @@ import ( // GatherClusterImagePruner fetches the image pruner configuration // +// * Previous location in the older archives: config/imagepruner.json // * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/imagepruner/cluster.json // * Id in config: image_pruners func (g *Gatherer) GatherClusterImagePruner(ctx context.Context) ([]record.Record, []error) { diff --git a/pkg/gatherers/clusterconfig/image_registries.go b/pkg/gatherers/clusterconfig/image_registries.go index fb9fba87c1..d79154f8b5 100644 --- a/pkg/gatherers/clusterconfig/image_registries.go +++ b/pkg/gatherers/clusterconfig/image_registries.go @@ -24,6 +24,7 @@ import ( // **Conditional data**: If the Image Registry configuration uses any PersistentVolumeClaim for the storage, the corresponding // PersistentVolume definition is gathered // +// * Previous location in the older archives: config/imageregistry.json // * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/config/cluster.json // * Id in config: image_registries // * Since versions: diff --git a/pkg/gatherers/clusterconfig/operators.go b/pkg/gatherers/clusterconfig/operators.go index a741f7fc81..88aed07773 100644 --- a/pkg/gatherers/clusterconfig/operators.go +++ b/pkg/gatherers/clusterconfig/operators.go @@ -37,6 +37,8 @@ type clusterOperatorResource struct { // The Kubernetes api https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/clusteroperator.go#L62 // Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#clusteroperatorlist-v1config-openshift-io // +// * Previous location of operators related resources in the older archives: config/clusteroperator/{kind}-{name} +// * Location of operators related resources: config/clusteroperator/{group}/{kind}/{name} // * Location of operators in archive: config/clusteroperator/ // * See: docs/insights-archive-sample/config/clusteroperator // * Id in config: operators From 150401acba9ed5358e7ba64c054c5b9410b66bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Reme=C5=A1?= Date: Mon, 21 Jun 2021 08:41:08 +0200 Subject: [PATCH 2/2] Update according to suggestions --- docs/gathered-data.md | 8 ++++---- pkg/gatherers/clusterconfig/config_maps.go | 2 +- pkg/gatherers/clusterconfig/image_pruners.go | 2 +- pkg/gatherers/clusterconfig/image_registries.go | 2 +- pkg/gatherers/clusterconfig/operators.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/gathered-data.md b/docs/gathered-data.md index 68896257ae..e7d2968d93 100644 --- a/docs/gathered-data.md +++ b/docs/gathered-data.md @@ -60,8 +60,8 @@ Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.ht fetches the image pruner configuration -* Previous location in the older archives: config/imagepruner.json * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/imagepruner/cluster.json +* Location in older versions: config/imagepruner.json * Id in config: image_pruners @@ -72,8 +72,8 @@ fetches the cluster Image Registry configuration **Conditional data**: If the Image Registry configuration uses any PersistentVolumeClaim for the storage, the corresponding PersistentVolume definition is gathered -* Previous location in the older archives: config/imageregistry.json * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/config/cluster.json +* Location in older versions: config/imageregistry.json * Id in config: image_registries * Since versions: * 4.3.40+ @@ -161,9 +161,9 @@ collects all the ClusterOperators definitions and their resources. The Kubernetes api https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/clusteroperator.go#L62 Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#clusteroperatorlist-v1config-openshift-io -* Previous location of operators related resources in the older archives: config/clusteroperator/{kind}-{name} * Location of operators related resources: config/clusteroperator/{group}/{kind}/{name} * Location of operators in archive: config/clusteroperator/ +* Location of operators related resources in older versions: config/clusteroperator/{kind}-{name} * See: docs/insights-archive-sample/config/clusteroperator * Id in config: operators * Spec config for CO resources since versions: @@ -212,8 +212,8 @@ For example config/configmaps/NAMESPACENAME/CONFIGMAPNAME/CONFIGMAPKEY1 The Kubernetes api https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go#L80 Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#configmaplist-v1core -* Previous location in the older archives: config/configmaps/{configmap-name}/ * Location in archive: config/configmaps/{namespace-name}/{configmap-name}/ +* Location in older versions: config/configmaps/{configmap-name}/ * See: docs/insights-archive-sample/config/configmaps * Id in config: config_maps * Since versions: diff --git a/pkg/gatherers/clusterconfig/config_maps.go b/pkg/gatherers/clusterconfig/config_maps.go index 44624a5137..b71275a6dd 100644 --- a/pkg/gatherers/clusterconfig/config_maps.go +++ b/pkg/gatherers/clusterconfig/config_maps.go @@ -26,8 +26,8 @@ import ( // The Kubernetes api https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go#L80 // Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#configmaplist-v1core // -// * Previous location in the older archives: config/configmaps/{configmap-name}/ // * Location in archive: config/configmaps/{namespace-name}/{configmap-name}/ +// * Location in older versions: config/configmaps/{configmap-name}/ // * See: docs/insights-archive-sample/config/configmaps // * Id in config: config_maps // * Since versions: diff --git a/pkg/gatherers/clusterconfig/image_pruners.go b/pkg/gatherers/clusterconfig/image_pruners.go index 4a7f0d3c65..6ce0f98d4f 100644 --- a/pkg/gatherers/clusterconfig/image_pruners.go +++ b/pkg/gatherers/clusterconfig/image_pruners.go @@ -16,8 +16,8 @@ import ( // GatherClusterImagePruner fetches the image pruner configuration // -// * Previous location in the older archives: config/imagepruner.json // * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/imagepruner/cluster.json +// * Location in older versions: config/imagepruner.json // * Id in config: image_pruners func (g *Gatherer) GatherClusterImagePruner(ctx context.Context) ([]record.Record, []error) { registryClient, err := imageregistryv1client.NewForConfig(g.gatherKubeConfig) diff --git a/pkg/gatherers/clusterconfig/image_registries.go b/pkg/gatherers/clusterconfig/image_registries.go index d79154f8b5..f33ab94619 100644 --- a/pkg/gatherers/clusterconfig/image_registries.go +++ b/pkg/gatherers/clusterconfig/image_registries.go @@ -24,8 +24,8 @@ import ( // **Conditional data**: If the Image Registry configuration uses any PersistentVolumeClaim for the storage, the corresponding // PersistentVolume definition is gathered // -// * Previous location in the older archives: config/imageregistry.json // * Location in archive: config/clusteroperator/imageregistry.operator.openshift.io/config/cluster.json +// * Location in older versions: config/imageregistry.json // * Id in config: image_registries // * Since versions: // * 4.3.40+ diff --git a/pkg/gatherers/clusterconfig/operators.go b/pkg/gatherers/clusterconfig/operators.go index 88aed07773..bc89fdd211 100644 --- a/pkg/gatherers/clusterconfig/operators.go +++ b/pkg/gatherers/clusterconfig/operators.go @@ -37,9 +37,9 @@ type clusterOperatorResource struct { // The Kubernetes api https://github.com/openshift/client-go/blob/master/config/clientset/versioned/typed/config/v1/clusteroperator.go#L62 // Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#clusteroperatorlist-v1config-openshift-io // -// * Previous location of operators related resources in the older archives: config/clusteroperator/{kind}-{name} // * Location of operators related resources: config/clusteroperator/{group}/{kind}/{name} // * Location of operators in archive: config/clusteroperator/ +// * Location of operators related resources in older versions: config/clusteroperator/{kind}-{name} // * See: docs/insights-archive-sample/config/clusteroperator // * Id in config: operators // * Spec config for CO resources since versions: