Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version, cluster stats to output and UI #61

Merged
merged 9 commits into from
Apr 22, 2019
Merged

Conversation

rbren
Copy link
Contributor

@rbren rbren commented Apr 19, 2019

Sample output as of now:

{
  "FairwindsOutputVersion": "0.0",
  "ClusterSummary": {
    "Results": {
      "Successes": 160,
      "Warnings": 54,
      "Errors": 46
    },
    "Version": "1.10",
    "Nodes": 6,
    "Pods": 50,
    "Namespaces": 8
  },
  "NamespacedResults": {
    "cert-manager": {
      "Summary": {
        "Successes": 31,
        "Warnings": 12,
        "Errors": 8
      },
      "Results": [
        {
          "Name": "cert-manager",
          "Type": "Deployment",
          "Summary": {
            "Successes": 13,
            "Warnings": 4,
            "Errors": 0
          },
          "ContainerResults": null,
          "PodResults": [
            {
              "Name": "",
              "Messages": [
                {
                  "Message": "Host alias is not configured",
                  "Type": "success"
                }
              ]
            }
          ]
        }
      ]
    }
  }
}

@rbren rbren force-pushed the rb/output-structure branch from ecbe9f3 to fcea4d6 Compare April 19, 2019 19:30
@@ -3,12 +3,28 @@ package validator
import (
conf "github.com/reactiveops/fairwinds/pkg/config"
"github.com/reactiveops/fairwinds/pkg/kube"
k8smeta "k8s.io/apimachinery/pkg/apis/meta/v1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really tiny thing, but most places I've seen this package included, including the one other place in this project, it's referred to as metav1, not sure there's any great reason to stick with that, just not what I'm used to in k8s code.

Copy link
Contributor

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thanks!

Copy link
Contributor

@robscott robscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, some great CSS cleanup/better naming here.

@rbren rbren changed the title Add version, cluster stats to output Add version, cluster stats to output and UI Apr 22, 2019
@rbren rbren merged commit 3ce7e12 into master Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants