Skip to content

Commit f775f04

Browse files
Merge pull request #329 from tremes/configmap_update
Bug 1925408: Remove StatefulSet gatherer & replace it with gathering "cluster-mon…
2 parents 45317ed + 500bac5 commit f775f04

File tree

22 files changed

+59
-1301
lines changed

22 files changed

+59
-1301
lines changed

Diff for: docs/gathered-data.md

+5-14
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,18 @@ Id in config: version
175175

176176
## ConfigMaps
177177

178-
fetches the ConfigMaps from namespace openshift-config.
178+
fetches the ConfigMaps from namespace openshift-config
179+
and tries to fetch "cluster-monitoring-config" ConfigMap from openshift-monitoring namespace.
179180

180181
Anonymization: If the content of ConfigMap contains a parseable PEM structure (like certificate) it removes the inside of PEM blocks.
181182
For ConfigMap of type BinaryData it is encoded as standard base64.
182-
In the archive under configmaps we store name of ConfigMap and then each ConfigMap Key. For example config/configmaps/CONFIGMAPNAME/CONFIGMAPKEY1
183+
In the archive under configmaps we store name of the namesapce, name of the ConfigMap and then each ConfigMap Key.
184+
For example config/configmaps/NAMESPACENAME/CONFIGMAPNAME/CONFIGMAPKEY1
183185

184186
The Kubernetes api https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/core/v1/configmap.go#L80
185187
Response see https://docs.openshift.com/container-platform/4.3/rest_api/index.html#configmaplist-v1core
186188

187-
Location in archive: config/configmaps/
189+
Location in archive: config/configmaps/{namespace-name}/{configmap-name}/
188190
See: docs/insights-archive-sample/config/configmaps
189191
Id in config: config_maps
190192

@@ -410,14 +412,3 @@ See: docs/insights-archive-sample/config/serviceaccounts
410412
Id in config: service_accounts
411413

412414

413-
## StatefulSets
414-
415-
collects StatefulSet configs from default namespaces
416-
417-
The Kubernetes API https://github.com/kubernetes/api/blob/master/apps/v1/types.go
418-
Response see https://docs.openshift.com/container-platform/4.5/rest_api/workloads_apis/statefulset-apps-v1.html#statefulset-apps-v1
419-
420-
Location in archive: config/statefulsets/
421-
Id in config: stateful_sets
422-
423-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"prometheusK8s": {
3+
"volumeClaimTemplate": {
4+
"spec": {
5+
"resources": {
6+
"requests": {
7+
"storage": "10Mi"
8+
}
9+
},
10+
"storageClassName": "manual",
11+
"volumeMode": "Filesystem"
12+
}
13+
}
14+
}
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
W0202 14:39:15.823283 4239 proxy.go:334] Got OnEndpointsUpdate for unknown Endpoints &v1.Endpoints{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"hco-webhook-service", GenerateName:"", Namespace:"openshift-cnv", SelfLink:"/api/v1/namespaces/openshift-cnv/endpoints/hco-webhook-service", UID:"041b4848-2457-43d3-a39b-ce8c94dcf726", ResourceVersion:"7168774", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63747873550, loc:(*time.Location)(0x2e24d20)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"operators.coreos.com/kubevirt-hyperconverged.openshift-cnv":""}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:"kube-controller-manager", Operation:"Update", APIVersion:"v1", Time:(*v1.Time)(0xc0012be6a0), FieldsType:"FieldsV1", FieldsV1:(*v1.FieldsV1)(0xc0012be6c0)}}}, Subsets:[]v1.EndpointSubset{v1.EndpointSubset{Addresses:[]v1.EndpointAddress{v1.EndpointAddress{IP:"10.129.2.18", Hostname:"", NodeName:(*string)(0xc000b728c0), TargetRef:(*v1.ObjectReference)(0xc000440070)}}, NotReadyAddresses:[]v1.EndpointAddress(nil), Ports:[]v1.EndpointPort{v1.EndpointPort{Name:"4343", Port:4343, Protocol:"TCP", AppProtocol:(*string)(nil)}}}}}
2+
W0202 14:39:15.823958 4239 proxy.go:334] Got OnEndpointsUpdate for unknown Endpoints &v1.Endpoints{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"ssp-operator-service", GenerateName:"", Namespace:"openshift-cnv", SelfLink:"/api/v1/namespaces/openshift-cnv/endpoints/ssp-operator-service", UID:"a362a291-f39c-4982-85f6-2bb539b013d8", ResourceVersion:"7168808", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63747873550, loc:(*time.Location)(0x2e24d20)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"operators.coreos.com/kubevirt-hyperconverged.openshift-cnv":""}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:"kube-controller-manager", Operation:"Update", APIVersion:"v1", Time:(*v1.Time)(0xc0012bea20), FieldsType:"FieldsV1", FieldsV1:(*v1.FieldsV1)(0xc0012bea40)}}}, Subsets:[]v1.EndpointSubset{v1.EndpointSubset{Addresses:[]v1.EndpointAddress{v1.EndpointAddress{IP:"10.129.2.21", Hostname:"", NodeName:(*string)(0xc000b72a00), TargetRef:(*v1.ObjectReference)(0xc000440d20)}}, NotReadyAddresses:[]v1.EndpointAddress(nil), Ports:[]v1.EndpointPort{v1.EndpointPort{Name:"9443", Port:9443, Protocol:"TCP", AppProtocol:(*string)(nil)}}}}}
3+
W0202 14:39:15.824838 4239 proxy.go:334] Got OnEndpointsUpdate for unknown Endpoints &v1.Endpoints{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"node-maintenance-operator-service", GenerateName:"", Namespace:"openshift-cnv", SelfLink:"/api/v1/namespaces/openshift-cnv/endpoints/node-maintenance-operator-service", UID:"d3a51de4-2492-496a-ab6c-a420f23d05c9", ResourceVersion:"7168837", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:63747873551, loc:(*time.Location)(0x2e24d20)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"operators.coreos.com/kubevirt-hyperconverged.openshift-cnv":""}, Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry{v1.ManagedFieldsEntry{Manager:"kube-controller-manager", Operation:"Update", APIVersion:"v1", Time:(*v1.Time)(0xc0012beda0), FieldsType:"FieldsV1", FieldsV1:(*v1.FieldsV1)(0xc0012bedc0)}}}, Subsets:[]v1.EndpointSubset{v1.EndpointSubset{Addresses:[]v1.EndpointAddress{v1.EndpointAddress{IP:"10.129.0.94", Hostname:"", NodeName:(*string)(0xc000b72c00), TargetRef:(*v1.ObjectReference)(0xc0002fe930)}}, NotReadyAddresses:[]v1.EndpointAddress(nil), Ports:[]v1.EndpointPort{v1.EndpointPort{Name:"8443", Port:8443, Protocol:"TCP", AppProtocol:(*string)(nil)}}}}}

0 commit comments

Comments
 (0)