From cf712038a27164e14eaa02fa9db274c8b4596dd2 Mon Sep 17 00:00:00 2001 From: michael mccune Date: Sat, 11 May 2024 13:28:58 -0400 Subject: [PATCH] clippy based cleanups --- camgi.html | 2577 ++++++++++++++++++++ src/html.rs | 32 +- src/main.rs | 2 +- src/mustgather.rs | 8 +- src/resources/baremetalhost.rs | 2 +- src/resources/certificatesigningrequest.rs | 2 +- src/resources/clusterautoscaler.rs | 2 +- src/resources/clusteroperator.rs | 2 +- src/resources/controlplanemachineset.rs | 2 +- src/resources/machine.rs | 2 +- src/resources/machineautoscaler.rs | 2 +- src/resources/machineset.rs | 11 +- src/resources/node.rs | 2 +- src/resources/pod.rs | 2 +- 14 files changed, 2610 insertions(+), 38 deletions(-) create mode 100644 camgi.html diff --git a/camgi.html b/camgi.html new file mode 100644 index 0000000..bfa2683 --- /dev/null +++ b/camgi.html @@ -0,0 +1,2577 @@ + + + +camgi-sample-openshift-release + + + + + +
+
+ +
+
+ + +
+
+
+
+ +

+Summary

+
+
+
+Cluster
+
+ + + + + + + + + + + +
+OpenShift Version +X.Y.Z-fake-test
+Platform Type +Unknown
+
+
+2 MachineSets
+
+ +1 +participating in autoscaling + + + + + + + + + + + + +
+Name +Replicas
+testdata-compute-region-2 +0
+
+
+3 Machines
+
+ +1 +Machines not in Running phase + + + + + +
+testdata-control-plane-1
+
+
+3 Nodes
+
+ +2 +Nodes do not have a Ready condition + + + + + + + + +
+ip-10-0-0-2.control.plane
+ip-10-0-1-1.compute.plane
+
+
+
+ +

+Cluster Operators

+
+
+
+ +

+Machine API Pods

+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  annotations:
+    release.openshift.io/version: X.Y.Z-fake-test
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  labels:
+    cluster-autoscaler: default
+    k8s-app: cluster-autoscaler
+  name: cluster-autoscaler-default-f548ffc66-bck7p
+  namespace: openshift-machine-api
+  ownerReferences:
+  - apiVersion: apps/v1
+    blockOwnerDeletion: true
+    controller: true
+    kind: ReplicaSet
+    name: cluster-autoscaler-default-f548ffc66
+    uid: 00000000-0000-0000-0000-000000000000
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  containers:
+  - args:
+    - --logtostderr
+    - --v=4
+    - --cloud-provider=clusterapi
+    - --namespace=openshift-machine-api
+    - --gpu-total=nvidia.com/gpu:1:2
+    - --scale-down-enabled=true
+    - --scale-down-delay-after-add=10s
+    - --scale-down-delay-after-delete=10s
+    - --scale-down-delay-after-failure=10s
+    - --scale-down-unneeded-time=10s
+    command:
+    - cluster-autoscaler
+    env:
+    - name: CAPI_GROUP
+      value: machine.openshift.io
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: cluster-autoscaler
+    ports:
+    - containerPort: 8085
+      name: metrics
+      protocol: TCP
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6lqjg
+      readOnly: true
+  dnsPolicy: ClusterFirst
+  enableServiceLinks: true
+  imagePullSecrets:
+  - name: cluster-autoscaler-dockercfg-dq8xb
+  nodeName: ip-10-0-0-1.control.plane
+  nodeSelector:
+    beta.kubernetes.io/os: linux
+    node-role.kubernetes.io/master: ""
+  preemptionPolicy: PreemptLowerPriority
+  priority: 2000000000
+  priorityClassName: system-cluster-critical
+  restartPolicy: Always
+  schedulerName: default-scheduler
+  securityContext:
+    fsGroup: 1000450000
+    seLinuxOptions:
+      level: s0:c21,c15
+  serviceAccount: cluster-autoscaler
+  serviceAccountName: cluster-autoscaler
+  terminationGracePeriodSeconds: 30
+  tolerations:
+  - key: CriticalAddonsOnly
+    operator: Exists
+  - effect: NoSchedule
+    key: node-role.kubernetes.io/master
+    operator: Exists
+  - effect: NoExecute
+    key: node.kubernetes.io/not-ready
+    operator: Exists
+    tolerationSeconds: 300
+  - effect: NoExecute
+    key: node.kubernetes.io/unreachable
+    operator: Exists
+    tolerationSeconds: 300
+  - effect: NoSchedule
+    key: node.kubernetes.io/memory-pressure
+    operator: Exists
+  volumes:
+  - name: kube-api-access-6lqjg
+    projected:
+      defaultMode: 420
+      sources:
+      - serviceAccountToken:
+          expirationSeconds: 3607
+          path: token
+      - configMap:
+          items:
+          - key: ca.crt
+            path: ca.crt
+          name: kube-root-ca.crt
+      - downwardAPI:
+          items:
+          - fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+            path: namespace
+      - configMap:
+          items:
+          - key: service-ca.crt
+            path: service-ca.crt
+          name: openshift-service-ca.crt
+status:
+  conditions:
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Initialized
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Ready
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: ContainersReady
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: PodScheduled
+  containerStatuses:
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState: {}
+    name: cluster-autoscaler
+    ready: true
+    restartCount: 0
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  hostIP: 10.0.0.1
+  phase: Running
+  podIP: 10.129.1.1
+  podIPs:
+  - ip: 10.129.1.1
+  qosClass: Burstable
+  startTime: "2022-01-01T00:00:00Z"
+       
+
+
+
+
+
+

+ +

