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

ClusterResource Analyzer Improvements #1523

Closed
diamonwiggins opened this issue Apr 12, 2024 · 2 comments · Fixed by #1547
Closed

ClusterResource Analyzer Improvements #1523

diamonwiggins opened this issue Apr 12, 2024 · 2 comments · Fixed by #1547
Labels
type::feature New feature or request

Comments

@diamonwiggins
Copy link
Member

Describe the rationale for the suggested feature.

Documentation Improvements

Currently, the ClusterResource analyzer only has a single example which is based on a pvc. More examples with different types of objects could help those using the analyzer. Also, for the kind property it isn't documented which resources the ClusterResource analyzer supports. Lastly, for the resources that are supported, the naming isn't consistent. Some are lowercase and others are upper case emphasizing how important it is to have better documentation.

https://troubleshoot.sh/docs/analyze/cluster-resource/

Code Improvements

The naming for the resources shouldn't be case sensitive

@diamonwiggins diamonwiggins added the type::feature New feature or request label Apr 12, 2024
@sj-porter-knime
Copy link

More examples in the docs would be very helpful!

The only thing we're planning to use clusterResource for so far is to verify that resources exist at all - I don't think there's a default way to do that (at least not a documented one), so we're doing weird things like...

    - clusterResource:
        checkName: knime-postgres-cluster
        kind: Service
        namespace: knime
        name: knime-postgres-cluster
        yamlPath: "metadata.name"
        regex: knime-postgres-cluster
        outcomes:
          - fail:
              when: "false"
              message: knime-postgres-cluster service is missing.
          - pass:
              when: "true"
              message: knime-postgres-cluster service is present.

...which essentially just checks that the .metadata.name property matches the resource.

The main goal is to simply ensure that expected resources are present in the cluster. In some cases, particularly if a helm chart fails to install altogether, the support bundle will not detect that a resource is missing from the cluster.

@DexterYan
Copy link
Member

Hey @diamonwiggins,

Could you help me to review this PR #1547? Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
Status: Done
3 participants