Skip to content

Commit 36ea081

Browse files
authored
OCPBUGS-6781: Create gatherer for gathering machines. (#725)
* Created gatherer for gathering machine objects. * Fixing names of functions, variables, etc * fixing file names * Docs update with new gathered data and new sample data. * formatted json files to human readable format * documentation and code fixes * Fixed location of sample files in docs * Updated docs based on new format. * tiny fix of go comment * fixes * unit test fixes * lint fix * unit test fixes
1 parent 54bcf2f commit 36ea081

11 files changed

+1262
-0
lines changed

docs/gathered-data.md

+27
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,33 @@ None
898898
None
899899

900900

901+
## Machine
902+
903+
Collects `Machine` information.
904+
905+
### API Reference
906+
- https://github.com/openshift/api/blob/master/machine/v1beta1/types_machine.go
907+
- https://docs.openshift.com/container-platform/4.12/rest_api/machine_apis/machine-machine-openshift-io-v1beta1.html
908+
909+
### Sample data
910+
- [docs/insights-archive-sample/config/machines/openshift-machine-api/](./insights-archive-sample/config/machines/openshift-machine-api/)
911+
912+
### Location in archive
913+
- `config/machines/`
914+
915+
### Config ID
916+
`clusterconfig/machines`
917+
918+
### Released version
919+
- 4.13.0
920+
921+
### Backported versions
922+
None
923+
924+
### Changes
925+
None
926+
927+
901928
## MachineAutoscalers
902929

903930
Collects `MachineAutoscalers` definition.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
{
2+
"apiVersion": "machine.openshift.io/v1beta1",
3+
"kind": "Machine",
4+
"metadata": {
5+
"annotations": {
6+
"machine.openshift.io/instance-state": "running"
7+
},
8+
"creationTimestamp": "2023-01-26T09:05:12Z",
9+
"finalizers": [
10+
"machine.machine.openshift.io"
11+
],
12+
"generation": 3,
13+
"labels": {
14+
"machine.openshift.io/cluster-api-cluster": "dev-rhrmo-dev-26-01-2-tk6g8",
15+
"machine.openshift.io/cluster-api-machine-role": "master",
16+
"machine.openshift.io/cluster-api-machine-type": "master",
17+
"machine.openshift.io/instance-type": "m6i.xlarge",
18+
"machine.openshift.io/region": "xxxxxxxxx",
19+
"machine.openshift.io/zone": "us-east-2a"
20+
},
21+
"name": "dev-rhrmo-dev-26-01-2-tk6g8-master-0",
22+
"namespace": "openshift-machine-api",
23+
"ownerReferences": [
24+
{
25+
"apiVersion": "machine.openshift.io/v1",
26+
"blockOwnerDeletion": true,
27+
"controller": true,
28+
"kind": "ControlPlaneMachineSet",
29+
"name": "cluster",
30+
"uid": "7d68aa4d-7bdb-44bf-b31c-c232412d303c"
31+
}
32+
],
33+
"resourceVersion": "10714",
34+
"uid": "fe0ed5af-d947-484a-8a8d-6393b891a66d"
35+
},
36+
"spec": {
37+
"lifecycleHooks": {
38+
"preDrain": [
39+
{
40+
"name": "EtcdQuorumOperator",
41+
"owner": "clusteroperator/etcd"
42+
}
43+
]
44+
},
45+
"metadata": {},
46+
"providerID": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
47+
"providerSpec": {
48+
"value": {
49+
"ami": {
50+
"id": "ami-0ff64f495c7e977cf"
51+
},
52+
"apiVersion": "machine.openshift.io/v1beta1",
53+
"blockDevices": [
54+
{
55+
"ebs": {
56+
"encrypted": true,
57+
"iops": 0,
58+
"kmsKey": {
59+
"arn": ""
60+
},
61+
"volumeSize": 120,
62+
"volumeType": "gp3"
63+
}
64+
}
65+
],
66+
"credentialsSecret": {
67+
"name": "aws-cloud-credentials"
68+
},
69+
"deviceIndex": 0,
70+
"iamInstanceProfile": {
71+
"id": "dev-rhrmo-dev-26-01-2-tk6g8-master-profile"
72+
},
73+
"instanceType": "m6i.xlarge",
74+
"kind": "AWSMachineProviderConfig",
75+
"loadBalancers": [
76+
{
77+
"name": "dev-rhrmo-dev-26-01-2-tk6g8-int",
78+
"type": "network"
79+
},
80+
{
81+
"name": "dev-rhrmo-dev-26-01-2-tk6g8-ext",
82+
"type": "network"
83+
}
84+
],
85+
"metadata": {
86+
"creationTimestamp": null
87+
},
88+
"metadataServiceOptions": {},
89+
"placement": {
90+
"availabilityZone": "xxxxxxxxxx",
91+
"region": "xxxxxxxxx"
92+
},
93+
"securityGroups": [
94+
{
95+
"filters": [
96+
{
97+
"name": "tag:Name",
98+
"values": [
99+
"dev-rhrmo-dev-26-01-2-tk6g8-master-sg"
100+
]
101+
}
102+
]
103+
}
104+
],
105+
"subnet": {
106+
"filters": [
107+
{
108+
"name": "tag:Name",
109+
"values": [
110+
"dev-rhrmo-dev-26-01-2-tk6g8-private-us-east-2a"
111+
]
112+
}
113+
]
114+
},
115+
"tags": [
116+
{
117+
"name": "kubernetes.io/cluster/dev-rhrmo-dev-26-01-2-tk6g8",
118+
"value": "owned"
119+
}
120+
],
121+
"userDataSecret": {
122+
"name": "master-user-data"
123+
}
124+
}
125+
}
126+
},
127+
"status": {
128+
"addresses": [
129+
{
130+
"address": "10.0.0.3",
131+
"type": "InternalIP"
132+
},
133+
{
134+
"address": "ip-10-0-152-232.us-east-2.compute.internal",
135+
"type": "InternalDNS"
136+
},
137+
{
138+
"address": "ip-10-0-152-232.us-east-2.compute.internal",
139+
"type": "Hostname"
140+
}
141+
],
142+
"conditions": [
143+
{
144+
"lastTransitionTime": "2023-01-26T09:09:40Z",
145+
"message": "Drain operation currently blocked by: [{Name:EtcdQuorumOperator Owner:clusteroperator/etcd}]",
146+
"reason": "HookPresent",
147+
"severity": "Warning",
148+
"status": "False",
149+
"type": "Drainable"
150+
},
151+
{
152+
"lastTransitionTime": "2023-01-26T09:09:16Z",
153+
"status": "True",
154+
"type": "InstanceExists"
155+
},
156+
{
157+
"lastTransitionTime": "2023-01-26T09:08:33Z",
158+
"status": "True",
159+
"type": "Terminable"
160+
}
161+
],
162+
"lastUpdated": "2023-01-26T09:09:40Z",
163+
"nodeRef": {
164+
"kind": "Node",
165+
"name": "ip-10-0-152-232.us-east-2.compute.internal",
166+
"uid": "37137c8c-da38-4947-a5b0-b1ea60574052"
167+
},
168+
"phase": "Running",
169+
"providerStatus": {
170+
"conditions": [
171+
{
172+
"lastTransitionTime": "2023-01-26T09:09:16Z",
173+
"message": "Machine successfully created",
174+
"reason": "MachineCreationSucceeded",
175+
"status": "True",
176+
"type": "MachineCreation"
177+
}
178+
],
179+
"instanceId": "i-0b508963b4f21ef2e",
180+
"instanceState": "running"
181+
}
182+
}
183+
}

0 commit comments

Comments
 (0)