+
+
+
+camgi warning: log file has been truncated to end, see full contents in the must-gather
+line 11
+line 12
+line 13
+line 14
+line 15
+line 16
+line 17
+line 18
+line 19
+line 20
+line 21
+line 22
+line 23
+line 24
+line 25
+line 26
+line 27
+line 28
+line 29
+line 30
+line 31
+line 32
+line 33
+line 34
+line 35
+line 36
+line 37
+line 38
+line 39
+line 40
+line 41
+line 42
+line 43
+line 44
+line 45
+line 46
+line 47
+line 48
+line 49
+line 50
+line 51
+line 52
+line 53
+line 54
+line 55
+line 56
+line 57
+line 58
+line 59
+line 60
+line 61
+line 62
+line 63
+line 64
+line 65
+line 66
+line 67
+line 68
+line 69
+line 70
+line 71
+line 72
+line 73
+line 74
+line 75
+line 76
+line 77
+line 78
+line 79
+line 80
+line 81
+line 82
+line 83
+line 84
+line 85
+line 86
+line 87
+line 88
+line 89
+line 90
+line 91
+line 92
+line 93
+line 94
+line 95
+line 96
+line 97
+line 98
+line 99
+line 100
+line 101
+line 102
+line 103
+line 104
+line 105
+line 106
+line 107
+line 108
+line 109
+        
+
+
+
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  annotations:
+    release.openshift.io/version: X.Y.Z-fake-test
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: cluster-baremetal-operator-6955c869bf-
+  labels:
+    k8s-app: cluster-baremetal-operator
+  name: cluster-baremetal-operator-6955c869bf-9ccgk
+  namespace: openshift-machine-api
+  ownerReferences:
+  - apiVersion: apps/v1
+    blockOwnerDeletion: true
+    controller: true
+    kind: ReplicaSet
+    name: cluster-baremetal-operator-6955c869bf
+    uid: 00000000-0000-0000-0000-000000000000
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  containers:
+  - command:
+    - /usr/bin/cluster-baremetal-operator
+    env:
+    - name: RELEASE_VERSION
+      value: X.Y.Z-fake-test
+    - name: COMPONENT_NAMESPACE
+      valueFrom:
+        fieldRef:
+          apiVersion: v1
+          fieldPath: metadata.namespace
+    - name: METRICS_PORT
+      value: "8080"
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: cluster-baremetal-operator
+    ports:
+    - containerPort: 9443
+      name: webhook-server
+      protocol: TCP
+    resources:
+      requests:
+        cpu: 10m
+        memory: 50Mi
+    securityContext:
+      capabilities:
+        drop:
+        - MKNOD
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/cluster-baremetal-operator/tls
+      name: cert
+      readOnly: true
+    - mountPath: /etc/cluster-baremetal-operator/images
+      name: images
+      readOnly: true
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-n8nw4
+      readOnly: true
+  dnsPolicy: ClusterFirst
+  enableServiceLinks: true
+  nodeName: ip-10-0-0-1.control.plane
+  nodeSelector:
+    node-role.kubernetes.io/master: ""
+  preemptionPolicy: PreemptLowerPriority
+  priority: 2000001000
+  priorityClassName: system-node-critical
+  restartPolicy: Always
+  schedulerName: default-scheduler
+  securityContext:
+    runAsNonRoot: true
+    runAsUser: 65534
+    seLinuxOptions:
+      level: s0:c21,c15
+  serviceAccount: cluster-baremetal-operator
+  serviceAccountName: cluster-baremetal-operator
+  terminationGracePeriodSeconds: 30
+  tolerations:
+  - effect: NoSchedule
+    key: node-role.kubernetes.io/master
+    operator: Exists
+  - effect: NoExecute
+    key: node.kubernetes.io/unreachable
+    operator: Exists
+    tolerationSeconds: 120
+  - effect: NoExecute
+    key: node.kubernetes.io/not-ready
+    operator: Exists
+    tolerationSeconds: 120
+  - effect: NoSchedule
+    key: node.kubernetes.io/memory-pressure
+    operator: Exists
+  volumes:
+  - name: cert
+    secret:
+      defaultMode: 420
+      secretName: cluster-baremetal-webhook-server-cert
+  - configMap:
+      defaultMode: 420
+      name: kube-rbac-proxy
+    name: config
+  - name: cluster-baremetal-operator-tls
+    secret:
+      defaultMode: 420
+      secretName: cluster-baremetal-operator-tls
+  - configMap:
+      defaultMode: 420
+      name: cluster-baremetal-operator-images
+    name: images
+  - name: kube-api-access-n8nw4
+    projected:
+      defaultMode: 420
+      sources:
+      - serviceAccountToken:
+          expirationSeconds: 3607
+          path: token
+      - configMap:
+          items:
+          - key: ca.crt
+            path: ca.crt
+          name: kube-root-ca.crt
+      - downwardAPI:
+          items:
+          - fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+            path: namespace
+      - configMap:
+          items:
+          - key: service-ca.crt
+            path: service-ca.crt
+          name: openshift-service-ca.crt
+status:
+  conditions:
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Initialized
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Ready
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: ContainersReady
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: PodScheduled
+  containerStatuses:
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState:
+      terminated:
+        containerID: cri-o://fake
+        exitCode: 1
+        finishedAt: "2022-01-01T00:00:00Z"
+        reason: Error
+        startedAt: "2022-01-01T00:00:00Z"
+    name: cluster-baremetal-operator
+    ready: true
+    restartCount: 1
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState: {}
+    name: kube-rbac-proxy
+    ready: true
+    restartCount: 0
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  hostIP: 10.0.0.1
+  phase: Running
+  podIP: 10.130.1.1
+  podIPs:
+  - ip: 10.130.1.1
+  qosClass: Burstable
+  startTime: "2022-01-01T00:00:00Z"
+       
+
+
+
+
+
+

+ +

