jay vyas
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Interview2: Design a sonobuoy plugin to do something cool ## Goal Come up with an idea of something sonobuoy or crashd should do, that it doesnt do and show how you'd implement it. i.e. as a plugin or.. whatever. ## Deliverable - A paragraph on why you think it would be a useful sonobuoy or crashd plugin / extension - A breif ascii https://asciiflow.com/#/diagram pasted in this markdown of how it would work, w/ - some code snippets, if appropriate, of how you'd extend either repo and/or of how users would use your thingy ### Goal Provide a visual way for operators to easily identify failures, navigate to relevant logs/docs, and figure out how to fix them #### Rationale One of the challenges that I encountered while learning to use sonobuoy was the manual steps needed to get from running tests, to viewing the results. For example, this was my workflow: ``` sonobuoy run –wait sonobuoy retrieve sonobuoy results <gz file name> tar -xvf <gz file name> cd into unzipped directory code . Look through plugin results or take a look at sonobuoy_results.yaml ``` There’s a couple shortcuts that I learned, like using `sonobuoy results –extract`, which does the unzipping for me. But that didn’t allow me to view the quick results using sonobuoy results. I also needed to use my own file viewing/browsing mechanism, like Visual Studio Code, in order to navigate through the directory tree and open specific files as needed. Moreover, I found that `sonobuoy results` was good for providing a brief overview - if everything succeeds, great. But what if there are errors? And errors in the logs? Then I’d need to dig deeper into the actual results anyways. I wasn’t able to replicate major test failures, but I can imagine the challenge - going through the `sonobuoy_results.yaml`, to figure out which tests failed, and then go on to figuring out which logs to look at, in order to debug. And then googling the failure to figure out what to do. #### Overview What sonobuoy does: - Runs conformance tests on k8s, allows plugins to run additional tests as well - Aggregates results, and allows user to download tarball with results and logs What sonobuoy does not do: - Write and maintain conformance tests (responsibility is with plugin/k8s authors) - Provide a way of displaying/browsing results in an interactive manner - Enforce non-destructive nature (trust is on plugin authors) I believe that the following can help the operator experience: - Test-specific hints (eg. Links to documentation/specific tests in k8s conformance, if it fails). I’m not sure if this already exists - for successful e2e tests, it just shows the test name and pass/fail/skip status - Providing a visual mechanism that provides interactive navigation, filtering, visual data display I took a look at the github issues and k8s slack channel to validate this - it seems like a while back someone asked if there was a way to visualize data as well! https://kubernetes.slack.com/archives/C6L3G051C/p1657562349767639 #### Implementation ##### Test-specfic hints Hints for each test would be provided plugin/test authors. The existing output for results (results.Item struct) contains the fields name, Status, Metadata, Details, Items. The Details field is type `map[string]interface{}`, so it can contain anything - this could be where plugin authors add additional helpful information (so don’t need a schema change), but also poses a challenge if we want to render it in a visual tool, since we know it is a variable format. ##### GUI There are several implementations that I’ve considered for the GUI: 1. MVP (to validate if visual display format is feasible/useful) 1. Generate a single static HTML page, that renders data contained within `sonobuoy_results.yaml` 1. Generate visual table in HTML containing test name, colour coded status, and details from YAML (hints, messages, etc) 1. For e2e tests, details sections of failures to be populated with links directly to upstream test code or KB articles. But it would depend on plugins providing that information, which I couldn’t find. Flow: `sonobuoy results –-mode=visual-summary` -> results in the output of a single results.html file ``` Input: results.tar.gz, containing sonobuoy_results.yaml +-------------------------------------------------------+ | sonobuoy results results.tar.gz --mode=visual-summary | +-----------------+-------------------------------------+ | | +-----------v---------+ | | | Sonobuoy CLI | Converts YAML into HTML | | +-----------+---------+ | v Output: result.html ``` 2. Angular/Clarity design SPA (VMW styling) + sonobuoy as API 1. The GUI could provide functionality for: - Rendering results in visual format, like the MVP - Browsing log files with syntax highlighting for errors - Being able to diff results against previous conformance runs - Executing sonobuoy commands from a GUI button - Having additional filtering options like by tag, prefix, etc. 1. The API would provide functionality for: - Retrieving results from the sonobuoy aggregator - Providing file data to the SPA 1. The GUI would interact with the API server using REST JSON or gRPC, querying for results (which in turn the API would query the aggregator to fetch results) 2. The API itself would provide endpoints used to display result data in a format that the GUI can render. For example, providing lists of results, files, file contents, etc. 3. What I don’t like about this idea is that as it is, sonobuoy seems to do what it does well. The purpose is straightforward - run tests provided by plugins, and aggregate the result, and provide a lot of logs to help you debug. Having to build out a whole web UI and turning the CLI into an API seems like a lot of complexity without validated benefit, when perhaps that effort can be focused elsewhere. Flow: `sonobuoy gui` -> start web server that serves Web UI, acts as API server for GUI ``` +----------------------------------------+ +------------------------+ | Running on local machine | | Running in k8s | | | | | | +-----------+ +--------------+ | | +-------------------+ | | |Angular GUI+------>| Sonobuoy CLI +--+-+--+>|Sonobuoy Aggregator| | | +-----------+ +--------------+ | | | +-------------------+ | | | | | | | GET /api/v1/results | | | | | | | | | | | | | | +----------------------------------------+ | +------------------------+ | | sonobuoy retrieve ``` 3. Visual Studio Code extension 1. Some people use Visual Studio Code to browse the directory tree, and view files with automatic syntax highlighting. So if that functionality already exists in VSC, then it becomes less beneficial to re-implement that within Sonobuoy itself. 2. Building a typescript-based Visual Studio Code extension can allow the sonobuoy CLI to remain lightweight without changes, while supporting a potential workflow that operators may already use 3. The downside is that it would only be available to those that use VSC Flow: Download visual studio code extension, open `sonobuoy_results.yaml` using extension to see YAML rendered in visual format #### Other findings - Sonobuoy can be installed via brew, but it’s not documented in the README (can make issue/PR). Learned a bunch about how homebrew-core tracks application versions - Some links in the docs are broken in https://sonobuoy.io/plugins/ (can make issue/PR) - I wrote a plugin that deletes k8s resources on the cluster (using https://github.com/vmware-tanzu/sonobuoy-plugins/tree/main/examples/cmd-runner), and it’s able to do that since it seems like the kubeconfig context is passed directly through to the plugin. The sonobuoy site mentions tests are non-destructive, but it really depends on the plugin author!

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully