Skip to content

Commit

Permalink
OCPBUGS-6781: Create gatherer for gathering machines. (#725)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
rhrmo authored Feb 10, 2023
1 parent 54bcf2f commit 36ea081
Show file tree
Hide file tree
Showing 11 changed files with 1,262 additions and 0 deletions.
27 changes: 27 additions & 0 deletions docs/gathered-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,33 @@ None
None


## Machine

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/](./insights-archive-sample/config/machines/openshift-machine-api/)

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

### Config ID
`clusterconfig/machines`

### Released version
- 4.13.0

### Backported versions
None

### Changes
None


## MachineAutoscalers

Collects `MachineAutoscalers` definition.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
{
"apiVersion": "machine.openshift.io/v1beta1",
"kind": "Machine",
"metadata": {
"annotations": {
"machine.openshift.io/instance-state": "running"
},
"creationTimestamp": "2023-01-26T09:05:12Z",
"finalizers": [
"machine.machine.openshift.io"
],
"generation": 3,
"labels": {
"machine.openshift.io/cluster-api-cluster": "dev-rhrmo-dev-26-01-2-tk6g8",
"machine.openshift.io/cluster-api-machine-role": "master",
"machine.openshift.io/cluster-api-machine-type": "master",
"machine.openshift.io/instance-type": "m6i.xlarge",
"machine.openshift.io/region": "xxxxxxxxx",
"machine.openshift.io/zone": "us-east-2a"
},
"name": "dev-rhrmo-dev-26-01-2-tk6g8-master-0",
"namespace": "openshift-machine-api",
"ownerReferences": [
{
"apiVersion": "machine.openshift.io/v1",
"blockOwnerDeletion": true,
"controller": true,
"kind": "ControlPlaneMachineSet",
"name": "cluster",
"uid": "7d68aa4d-7bdb-44bf-b31c-c232412d303c"
}
],
"resourceVersion": "10714",
"uid": "fe0ed5af-d947-484a-8a8d-6393b891a66d"
},
"spec": {
"lifecycleHooks": {
"preDrain": [
{
"name": "EtcdQuorumOperator",
"owner": "clusteroperator/etcd"
}
]
},
"metadata": {},
"providerID": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"providerSpec": {
"value": {
"ami": {
"id": "ami-0ff64f495c7e977cf"
},
"apiVersion": "machine.openshift.io/v1beta1",
"blockDevices": [
{
"ebs": {
"encrypted": true,
"iops": 0,
"kmsKey": {
"arn": ""
},
"volumeSize": 120,
"volumeType": "gp3"
}
}
],
"credentialsSecret": {
"name": "aws-cloud-credentials"
},
"deviceIndex": 0,
"iamInstanceProfile": {
"id": "dev-rhrmo-dev-26-01-2-tk6g8-master-profile"
},
"instanceType": "m6i.xlarge",
"kind": "AWSMachineProviderConfig",
"loadBalancers": [
{
"name": "dev-rhrmo-dev-26-01-2-tk6g8-int",
"type": "network"
},
{
"name": "dev-rhrmo-dev-26-01-2-tk6g8-ext",
"type": "network"
}
],
"metadata": {
"creationTimestamp": null
},
"metadataServiceOptions": {},
"placement": {
"availabilityZone": "xxxxxxxxxx",
"region": "xxxxxxxxx"
},
"securityGroups": [
{
"filters": [
{
"name": "tag:Name",
"values": [
"dev-rhrmo-dev-26-01-2-tk6g8-master-sg"
]
}
]
}
],
"subnet": {
"filters": [
{
"name": "tag:Name",
"values": [
"dev-rhrmo-dev-26-01-2-tk6g8-private-us-east-2a"
]
}
]
},
"tags": [
{
"name": "kubernetes.io/cluster/dev-rhrmo-dev-26-01-2-tk6g8",
"value": "owned"
}
],
"userDataSecret": {
"name": "master-user-data"
}
}
}
},
"status": {
"addresses": [
{
"address": "10.0.0.3",
"type": "InternalIP"
},
{
"address": "ip-10-0-152-232.us-east-2.compute.internal",
"type": "InternalDNS"
},
{
"address": "ip-10-0-152-232.us-east-2.compute.internal",
"type": "Hostname"
}
],
"conditions": [
{
"lastTransitionTime": "2023-01-26T09:09:40Z",
"message": "Drain operation currently blocked by: [{Name:EtcdQuorumOperator Owner:clusteroperator/etcd}]",
"reason": "HookPresent",
"severity": "Warning",
"status": "False",
"type": "Drainable"
},
{
"lastTransitionTime": "2023-01-26T09:09:16Z",
"status": "True",
"type": "InstanceExists"
},
{
"lastTransitionTime": "2023-01-26T09:08:33Z",
"status": "True",
"type": "Terminable"
}
],
"lastUpdated": "2023-01-26T09:09:40Z",
"nodeRef": {
"kind": "Node",
"name": "ip-10-0-152-232.us-east-2.compute.internal",
"uid": "37137c8c-da38-4947-a5b0-b1ea60574052"
},
"phase": "Running",
"providerStatus": {
"conditions": [
{
"lastTransitionTime": "2023-01-26T09:09:16Z",
"message": "Machine successfully created",
"reason": "MachineCreationSucceeded",
"status": "True",
"type": "MachineCreation"
}
],
"instanceId": "i-0b508963b4f21ef2e",
"instanceState": "running"
}
}
}
Loading

0 comments on commit 36ea081

Please sign in to comment.