+
+
+
+cluster-baremetal-operator-6955c869bf-9ccgk cluster-baremetal-operator logs
+        
+
+
+
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  annotations:
+    release.openshift.io/version: X.Y.Z-fake-test
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: machine-api-controllers-86c6c8f96d-
+  labels:
+    api: clusterapi
+    k8s-app: controller
+  name: machine-api-controllers-86c6c8f96d-ssrp8
+  namespace: openshift-machine-api
+  ownerReferences:
+  - apiVersion: apps/v1
+    blockOwnerDeletion: true
+    controller: true
+    kind: ReplicaSet
+    name: machine-api-controllers-86c6c8f96d
+    uid: 00000000-0000-0000-0000-000000000000
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  containers:
+  - args:
+    - --logtostderr=true
+    - --v=3
+    - --leader-elect=true
+    - --leader-elect-lease-duration=120s
+    - --namespace=openshift-machine-api
+    command:
+    - /machineset-controller
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    livenessProbe:
+      failureThreshold: 3
+      httpGet:
+        path: /readyz
+        port: healthz
+        scheme: HTTP
+      periodSeconds: 10
+      successThreshold: 1
+      timeoutSeconds: 1
+    name: machineset-controller
+    ports:
+    - containerPort: 8443
+      name: webhook-server
+      protocol: TCP
+    - containerPort: 9441
+      name: healthz
+      protocol: TCP
+    readinessProbe:
+      failureThreshold: 3
+      httpGet:
+        path: /healthz
+        port: healthz
+        scheme: HTTP
+      periodSeconds: 10
+      successThreshold: 1
+      timeoutSeconds: 1
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/machine-api-operator/tls
+      name: cert
+      readOnly: true
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  - args:
+    - --logtostderr=true
+    - --v=3
+    - --leader-elect=true
+    - --leader-elect-lease-duration=120s
+    - --namespace=openshift-machine-api
+    command:
+    - /machine-controller-manager
+    env:
+    - name: NODE_NAME
+      valueFrom:
+        fieldRef:
+          apiVersion: v1
+          fieldPath: spec.nodeName
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    livenessProbe:
+      failureThreshold: 3
+      httpGet:
+        path: /readyz
+        port: healthz
+        scheme: HTTP
+      periodSeconds: 10
+      successThreshold: 1
+      timeoutSeconds: 1
+    name: machine-controller
+    ports:
+    - containerPort: 9440
+      name: healthz
+      protocol: TCP
+    readinessProbe:
+      failureThreshold: 3
+      httpGet:
+        path: /healthz
+        port: healthz
+        scheme: HTTP
+      periodSeconds: 10
+      successThreshold: 1
+      timeoutSeconds: 1
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/pki/ca-trust/extracted/pem
+      name: trusted-ca
+      readOnly: true
+    - mountPath: /var/run/secrets/openshift/serviceaccount
+      name: bound-sa-token
+      readOnly: true
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  - args:
+    - --logtostderr=true
+    - --v=3
+    - --leader-elect=true
+    - --leader-elect-lease-duration=120s
+    - --namespace=openshift-machine-api
+    command:
+    - /nodelink-controller
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: nodelink-controller
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  - args:
+    - --logtostderr=true
+    - --v=3
+    - --leader-elect=true
+    - --leader-elect-lease-duration=120s
+    - --namespace=openshift-machine-api
+    command:
+    - /machine-healthcheck
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    livenessProbe:
+      failureThreshold: 3
+      httpGet:
+        path: /readyz
+        port: healthz
+        scheme: HTTP
+      periodSeconds: 10
+      successThreshold: 1
+      timeoutSeconds: 1
+    name: machine-healthcheck-controller
+    ports:
+    - containerPort: 9442
+      name: healthz
+      protocol: TCP
+    readinessProbe:
+      failureThreshold: 3
+      httpGet:
+        path: /healthz
+        port: healthz
+        scheme: HTTP
+      periodSeconds: 10
+      successThreshold: 1
+      timeoutSeconds: 1
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  - args:
+    - --secure-listen-address=0.0.0.0:8442
+    - --upstream=http://localhost:8082
+    - --config-file=/etc/kube-rbac-proxy/config-file.yaml
+    - --tls-cert-file=/etc/tls/private/tls.crt
+    - --tls-private-key-file=/etc/tls/private/tls.key
+    - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
+    - --logtostderr=true
+    - --v=3
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: kube-rbac-proxy-machineset-mtrc
+    ports:
+    - containerPort: 8442
+      name: machineset-mtrc
+      protocol: TCP
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/kube-rbac-proxy
+      name: config
+    - mountPath: /etc/tls/private
+      name: machine-api-controllers-tls
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  - args:
+    - --secure-listen-address=0.0.0.0:8441
+    - --upstream=http://localhost:8081
+    - --config-file=/etc/kube-rbac-proxy/config-file.yaml
+    - --tls-cert-file=/etc/tls/private/tls.crt
+    - --tls-private-key-file=/etc/tls/private/tls.key
+    - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
+    - --logtostderr=true
+    - --v=3
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: kube-rbac-proxy-machine-mtrc
+    ports:
+    - containerPort: 8441
+      name: machine-mtrc
+      protocol: TCP
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/kube-rbac-proxy
+      name: config
+    - mountPath: /etc/tls/private
+      name: machine-api-controllers-tls
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  - args:
+    - --secure-listen-address=0.0.0.0:8444
+    - --upstream=http://localhost:8083
+    - --config-file=/etc/kube-rbac-proxy/config-file.yaml
+    - --tls-cert-file=/etc/tls/private/tls.crt
+    - --tls-private-key-file=/etc/tls/private/tls.key
+    - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
+    - --logtostderr=true
+    - --v=3
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: kube-rbac-proxy-mhc-mtrc
+    ports:
+    - containerPort: 8444
+      name: mhc-mtrc
+      protocol: TCP
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/kube-rbac-proxy
+      name: config
+    - mountPath: /etc/tls/private
+      name: machine-api-controllers-tls
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-6fbb2
+      readOnly: true
+  dnsPolicy: ClusterFirst
+  enableServiceLinks: true
+  nodeName: ip-10-0-1-1.compute.plane
+  nodeSelector:
+    node-role.kubernetes.io/master: ""
+  preemptionPolicy: PreemptLowerPriority
+  priority: 2000001000
+  priorityClassName: system-node-critical
+  restartPolicy: Always
+  schedulerName: default-scheduler
+  securityContext:
+    fsGroup: 1000450000
+    seLinuxOptions:
+      level: s0:c21,c15
+  serviceAccount: machine-api-controllers
+  serviceAccountName: machine-api-controllers
+  terminationGracePeriodSeconds: 30
+  tolerations:
+  - effect: NoSchedule
+    key: node-role.kubernetes.io/master
+  - key: CriticalAddonsOnly
+    operator: Exists
+  - effect: NoExecute
+    key: node.kubernetes.io/not-ready
+    operator: Exists
+    tolerationSeconds: 120
+  - effect: NoExecute
+    key: node.kubernetes.io/unreachable
+    operator: Exists
+    tolerationSeconds: 120
+  - effect: NoSchedule
+    key: node.kubernetes.io/memory-pressure
+    operator: Exists
+  volumes:
+  - name: cert
+    secret:
+      defaultMode: 420
+      items:
+      - key: tls.crt
+        path: tls.crt
+      - key: tls.key
+        path: tls.key
+      secretName: machine-api-operator-webhook-cert
+  - name: bound-sa-token
+    projected:
+      defaultMode: 420
+      sources:
+      - serviceAccountToken:
+          audience: openshift
+          expirationSeconds: 3600
+          path: token
+  - configMap:
+      defaultMode: 420
+      name: kube-rbac-proxy
+    name: config
+  - name: machine-api-controllers-tls
+    secret:
+      defaultMode: 420
+      secretName: machine-api-controllers-tls
+  - configMap:
+      defaultMode: 420
+      items:
+      - key: ca-bundle.crt
+        path: tls-ca-bundle.pem
+      name: mao-trusted-ca
+      optional: true
+    name: trusted-ca
+  - name: kube-api-access-6fbb2
+    projected:
+      defaultMode: 420
+      sources:
+      - serviceAccountToken:
+          expirationSeconds: 3607
+          path: token
+      - configMap:
+          items:
+          - key: ca.crt
+            path: ca.crt
+          name: kube-root-ca.crt
+      - downwardAPI:
+          items:
+          - fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+            path: namespace
+      - configMap:
+          items:
+          - key: service-ca.crt
+            path: service-ca.crt
+          name: openshift-service-ca.crt
+status:
+  conditions:
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Initialized
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Ready
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: ContainersReady
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: PodScheduled
+  containerStatuses:
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState: {}
+    name: kube-rbac-proxy-machine-mtrc
+    ready: true
+    restartCount: 0
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState: {}
+    name: kube-rbac-proxy-machineset-mtrc
+    ready: true
+    restartCount: 0
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState: {}
+    name: kube-rbac-proxy-mhc-mtrc
+    ready: true
+    restartCount: 0
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState:
+      terminated:
+        containerID: cri-o://fake
+        exitCode: 2
+        finishedAt: "2022-01-01T00:00:00Z"
+        reason: Error
+        startedAt: "2022-01-01T00:00:00Z"
+    name: machine-controller
+    ready: true
+    restartCount: 2
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState:
+      terminated:
+        containerID: cri-o://fake
+        exitCode: 2
+        finishedAt: "2022-01-01T00:00:00Z"
+        reason: Error
+        startedAt: "2022-01-01T00:00:00Z"
+    name: machine-healthcheck-controller
+    ready: true
+    restartCount: 3
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState:
+      terminated:
+        containerID: cri-o://fake
+        exitCode: 2
+        finishedAt: "2022-01-01T00:00:00Z"
+        reason: Error
+        startedAt: "2022-01-01T00:00:00Z"
+    name: machineset-controller
+    ready: true
+    restartCount: 2
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState:
+      terminated:
+        containerID: cri-o://fake
+        exitCode: 255
+        finishedAt: "2022-01-01T00:00:00Z"
+        reason: Error
+        startedAt: "2022-01-01T00:00:00Z"
+    name: nodelink-controller
+    ready: true
+    restartCount: 2
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  hostIP: 10.0.1.1
+  phase: Running
+  podIP: 10.128.0.8
+  podIPs:
+  - ip: 10.128.0.8
+  qosClass: Burstable
+  startTime: "2022-01-01T00:00:00Z"
+       
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 kube-rbac-proxy-machine-mtrc logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 kube-rbac-proxy-machineset-mtrc logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 kube-rbac-proxy-mhc-mtrc logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 machine-controller logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 machine-healthcheck-controller logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 machineset-controller logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-controllers-86c6c8f96d-ssrp8 nodelink-controller logs
+        
+
+
+
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Pod
+metadata:
+  annotations:
+    release.openshift.io/version: X.Y.Z-fake-test
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: machine-api-operator-d6457f456-
+  labels:
+    k8s-app: machine-api-operator
+  name: machine-api-operator-d6457f456-wbczp
+  namespace: openshift-machine-api
+  ownerReferences:
+  - apiVersion: apps/v1
+    blockOwnerDeletion: true
+    controller: true
+    kind: ReplicaSet
+    name: machine-api-operator-d6457f456
+    uid: 00000000-0000-0000-0000-000000000000
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  containers:
+  - args:
+    - --secure-listen-address=0.0.0.0:8443
+    - --upstream=http://localhost:8080/
+    - --tls-cert-file=/etc/tls/private/tls.crt
+    - --tls-private-key-file=/etc/tls/private/tls.key
+    - --config-file=/etc/kube-rbac-proxy/config-file.yaml
+    - --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305,TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
+    - --logtostderr=true
+    - --v=3
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: kube-rbac-proxy
+    ports:
+    - containerPort: 8443
+      name: https
+      protocol: TCP
+    resources:
+      requests:
+        cpu: 10m
+        memory: 20Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/kube-rbac-proxy
+      name: config
+    - mountPath: /etc/tls/private
+      name: machine-api-operator-tls
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-trl82
+      readOnly: true
+  - args:
+    - start
+    - --images-json=/etc/machine-api-operator-config/images/images.json
+    - --alsologtostderr
+    - --v=3
+    command:
+    - /machine-api-operator
+    env:
+    - name: RELEASE_VERSION
+      value: X.Y.Z-fake-test
+    - name: COMPONENT_NAMESPACE
+      valueFrom:
+        fieldRef:
+          apiVersion: v1
+          fieldPath: metadata.namespace
+    - name: METRICS_PORT
+      value: "8080"
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imagePullPolicy: IfNotPresent
+    name: machine-api-operator
+    resources:
+      requests:
+        cpu: 10m
+        memory: 50Mi
+    securityContext:
+      capabilities:
+        drop:
+        - KILL
+        - MKNOD
+        - SETGID
+        - SETUID
+      runAsUser: 1000450000
+    terminationMessagePath: /dev/termination-log
+    terminationMessagePolicy: File
+    volumeMounts:
+    - mountPath: /etc/machine-api-operator-config/images
+      name: images
+    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+      name: kube-api-access-trl82
+      readOnly: true
+  dnsPolicy: ClusterFirst
+  enableServiceLinks: true
+  nodeName: ip-10-0-0-1.control.plane
+  nodeSelector:
+    node-role.kubernetes.io/master: ""
+  preemptionPolicy: PreemptLowerPriority
+  priority: 2000001000
+  priorityClassName: system-node-critical
+  restartPolicy: Always
+  schedulerName: default-scheduler
+  securityContext:
+    fsGroup: 1000450000
+    seLinuxOptions:
+      level: s0:c21,c15
+  serviceAccount: machine-api-operator
+  serviceAccountName: machine-api-operator
+  terminationGracePeriodSeconds: 30
+  tolerations:
+  - effect: NoSchedule
+    key: node-role.kubernetes.io/master
+    operator: Exists
+  - effect: NoExecute
+    key: node.kubernetes.io/unreachable
+    operator: Exists
+    tolerationSeconds: 120
+  - effect: NoExecute
+    key: node.kubernetes.io/not-ready
+    operator: Exists
+    tolerationSeconds: 120
+  - effect: NoSchedule
+    key: node.kubernetes.io/memory-pressure
+    operator: Exists
+  volumes:
+  - configMap:
+      defaultMode: 420
+      name: kube-rbac-proxy
+    name: config
+  - configMap:
+      defaultMode: 420
+      name: machine-api-operator-images
+    name: images
+  - name: machine-api-operator-tls
+    secret:
+      defaultMode: 420
+      secretName: machine-api-operator-tls
+  - name: kube-api-access-trl82
+    projected:
+      defaultMode: 420
+      sources:
+      - serviceAccountToken:
+          expirationSeconds: 3607
+          path: token
+      - configMap:
+          items:
+          - key: ca.crt
+            path: ca.crt
+          name: kube-root-ca.crt
+      - downwardAPI:
+          items:
+          - fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+            path: namespace
+      - configMap:
+          items:
+          - key: service-ca.crt
+            path: service-ca.crt
+          name: openshift-service-ca.crt
+status:
+  conditions:
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Initialized
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: Ready
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: ContainersReady
+  - lastProbeTime: null
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: PodScheduled
+  containerStatuses:
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState: {}
+    name: kube-rbac-proxy
+    ready: true
+    restartCount: 0
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  - containerID: cri-o://fake
+    image: quay.io/openshift-release-dev/ocp-v4.0-fake
+    imageID: quay.io/openshift-release-dev/ocp-v4.0-fake
+    lastState:
+      terminated:
+        containerID: cri-o://fake
+        exitCode: 255
+        finishedAt: "2022-01-01T00:00:00Z"
+        reason: Error
+        startedAt: "2022-01-01T00:00:00Z"
+    name: machine-api-operator
+    ready: true
+    restartCount: 1
+    started: true
+    state:
+      running:
+        startedAt: "2022-01-01T00:00:00Z"
+  hostIP: 10.0.0.1
+  phase: Running
+  podIP: 10.130.0.28
+  podIPs:
+  - ip: 10.130.0.28
+  qosClass: Burstable
+  startTime: "2022-01-01T00:00:00Z"
+       
+
+
+
+
+
+

