Show StatefulSet
Closed this issue · 0 comments
kaplanelad commented
After we collected StatefulSet events, we need to show the data in UI.
json example:
{"Cluster": "default", "DeployBy": "foo@similarweb.com", "ReportTo": ["#foo-channel", "foo@similarweb.com"], "Namespace": "default", "Resources": {"Daemonsets": {"statusbay-daemonset-0": {"Pods": {"statusbay-daemonset-0-7crtg": {"Pvcs": {}, "Phase": "Running", "Events": [{"Time": 1583041599859678000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statusbay-daemonset-0-7crtg to ip-10-110-246-158.ec2.internal", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Created container statusbay-daemonset-0", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Started container statusbay-daemonset-0", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}, "statusbay-daemonset-0-dnwxb": {"Pvcs": {}, "Phase": "Running", "Events": [{"Time": 1583041599859460000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statusbay-daemonset-0-dnwxb to ip-10-110-246-12.ec2.internal", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Created container statusbay-daemonset-0", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Started container statusbay-daemonset-0", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}, "statusbay-daemonset-0-k8bq4": {"Pvcs": {}, "Phase": "Running", "Events": [{"Time": 1583041599859774000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statusbay-daemonset-0-k8bq4 to ip-10-110-241-239.ec2.internal", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Created container statusbay-daemonset-0", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Started container statusbay-daemonset-0", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}}, "Events": [{"Time": 1583041599000000000, "Action": "", "Message": "Created pod: statusbay-daemonset-0-k8bq4", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Created pod: statusbay-daemonset-0-dnwxb", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Created pod: statusbay-daemonset-0-7crtg", "ReportingController": ""}], "Status": {"numberReady": 1, "numberAvailable": 1, "numberUnavailable": 2, "numberMisscheduled": 0, "observedGeneration": 1, "currentNumberScheduled": 3, "desiredNumberScheduled": 3, "updatedNumberScheduled": 3}, "MetaData": {"Name": "statusbay-application", "Alerts": [{"Tags": "nginx", "Provider": "pingdom"}], "Labels": {"name": "statusbay-daemonset-0", "component": "statusbay-daemonset-0"}, "Metrics": [{"Name": "2xx", "Query": "query for 2xx", "Provider": "datadog"}, {"Name": "errors 5xx", "Query": "query for 5xx", "Provider": "datadog"}], "Namespace": "default", "Annotations": {"statusbay.io/alerts-pingdom": "nginx", "statusbay.io/application-name": "statusbay-application", "statusbay.io/report-deploy-by": "foo@similarweb.com", "statusbay.io/metrics-datadog-2xx": "query for 2xx", "statusbay.io/report-slack-channels": "#foo-channel", "statusbay.io/progress-deadline-seconds": "30", "statusbay.io/metrics-datadog-errors-5xx": "query for 5xx", "deprecated.daemonset.template.generation": "1"}, "ClusterName": "", "DesiredState": 0}, "Services": {"statusbay-daemonset-0-service": {"Events": [{"Time": 1583041581000000000, "Action": "", "Message": "Deleting load balancer", "ReportingController": ""}, {"Time": 1583041581000000000, "Action": "", "Message": "Deleted load balancer", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Ensuring load balancer", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Error creating load balancer (will retry): failed to ensure load balancer for service default/statusbay-daemonset-0-service: could not find any suitable subnets for creating the ELB", "ReportingController": ""}]}}, "ProgressDeadlineSeconds": 30}}, "Deployments": {"statusbay-deployment-0": {"Pods": {"statusbay-deployment-0-5969dfd7f4-4g45v": {"Pvcs": {}, "Phase": "Running", "Events": [{"Time": 1583041600006054000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statusbay-deployment-0-5969dfd7f4-4g45v to ip-10-110-241-239.ec2.internal", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Created container statusbay-deployment-0", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Started container statusbay-deployment-0", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}, "statusbay-deployment-0-5969dfd7f4-5tpsl": {"Pvcs": {}, "Phase": "Running", "Events": [{"Time": 1583041600005759000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statusbay-deployment-0-5969dfd7f4-5tpsl to ip-10-110-246-158.ec2.internal", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Created container statusbay-deployment-0", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Started container statusbay-deployment-0", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}, "statusbay-deployment-0-5969dfd7f4-g7z88": {"Pvcs": {}, "Phase": "Running", "Events": [{"Time": 1583041600005597000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statusbay-deployment-0-5969dfd7f4-g7z88 to ip-10-110-246-12.ec2.internal", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Created container statusbay-deployment-0", "ReportingController": ""}, {"Time": 1583041600000000000, "Action": "", "Message": "Started container statusbay-deployment-0", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}}, "Events": [{"Time": 1583041599000000000, "Action": "", "Message": "Scaled up replica set statusbay-deployment-0-5969dfd7f4 to 3", "ReportingController": ""}], "Status": {"replicas": 3, "conditions": [{"type": "Available", "reason": "MinimumReplicasUnavailable", "status": "False", "message": "Deployment does not have minimum availability.", "lastUpdateTime": "2020-03-01T05:46:39Z", "lastTransitionTime": "2020-03-01T05:46:39Z"}, {"type": "Progressing", "reason": "ReplicaSetUpdated", "status": "True", "message": "ReplicaSet \"statusbay-deployment-0-5969dfd7f4\" is progressing.", "lastUpdateTime": "2020-03-01T05:46:43Z", "lastTransitionTime": "2020-03-01T05:46:39Z"}], "readyReplicas": 1, "updatedReplicas": 3, "availableReplicas": 1, "observedGeneration": 1, "unavailableReplicas": 2}, "MetaData": {"Name": "statusbay-application", "Alerts": [{"Tags": "nginx", "Provider": "pingdom"}], "Labels": {"component": "statusbay-deployment-0"}, "Metrics": [{"Name": "errors 5xx", "Query": "query for 5xx", "Provider": "datadog"}, {"Name": "2xx", "Query": "query for 2xx", "Provider": "datadog"}], "Namespace": "default", "Annotations": {"statusbay.io/alerts-pingdom": "nginx", "statusbay.io/application-name": "statusbay-application", "statusbay.io/report-deploy-by": "foo@similarweb.com", "statusbay.io/metrics-datadog-2xx": "query for 2xx", "statusbay.io/report-slack-channels": "#foo-channel", "statusbay.io/progress-deadline-seconds": "30", "statusbay.io/metrics-datadog-errors-5xx": "query for 5xx"}, "ClusterName": "", "DesiredState": 3}, "Services": {"statusbay-deployment-0-service": {"Events": [{"Time": 1583041581000000000, "Action": "", "Message": "Deleting load balancer", "ReportingController": ""}, {"Time": 1583041581000000000, "Action": "", "Message": "Deleted load balancer", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Ensuring load balancer", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Error creating load balancer (will retry): failed to ensure load balancer for service default/statusbay-deployment-0-service: could not find any suitable subnets for creating the ELB", "ReportingController": ""}]}}, "Replicaset": {"statusbay-deployment-0-5969dfd7f4": {"Events": [{"Time": 1583041599000000000, "Action": "", "Message": "Created pod: statusbay-deployment-0-5969dfd7f4-5tpsl", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Created pod: statusbay-deployment-0-5969dfd7f4-g7z88", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Created pod: statusbay-deployment-0-5969dfd7f4-4g45v", "ReportingController": ""}], "Status": {"replicas": 3, "readyReplicas": 1, "availableReplicas": 1, "observedGeneration": 1, "fullyLabeledReplicas": 3}}}, "ProgressDeadlineSeconds": 30}}, "Statefulsets": {"statefulset-0": {"Pods": {"statefulset-0-0": {"Pvcs": {}, "Phase": "ContainerCreating", "Events": [{"Time": 1583041600161476000, "Action": "", "Message": "ContainerCreating", "ReportingController": ""}, {"Time": 1583041572000000000, "Action": "", "Message": "AttachVolume.Attach succeeded for volume \"pvc-1a63f591-5873-11ea-b8bb-0eaecd0cd73f\" ", "ReportingController": ""}, {"Time": 1583041578000000000, "Action": "", "Message": "Container image \"nginx:latest\" already present on machine", "ReportingController": ""}, {"Time": 1583041578000000000, "Action": "", "Message": "Created container statefulset-0", "ReportingController": ""}, {"Time": 1583041578000000000, "Action": "", "Message": "Started container statefulset-0", "ReportingController": ""}, {"Time": 1583041581000000000, "Action": "", "Message": "Stopping container statefulset-0", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Successfully assigned default/statefulset-0-0 to ip-10-110-246-158.ec2.internal", "ReportingController": ""}, {"Time": 1583041603000000000, "Action": "", "Message": "AttachVolume.Attach succeeded for volume \"pvc-1a63f591-5873-11ea-b8bb-0eaecd0cd73f\" ", "ReportingController": ""}], "CreationTimestamp": "0001-01-01T00:00:00Z"}}, "Events": [{"Time": 1583041600161476000, "Action": "", "Message": "Test event message", "ReportingController": ""}], "Status": {"replicas": 1, "collisionCount": 0, "updateRevision": "statefulset-0-598486f86c", "currentReplicas": 1, "currentRevision": "statefulset-0-598486f86c", "updatedReplicas": 1, "observedGeneration": 1}, "MetaData": {"Name": "statusbay-application", "Alerts": [{"Tags": "nginx", "Provider": "pingdom"}], "Labels": {}, "Metrics": [{"Name": "2xx", "Query": "query for 2xx", "Provider": "datadog"}, {"Name": "estatefulsetrrors 5xx", "Query": "query for 5xx", "Provider": "datadog"}], "Namespace": "default", "Annotations": {"statusbay.io/alerts-pingdom": "nginx", "statusbay.io/application-name": "statusbay-application", "statusbay.io/report-deploy-by": "foo@similarweb.com", "statusbay.io/metrics-datadog-2xx": "query for 2xx", "statusbay.io/report-slack-channels": "#foo-channel", "statusbay.io/progress-deadline-seconds": "30", "statusbay.io/metrics-datadog-estatefulsetrrors-5xx": "query for 5xx"}, "ClusterName": "", "DesiredState": 1}, "Services": {"statefulset-0-service": {"Events": [{"Time": 1583041581000000000, "Action": "", "Message": "Deleting load balancer", "ReportingController": ""}, {"Time": 1583041581000000000, "Action": "", "Message": "Deleted load balancer", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Ensuring load balancer", "ReportingController": ""}, {"Time": 1583041599000000000, "Action": "", "Message": "Error creating load balancer (will retry): failed to ensure load balancer for service default/statefulset-0-service: could not find any suitable subnets for creating the ELB", "ReportingController": ""}]}}, "ProgressDeadlineSeconds": 30}}}, "Application": "statusbay-application", "CreationTimestamp": 1583041599, "DeploymentDescription": "Deployment is running"}