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

Unify troubleshoot specs #2213

Conversation

emosbaugh
Copy link
Member

What type of PR is this?

kind/chore

What this PR does / why we need it:

This PR is an attempt to streamline the process of writing new default collectors and analyzers by unifying the kots.io spec and the spec that is injected in go when generating a bundle through the KOTS UI. This code change makes it so that KOTS uses the kots.io spec in addition to the injected go spec and eliminates as much as possible from the go code.

Which issue(s) this PR fixes:

Fixes NONE

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Does this PR require documentation?

NONE

@emosbaugh emosbaugh force-pushed the emosbaugh/sc-28217/streamline-support-and-analyze-default-specs branch from 8837c53 to df4473e Compare September 28, 2021 19:05
@emosbaugh emosbaugh marked this pull request as ready for review September 28, 2021 20:47
@emosbaugh emosbaugh requested a review from a team September 28, 2021 20:47
@emosbaugh
Copy link
Member Author

Below is the diff after this change:

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
  creationTimestamp: null
  name: default-supportbundle
spec:
  analyzers: []
  collectors:
  - exec:
      args:
      - http://localhost:3030/goroutines
      collectorName: kotsadm-operator-goroutines
      command:
      - curl
      containerName: kotsadm-operator
      exclude: ""
      name: kots/admin_console
      namespace: default
      selector:
      - app=kotsadm-operator
      timeout: 10s
  - copyFromHost:
      collectorName: kurl-host-preflights
      exclude: ""
      extractArchive: true
      hostPath: /var/lib/kurl/host-preflights
      image: alpine
      imagePullPolicy: IfNotPresent
      name: kots/kurl/host-preflights
      namespace: ""
      timeout: 1m
  - configMap:
      collectorName: kurl-current-config
      exclude: ""
      includeAllData: true
      name: kurl-current-config
      namespace: kurl
  - configMap:
      collectorName: kurl-last-config
      exclude: ""
      includeAllData: true
      name: kurl-last-config
      namespace: kurl
  - collectd:
      collectorName: collectd
      exclude: ""
      hostPath: /var/lib/collectd/rrd
      image: alpine
      imagePullPolicy: IfNotPresent
      namespace: ""
      timeout: 5m

@emosbaugh
Copy link
Member Author

Analyze screenshot

Screen Shot 2021-09-28 at 5 24 32 PM

@@ -95,6 +96,7 @@ spec:
namespace: kurl
- secret:
collectorName: kotsadm-replicated-registry
name: kotsadm-replicated-registry # TODO: what is the correct name here?
Copy link
Member

Choose a reason for hiding this comment

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

this is the correct name for the secret used by kotsadm. app secret names are generated dynamically

Copy link
Member Author

Choose a reason for hiding this comment

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

i clarified this comment

@emosbaugh emosbaugh merged commit 3f7d825 into master Sep 29, 2021
@emosbaugh emosbaugh deleted the emosbaugh/sc-28217/streamline-support-and-analyze-default-specs branch September 29, 2021 23:26
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.

None yet

3 participants