+ +

+
+
+
+machine-api-operator-d6457f456-wbczp kube-rbac-proxy logs
+        
+
+
+
+
+
+
+

+ +

+
+
+
+machine-api-operator-d6457f456-wbczp machine-api-operator logs
+        
+
+
+
+
+
+
+ +

+Machine Config Operator Pods

+
+ +

+Cloud Controller Manager Operator Pods

+
+ +

+Cloud Controller Manager Pods

+
+ +

+ClusterAutoscalers

+
+
+

+ +

+
+
+
+---
+apiVersion: autoscaling.openshift.io/v1
+kind: ClusterAutoscaler
+metadata:
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generation: 1
+  name: default
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  resourceLimits:
+    gpus:
+    - max: 2
+      min: 1
+      type: nvidia.com/gpu
+  scaleDown:
+    delayAfterAdd: 10s
+    delayAfterDelete: 10s
+    delayAfterFailure: 10s
+    enabled: true
+    unneededTime: 10s
+       
+
+
+
+
+
+
+

+MachineAutoscalers

+
+
+

+ +

+
+
+
+---
+apiVersion: autoscaling.openshift.io/v1beta1
+kind: MachineAutoscaler
+metadata:
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  finalizers:
+  - machinetarget.autoscaling.openshift.io
+  generation: 1
+  name: machineautoscaler
+  namespace: openshift-machine-api
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  maxReplicas: 10
+  minReplicas: 0
+  scaleTargetRef:
+    apiVersion: machine.openshift.io/v1beta1
+    kind: MachineSet
+    name: testdata-compute-region-2 
+status:
+  lastTargetRef:
+    apiVersion: machine.openshift.io/v1beta1
+    kind: MachineSet
+    name: testdata-compute-region-2
+       
+
+
+
+
+
+ +

+MachineSets

+
+
+

+ +

+
+
+
+---
+apiVersion: machine.openshift.io/v1beta1
+kind: MachineSet
+metadata:
+  annotations:
+    machine.openshift.io/GPU: "0"
+    machine.openshift.io/memoryMb: "8192"
+    machine.openshift.io/vCPU: "2"
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generation: 1
+  labels:
+    machine.openshift.io/cluster-api-cluster: testdata
+  name: testdata-compute-region-1
+  namespace: openshift-machine-api
+  resourceVersion: "38123"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      machine.openshift.io/cluster-api-cluster: testdata
+      machine.openshift.io/cluster-api-machineset: testdata-compute-region-1
+  template:
+    metadata:
+      labels:
+        machine.openshift.io/cluster-api-cluster: testdata
+        machine.openshift.io/cluster-api-machine-role: worker
+        machine.openshift.io/cluster-api-machine-type: worker
+        machine.openshift.io/cluster-api-machineset: testdata-compute-region-1
+    spec:
+      metadata: {}
+      providerSpec:
+        value: {}
+status:
+  availableReplicas: 1
+  fullyLabeledReplicas: 1
+  observedGeneration: 1
+  readyReplicas: 1
+  replicas: 1
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: machine.openshift.io/v1beta1
+kind: MachineSet
+metadata:
+  annotations:
+    machine.openshift.io/GPU: "0"
+    machine.openshift.io/memoryMb: "8192"
+    machine.openshift.io/vCPU: "2"
+    machine.openshift.io/cluster-api-autoscaler-node-group-min-size: 0
+    machine.openshift.io/cluster-api-autoscaler-node-group-max-size: 10
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generation: 1
+  labels:
+    machine.openshift.io/cluster-api-cluster: testdata
+  name: testdata-compute-region-2
+  namespace: openshift-machine-api
+  resourceVersion: "38123"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  replicas: 0
+  selector:
+    matchLabels:
+      machine.openshift.io/cluster-api-cluster: testdata
+      machine.openshift.io/cluster-api-machineset: testdata-compute-region-2
+  template:
+    metadata:
+      labels:
+        machine.openshift.io/cluster-api-cluster: testdata
+        machine.openshift.io/cluster-api-machine-role: worker
+        machine.openshift.io/cluster-api-machine-type: worker
+        machine.openshift.io/cluster-api-machineset: testdata-compute-region-2
+    spec:
+      metadata: {}
+      providerSpec:
+        value: {}
+status:
+  availableReplicas: 0
+  fullyLabeledReplicas: 0
+  observedGeneration: 1
+  readyReplicas: 0
+  replicas: 0
+       
+
+
+
+
+
+ +

+Machines

+
+
+

+ +

+
+
+
+---
+apiVersion: machine.openshift.io/v1beta1
+kind: Machine
+metadata:
+  annotations:
+    machine.openshift.io/instance-state: running
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  finalizers:
+  - machine.machine.openshift.io
+  generation: 2
+  labels:
+    machine.openshift.io/cluster-api-cluster: testdata
+    machine.openshift.io/cluster-api-machine-role: worker
+    machine.openshift.io/cluster-api-machine-type: worker
+    machine.openshift.io/cluster-api-machineset: testdata-compute-region-1
+    machine.openshift.io/instance-type: xxlarge
+    machine.openshift.io/region: region-1
+    machine.openshift.io/zone: zone-1
+  name: testdata-compute-0
+  namespace: openshift-machine-api
+  ownerReferences:
+  - apiVersion: machine.openshift.io/v1beta1
+    blockOwnerDeletion: true
+    controller: true
+    kind: MachineSet
+    name: testdata-compute-region-1
+    uid: 00000000-0000-0000-0000-000000000000
+  resourceVersion: "38121"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  metadata: {}
+  providerID: fake://ip-10-0-1-1.compute.plane
+  providerSpec:
+    value: {}
+status:
+  addresses:
+  - address: 10.0.1.1
+    type: InternalIP
+  - address: ip-10-0-1-1.compute.plane
+    type: InternalDNS
+  - address: ip-10-0-1-1.compute.plane
+    type: Hostname
+  conditions:
+  - lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: InstanceExists
+  lastUpdated: "2022-01-01T00:00:00Z"
+  nodeRef:
+    kind: Node
+    name: ip-10-0-1-1.compute.plane
+    uid: 00000000-0000-0000-0000-000000000000
+  phase: Running
+  providerStatus:
+    conditions:
+    - lastProbeTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: Machine successfully created
+      reason: MachineCreationSucceeded
+      status: "True"
+      type: MachineCreation
+    instanceId: 10.0.1.1.compute.plane
+    instanceState: running
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: machine.openshift.io/v1beta1
+kind: Machine
+metadata:
+  annotations:
+    machine.openshift.io/instance-state: running
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  finalizers:
+  - machine.machine.openshift.io
+  generation: 2
+  labels:
+    machine.openshift.io/cluster-api-cluster: testdata
+    machine.openshift.io/cluster-api-machine-role: master
+    machine.openshift.io/cluster-api-machine-type: master
+    machine.openshift.io/instance-type: xlarge
+    machine.openshift.io/region: region-1
+    machine.openshift.io/zone: zone-1
+  name: testdata-control-plane-0
+  namespace: openshift-machine-api
+  resourceVersion: "16606"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  metadata: {}
+  providerID: fake://ip-10-0-0-1.control.plane
+  providerSpec:
+    value: {}
+status:
+  addresses:
+  - address: 10.0.0.1
+    type: InternalIP
+  - address: ip-10-0-0-1.control.plane
+    type: InternalDNS
+  - address: ip-10-0-0-1.control.plane
+    type: Hostname
+  conditions:
+  - lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: InstanceExists
+  lastUpdated: "2022-01-01T00:00:00Z"
+  nodeRef:
+    kind: Node
+    name: ip-10-0-0-1.control.plane
+    uid: 00000000-0000-0000-0000-000000000000
+  phase: Running
+  providerStatus:
+    conditions:
+    - lastProbeTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: Machine successfully created
+      reason: MachineCreationSucceeded
+      status: "True"
+      type: MachineCreation
+    instanceId: 10.0.0.1.control.plane
+    instanceState: running
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: machine.openshift.io/v1beta1
+kind: Machine
+metadata:
+  annotations:
+    machine.openshift.io/instance-state: running
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  finalizers:
+  - machine.machine.openshift.io
+  generation: 2
+  labels:
+    machine.openshift.io/cluster-api-cluster: testdata
+    machine.openshift.io/cluster-api-machine-role: master
+    machine.openshift.io/cluster-api-machine-type: master
+    machine.openshift.io/instance-type: xlarge
+    machine.openshift.io/region: region-1
+    machine.openshift.io/zone: zone-2
+  name: testdata-control-plane-1
+  namespace: openshift-machine-api
+  resourceVersion: "16606"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  metadata: {}
+  providerID: fake://ip-10-0-0-2.control.plane
+  providerSpec:
+    value: {}
+status:
+  addresses:
+  - address: 10.0.0.2
+    type: InternalIP
+  - address: ip-10-0-0-2.control.plane
+    type: InternalDNS
+  - address: ip-10-0-0-2.control.plane
+    type: Hostname
+  conditions:
+  - lastTransitionTime: "2022-01-01T00:00:00Z"
+    status: "True"
+    type: InstanceExists
+  lastUpdated: "2022-01-01T00:00:00Z"
+  nodeRef:
+    kind: Node
+    name: ip-10-0-0-2.control.plane
+    uid: 00000000-0000-0000-0000-000000000000
+  phase: Failed
+  providerStatus:
+    conditions:
+    - lastProbeTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: Machine successfully created
+      reason: MachineCreationSucceeded
+      status: "True"
+      type: MachineCreation
+    instanceId: 10.0.0.2.control.plane
+    instanceState: failed
+       
+
+
+
+
+
+ +

+Nodes

+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Node
+metadata:
+  annotations:
+    machine.openshift.io/machine: openshift-machine-api/testdata-control-plane-1
+    machineconfiguration.openshift.io/controlPlaneTopology: HighlyAvailable
+    machineconfiguration.openshift.io/currentConfig: rendered-master-0
+    machineconfiguration.openshift.io/desiredConfig: rendered-master-0
+    machineconfiguration.openshift.io/reason: ""
+    machineconfiguration.openshift.io/state: Done
+    nfd.node.kubernetes.io/master.version: "1.16"
+    volumes.kubernetes.io/controller-managed-attach-detach: "true"
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  labels:
+    beta.kubernetes.io/arch: amd64
+    beta.kubernetes.io/instance-type: xlarge
+    beta.kubernetes.io/os: linux
+    failure-domain.beta.kubernetes.io/region: region-1
+    failure-domain.beta.kubernetes.io/zone: zone-1
+    kubernetes.io/arch: amd64
+    kubernetes.io/hostname: ip-10-0-0-2.control.plane
+    kubernetes.io/os: linux
+    node-role.kubernetes.io/master: ""
+    node.kubernetes.io/instance-type: xlarge
+    node.openshift.io/os_id: rhcos
+    topology.kubernetes.io/region: region-1
+    topology.kubernetes.io/zone: zone-1
+  name: ip-10-0-0-2.control.plane
+  resourceVersion: "89485"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  providerID: fake://ip-10-0-0-2.control.plane
+  taints:
+  - effect: NoSchedule
+    key: node-role.kubernetes.io/master
+status:
+  addresses:
+  - address: 10.0.0.2
+    type: InternalIP
+  - address: ip-10-0-0-2.control.plane
+    type: Hostname
+  - address: ip-10-0-0-2.control.plane
+    type: InternalDNS
+  allocatable:
+    cpu: 3500m
+    ephemeral-storage: "115470533646"
+    hugepages-1Gi: "0"
+    hugepages-2Mi: "0"
+    memory: 14955324Ki
+    pods: "250"
+  capacity:
+    cpu: "4"
+    ephemeral-storage: 125293548Ki
+    hugepages-1Gi: "0"
+    hugepages-2Mi: "0"
+    memory: 16106300Ki
+    pods: "250"
+  conditions:
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet has sufficient memory available
+    reason: KubeletHasSufficientMemory
+    status: "False"
+    type: MemoryPressure
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet has no disk pressure
+    reason: KubeletHasNoDiskPressure
+    status: "False"
+    type: DiskPressure
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet has sufficient PID available
+    reason: KubeletHasSufficientPID
+    status: "False"
+    type: PIDPressure
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet is posting ready status
+    reason: KubeletReady
+    status: "False"
+    type: Ready
+  daemonEndpoints:
+    kubeletEndpoint:
+      Port: 10250
+  images:
+  - names:
+    - quay.io/openshift-release-dev/ocp-v4.0-art-dev
+    sizeBytes: 1139449201
+  nodeInfo:
+    architecture: amd64
+    bootID: 00000000-0000-0000-0000-000000000000
+    containerRuntimeVersion: cri-o://1.24.alpha.fake
+    kernelVersion: 5.fake
+    kubeProxyVersion: v1.24
+    kubeletVersion: v1.24
+    machineID: 00000000000000000000000000000000
+    operatingSystem: linux
+    osImage: Linux
+    systemUUID: 00000000-0000-0000-0000-000000000000
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Node
+metadata:
+  annotations:
+    machine.openshift.io/machine: openshift-machine-api/testdata-compute-0
+    machineconfiguration.openshift.io/controlPlaneTopology: HighlyAvailable
+    machineconfiguration.openshift.io/currentConfig: rendered-worker-0
+    machineconfiguration.openshift.io/desiredConfig: rendered-worker-0
+    machineconfiguration.openshift.io/reason: ""
+    machineconfiguration.openshift.io/state: Done
+    nfd.node.kubernetes.io/master.version: "1.16"
+    volumes.kubernetes.io/controller-managed-attach-detach: "true"
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  labels:
+    beta.kubernetes.io/arch: amd64
+    beta.kubernetes.io/instance-type: xxlarge
+    beta.kubernetes.io/os: linux
+    failure-domain.beta.kubernetes.io/region: region-1
+    failure-domain.beta.kubernetes.io/zone: zone-1
+    kubernetes.io/arch: amd64
+    kubernetes.io/hostname: ip-10-0-1-1.compute.plane
+    kubernetes.io/os: linux
+    node-role.kubernetes.io/worker: ""
+    node.kubernetes.io/instance-type: xxlarge
+    node.openshift.io/os_id: rhcos
+    topology.kubernetes.io/region: region-1
+    topology.kubernetes.io/zone: zone-1
+  name: ip-10-0-1-1.compute.plane
+  resourceVersion: "89485"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  providerID: fake://ip-10-0-1-1.compute.plane
+status:
+  addresses:
+  - address: 10.0.1.1.
+    type: InternalIP
+  - address: ip-10-0-1-1.compute.plane
+    type: Hostname
+  - address: ip-10-0-1-1.compute.plane
+    type: InternalDNS
+  allocatable:
+    cpu: 3500m
+    ephemeral-storage: "115470533646"
+    hugepages-1Gi: "0"
+    hugepages-2Mi: "0"
+    memory: 14955324Ki
+    pods: "250"
+  capacity:
+    cpu: "4"
+    ephemeral-storage: 125293548Ki
+    hugepages-1Gi: "0"
+    hugepages-2Mi: "0"
+    memory: 16106300Ki
+    pods: "250"
+  conditions:
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet has sufficient memory available
+    reason: KubeletHasSufficientMemory
+    status: "False"
+    type: MemoryPressure
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet has no disk pressure
+    reason: KubeletHasNoDiskPressure
+    status: "False"
+    type: DiskPressure
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet has sufficient PID available
+    reason: KubeletHasSufficientPID
+    status: "False"
+    type: PIDPressure
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: kubelet is posting ready status
+    reason: KubeletReady
+    status: "False"
+    type: Ready
+  daemonEndpoints:
+    kubeletEndpoint:
+      Port: 10250
+  images:
+  - names:
+    - quay.io/openshift-release-dev/ocp-v4.0-art-dev
+    sizeBytes: 1139449201
+  nodeInfo:
+    architecture: amd64
+    bootID: 00000000-0000-0000-0000-000000000000
+    containerRuntimeVersion: cri-o://1.24.alpha.fake
+    kernelVersion: 5.fake
+    kubeProxyVersion: v1.24
+    kubeletVersion: v1.24
+    machineID: 00000000000000000000000000000000
+    operatingSystem: linux
+    osImage: Linux
+    systemUUID: 00000000-0000-0000-0000-000000000000
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: v1
+kind: Node
+metadata:
+  annotations:
+    machine.openshift.io/machine: openshift-machine-api/control-plane1
+    machineconfiguration.openshift.io/controlPlaneTopology: HighlyAvailable
+    machineconfiguration.openshift.io/currentConfig: rendered-master-0
+    machineconfiguration.openshift.io/desiredConfig: rendered-master-0
+    machineconfiguration.openshift.io/reason: ""
+    machineconfiguration.openshift.io/state: Done
+    nfd.node.kubernetes.io/master.version: "1.16"
+    volumes.kubernetes.io/controller-managed-attach-detach: "true"
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  labels:
+    beta.kubernetes.io/arch: amd64
+    beta.kubernetes.io/instance-type: xlarge
+    beta.kubernetes.io/os: linux
+    failure-domain.beta.kubernetes.io/region: region-1
+    failure-domain.beta.kubernetes.io/zone: zone-1
+    kubernetes.io/arch: amd64
+    kubernetes.io/hostname: ip-10-0-0-1.control.plane
+    kubernetes.io/os: linux
+    node-role.kubernetes.io/master: ""
+    node.kubernetes.io/instance-type: xlarge
+    node.openshift.io/os_id: rhcos
+    topology.kubernetes.io/region: region-1
+    topology.kubernetes.io/zone: zone-1
+  name: ip-10-0-0-1.control.plane
+  resourceVersion: "89485"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  providerID: "fake://ip-10-0-0-1.control.plane"
+  taints:
+    - effect: NoSchedule
+      key: node-role.kubernetes.io/master
+status:
+  addresses:
+    - address: 10.0.0.1
+      type: InternalIP
+    - address: ip-10-0-0-1.control.plane
+      type: Hostname
+    - address: ip-10-0-0-1.control.plane
+      type: InternalDNS
+  allocatable:
+    cpu: 3500m
+    ephemeral-storage: "115470533646"
+    hugepages-1Gi: "0"
+    hugepages-2Mi: "0"
+    memory: 14955324Ki
+    pods: "250"
+  capacity:
+    cpu: "4"
+    ephemeral-storage: 125293548Ki
+    hugepages-1Gi: "0"
+    hugepages-2Mi: "0"
+    memory: 16106300Ki
+    pods: "250"
+  conditions:
+    - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: kubelet has sufficient memory available
+      reason: KubeletHasSufficientMemory
+      status: "False"
+      type: MemoryPressure
+    - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: kubelet has no disk pressure
+      reason: KubeletHasNoDiskPressure
+      status: "False"
+      type: DiskPressure
+    - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: kubelet has sufficient PID available
+      reason: KubeletHasSufficientPID
+      status: "False"
+      type: PIDPressure
+    - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+      lastTransitionTime: "2022-01-01T00:00:00Z"
+      message: kubelet is posting ready status
+      reason: KubeletReady
+      status: "True"
+      type: Ready
+  daemonEndpoints:
+    kubeletEndpoint:
+      Port: 10250
+  images:
+    - names:
+        - quay.io/openshift-release-dev/ocp-v4.0-art-dev
+      sizeBytes: 1139449201
+  nodeInfo:
+    architecture: amd64
+    bootID: 00000000-0000-0000-0000-000000000000
+    containerRuntimeVersion: "cri-o://1.24.alpha.fake"
+    kernelVersion: 5.fake
+    kubeProxyVersion: v1.24
+    kubeletVersion: v1.24
+    machineID: 493810f75ca55b6099ceec0c9373f2fe
+    operatingSystem: linux
+    osImage: Linux
+    systemUUID: 00000000-0000-0000-0000-000000000000
+       
+
+
+
+
+
+ +

+BareMetalHosts

+
+
+
+ +

+CPMSs

+
+
+
+ +

+CSRs

+
+
+

+ +

+
+
+
+---
+apiVersion: certificates.k8s.io/v1
+kind: CertificateSigningRequest
+metadata:
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: csr-
+  name: csr-approved
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  groups:
+  - system:serviceaccounts
+  - system:serviceaccounts:openshift-machine-config-operator
+  - system:authenticated
+  request: TOTALLY_VALID_CERT
+  signerName: kubernetes.io/kube-apiserver-client-kubelet
+  uid: 00000000-0000-0000-0000-000000000000
+  usages:
+  - digital signature
+  - key encipherment
+  - client auth
+  username: system:serviceaccount:openshift-machine-config-operator:node-bootstrapper
+status:
+  certificate: TOTALLY_VALID_CERT
+  conditions:
+  - lastTransitionTime: "2022-01-01T00:00:00Z"
+    lastUpdateTime: "2022-01-01T00:00:00Z"
+    message: This CSR was approved by the Node CSR Approver
+    reason: NodeCSRApprove
+    status: "True"
+    type: Approved
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: certificates.k8s.io/v1
+kind: CertificateSigningRequest
+metadata:
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: csr-
+  name: csr-denied
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  groups:
+  - system:nodes
+  - system:authenticated
+  request: TOTALLY_NOT_VALID_CERT
+  signerName: kubernetes.io/kubelet-serving
+  usages:
+  - digital signature
+  - key encipherment
+  - server auth
+  username: system:node:ip-10-0-0-3.region-1.control.plane
+status:
+  conditions:
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: Denied by some controller
+    reason: DeniedBySomeController
+    type: Denied
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: certificates.k8s.io/v1
+kind: CertificateSigningRequest
+metadata:
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: csr-
+  name: csr-failed
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  groups:
+  - system:nodes
+  - system:authenticated
+  request: TOTALLY_NOT_VALID_CERT
+  signerName: kubernetes.io/kubelet-serving
+  usages:
+  - digital signature
+  - key encipherment
+  - server auth
+  username: system:node:ip-10-0-0-5.region-1.control.plane
+status:
+  conditions:
+  - lastHeartbeatTime: "2022-01-01T00:00:00Z"
+    lastTransitionTime: "2022-01-01T00:00:00Z"
+    message: Failed for some reason
+    reason: FailedForSomeReason
+    type: Failed
+       
+
+
+
+
+

+ +

+
+
+
+---
+apiVersion: certificates.k8s.io/v1
+kind: CertificateSigningRequest
+metadata:
+  creationTimestamp: "2022-01-01T00:00:00Z"
+  generateName: csr-
+  name: csr-pending
+  resourceVersion: "12345"
+  uid: 00000000-0000-0000-0000-000000000000
+spec:
+  groups:
+  - system:nodes
+  - system:authenticated
+  request: TOTALLY_VALID_CERT
+  signerName: kubernetes.io/kubelet-serving
+  usages:
+  - digital signature
+  - key encipherment
+  - server auth
+  username: system:node:ip-10-0-0-3.region-1.control.plane
+status: {}
+       
+
+
+
+
+
+ + + + + + diff --git a/src/html.rs b/src/html.rs index b7ee4f7..c7c8add 100644 --- a/src/html.rs +++ b/src/html.rs @@ -62,7 +62,7 @@ fn add_accordion_section( .attr(format!("data-bs-target=\"#collapse-{}\"", &resuuid.hyphenated()).as_str()) .attr("aria-exapnded=\"false\"") .attr(format!("aria-controls=\"collapse-{}\"", &resuuid.hyphenated()).as_str()) - .write_str(&res.name())?; + .write_str(res.name())?; itemdiv .div() .attr(format!("id=\"collapse-{}\"", &resuuid.hyphenated()).as_str()) @@ -72,7 +72,7 @@ fn add_accordion_section( .div() .attr("class=\"accordion-body fs-6\"") .pre() - .write_str(&res.raw())?; + .write_str(res.raw())?; } Ok(()) @@ -164,13 +164,13 @@ fn add_body(parent: &mut Node, mustgather: &MustGather) -> Result<()> { // add data sections // data sections are used by the nav list and vue app to change the content // in the div#main-content element. - add_summary_data(&mut body, &mustgather)?; + add_summary_data(&mut body, mustgather)?; add_resource_data(&mut body, "Cluster Operators", &mustgather.clusteroperators)?; - add_machine_api_data(&mut body, &mustgather)?; - add_machine_config_data(&mut body, &mustgather)?; - add_ccmo_data(&mut body, &mustgather)?; - add_ccms_data(&mut body, &mustgather)?; - add_autoscaling_data(&mut body, &mustgather)?; + add_machine_api_data(&mut body, mustgather)?; + add_machine_config_data(&mut body, mustgather)?; + add_ccmo_data(&mut body, mustgather)?; + add_ccms_data(&mut body, mustgather)?; + add_autoscaling_data(&mut body, mustgather)?; add_resource_data(&mut body, "MachineSets", &mustgather.machinesets)?; add_resource_data(&mut body, "Machines", &mustgather.machines)?; add_resource_data(&mut body, "Nodes", &mustgather.nodes)?; @@ -247,7 +247,7 @@ fn add_machine_config_data(parent: &mut Node, mustgather: &MustGather) -> Result Ok(()) } -fn add_navlist_entry(parent: &mut Node, title: &str, resources: &Vec) -> Result<()> { +fn add_navlist_entry(parent: &mut Node, title: &str, resources: &[impl Resource]) -> Result<()> { let mut aclass = "class=\"list-group-item list-group-item-action\""; let mut clickattr = format!( "v-on:click=\"changeContent('{}')\"", @@ -305,7 +305,7 @@ fn add_pod_accordions(parent: &mut Node, pods: &Vec) -> Result<()> { .attr(format!("data-bs-target=\"#collapse-{}\"", &poduuid.hyphenated()).as_str()) .attr("aria-exapnded=\"false\"") .attr(format!("aria-controls=\"collapse-{}\"", &poduuid.hyphenated()).as_str()) - .write_str(&pod.name())?; + .write_str(pod.name())?; itemdiv .div() .attr(format!("id=\"collapse-{}\"", &poduuid.hyphenated()).as_str()) @@ -315,7 +315,7 @@ fn add_pod_accordions(parent: &mut Node, pods: &Vec) -> Result<()> { .div() .attr("class=\"accordion-body fs-6\"") .pre() - .write_str(&pod.raw())?; + .write_str(pod.raw())?; for container in &pod.containers { let containeruuid = Uuid::new_v4(); let mut itemdiv = div.div().attr("class=\"accordion-item\""); @@ -379,7 +379,7 @@ fn add_resource_data(parent: &mut Node, kind: &str, resources: &Vec Result<()> { @@ -401,9 +401,9 @@ fn add_summary_data(parent: &mut Node, mustgather: &MustGather) -> Result<()> { ], )?; - add_summary_data_machinesets_section(&mut dl, &mustgather)?; - add_summary_data_machines_section(&mut dl, &mustgather)?; - add_summary_data_nodes_section(&mut dl, &mustgather)?; + add_summary_data_machinesets_section(&mut dl, mustgather)?; + add_summary_data_machines_section(&mut dl, mustgather)?; + add_summary_data_nodes_section(&mut dl, mustgather)?; Ok(()) } @@ -515,7 +515,7 @@ fn add_table(parent: &mut Node, head: Vec<&str>, body: Vec>) -> Result let mut tbody = table.tbody(); - for (_i, item) in body.iter().enumerate() { + for item in body.iter() { let mut tr = tbody.tr(); for (ii, iitem) in item.iter().enumerate() { let t = if ii == 0 { tr.th() } else { tr.td() }; diff --git a/src/main.rs b/src/main.rs index dff590d..d93e0a8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,7 +55,7 @@ fn main() -> Result<()> { return Err(error); } }; - mg = MustGather::from(tmp_dir.path().to_str().unwrap().to_owned())?; + mg = MustGather::from(tmp_dir.path().to_str().unwrap())?; } else { mg = MustGather::from(cli.path)?; } diff --git a/src/mustgather.rs b/src/mustgather.rs index b514d08..394c9ae 100644 --- a/src/mustgather.rs +++ b/src/mustgather.rs @@ -278,7 +278,7 @@ fn get_pod(pod_dir: &PathBuf) -> Option { } } - if let Ok(container_dirs) = fs::read_dir(&pod_dir) { + if let Ok(container_dirs) = fs::read_dir(pod_dir) { // loop through container dirs for container_dir in container_dirs { let container_dir = container_dir.ok()?.path(); @@ -288,7 +288,7 @@ fn get_pod(pod_dir: &PathBuf) -> Option { None => continue, }; let mut current_log_filename = container_dir.clone(); - current_log_filename.push(&container_name); + current_log_filename.push(container_name); current_log_filename.push("logs"); current_log_filename.push("current.log"); if current_log_filename.exists() { @@ -332,7 +332,7 @@ fn get_pods(path: &Path) -> Vec { let mut pods = Vec::new(); // each pod has a subdirectory with its name - let pod_dirs = match fs::read_dir(&path) { + let pod_dirs = match fs::read_dir(path) { Ok(entries) => entries, Err(_) => return pods, }; @@ -358,7 +358,7 @@ fn get_pods(path: &Path) -> Vec { /// If the resource path does not exist, will return an empty list. fn get_resources(path: &Path) -> Vec { let mut resources = Vec::new(); - let files = match fs::read_dir(&path) { + let files = match fs::read_dir(path) { Ok(p) => p, Err(_) => return resources, }; diff --git a/src/resources/baremetalhost.rs b/src/resources/baremetalhost.rs index ddd49dc..2c0f69f 100644 --- a/src/resources/baremetalhost.rs +++ b/src/resources/baremetalhost.rs @@ -27,6 +27,6 @@ impl Resource for BareMetalHost { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/certificatesigningrequest.rs b/src/resources/certificatesigningrequest.rs index 6436189..ad8b9f5 100644 --- a/src/resources/certificatesigningrequest.rs +++ b/src/resources/certificatesigningrequest.rs @@ -22,7 +22,7 @@ impl Resource for CertificateSigningRequest { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } fn is_error(&self) -> bool { diff --git a/src/resources/clusterautoscaler.rs b/src/resources/clusterautoscaler.rs index c7fa09d..726d479 100644 --- a/src/resources/clusterautoscaler.rs +++ b/src/resources/clusterautoscaler.rs @@ -19,6 +19,6 @@ impl Resource for ClusterAutoscaler { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/clusteroperator.rs b/src/resources/clusteroperator.rs index fbb9e10..b049491 100644 --- a/src/resources/clusteroperator.rs +++ b/src/resources/clusteroperator.rs @@ -41,6 +41,6 @@ impl Resource for ClusterOperator { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/controlplanemachineset.rs b/src/resources/controlplanemachineset.rs index 4ce9e76..29f28a7 100644 --- a/src/resources/controlplanemachineset.rs +++ b/src/resources/controlplanemachineset.rs @@ -27,6 +27,6 @@ impl Resource for ControlPlaneMachineSet { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/machine.rs b/src/resources/machine.rs index e438df5..f699c6d 100644 --- a/src/resources/machine.rs +++ b/src/resources/machine.rs @@ -25,7 +25,7 @@ impl Resource for Machine { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/machineautoscaler.rs b/src/resources/machineautoscaler.rs index bde35ab..733d1e9 100644 --- a/src/resources/machineautoscaler.rs +++ b/src/resources/machineautoscaler.rs @@ -19,6 +19,6 @@ impl Resource for MachineAutoscaler { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/machineset.rs b/src/resources/machineset.rs index 5369136..fd27389 100644 --- a/src/resources/machineset.rs +++ b/src/resources/machineset.rs @@ -41,22 +41,17 @@ impl Resource for MachineSet { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } fn has_autoscaling_annotations(manifest: &Manifest) -> bool { - if manifest.as_yaml()["metadata"]["annotations"] + !(manifest.as_yaml()["metadata"]["annotations"] ["machine.openshift.io/cluster-api-autoscaler-node-group-min-size"] .is_badvalue() && manifest.as_yaml()["metadata"]["annotations"] ["machine.openshift.io/cluster-api-autoscaler-node-group-max-size"] - .is_badvalue() - { - false - } else { - true - } + .is_badvalue()) } fn status_replicas(manifest: &Manifest) -> String { diff --git a/src/resources/node.rs b/src/resources/node.rs index d895a38..f6b9517 100644 --- a/src/resources/node.rs +++ b/src/resources/node.rs @@ -25,6 +25,6 @@ impl Resource for Node { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } } diff --git a/src/resources/pod.rs b/src/resources/pod.rs index 8236653..35d320d 100644 --- a/src/resources/pod.rs +++ b/src/resources/pod.rs @@ -37,7 +37,7 @@ impl Resource for Pod { } fn raw(&self) -> &String { - &self.manifest.as_raw() + self.manifest.as_raw() } }