Skip to content

Files

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Cloud Native Hackathon Guide - December 10-12, 2021

Datree’s mission: To improve the workflow of Kubernetes administrators and users

If at any point you find yourself lost, join our Slack community for assistance.

🏆 Compete to win

  • 1st prize is a laptop
  • 2nd prize is a mobile phone
  • 3rd prize is an iPad or headphones

🎓 Required knowledge to participate in this Hackathon

  • Basic experience operating Git and GitHub
  • Basic experience reading and writing JSON and YAML
  • Basic experience using and writing JSON Schema
  • Familiarity with Datree's Policy as code and custom rules concepts

📋 Instructions

  1. Choose a use case that would help other Kubernetes admins or users in their work
    Such as:
    ㅤa. Stability
    ㅤb. Security
    ㅤc. Governance
    ㅤd. Cost reduction
    ㅤe. Industry best practices
    ㅤf. Any other creative idea you have will be welcomed

  2. Solve the use case by creating a policy with relevant custom rules

  3. Include well-written documentation in a README file
    The README should include the following information:
    ㅤa. An overview of the use case that the policy solves
    ㅤb. An explanation for why it’s a worthy use case and how the use case helps Kubernetes admins in their work
    ㅤc. A list of the rules within the policy and how they support the use case
    ㅤd. The policy author - full name and GitHub handle (for teams: all team members)
    ㅤe. Any other type of documentation that can help us to evaluate and understand the rules in your policy, and how they are related to the use case you chose

  4. Provide a basic Kubernetes manifests to test (failing & passing) for each custom rule (see an example here)

⚠️ Important notes

  • Your policy must represent a workable solution
  • We also welcome all innovative uses of Datree that help the community - please get your innovative idea pre-approved by our judges

🎉 How to win

  1. Submit your work by opening a pull request to the examples directory (datree/examples) on Datree’s repo.
    You may submit more than one policy.

  2. Your score for winning will be based on whether your use case works according to what you present, including detailed documentation, and how useful the use case is to Kubernetes admins. Quality matters over quantity.

  3. [OPTIONAL] Are you proud of your work:question::question:
    If so, don’t forget to Tweet or post on LinkedIn that you’ve participated in this #CloudNativeHackathon and tag us so we can like and share!

YouTube Video

You Tube Video

🚔 How to write a policy

  1. Sign up for Datree and follow the instructions to install Datree’s CLI on your machine

  2. Using JSON Schema, create custom rules that are relevant to your policy
    👉ㅤYou can use this online YAML Schema Validator to easily test your custom rule logic before adding it to your policy

  3. Add the custom rules to your policy file

  4. Publish the policy (datree publish policy-name.yaml) and verify it's working as expected

💻 How to submit a pull request

  1. Fork Datree's project:

Screen Shot 2021-11-07 at 11 19 57

  1. Clone the forked project to your local machine:
    • Click on the green code button[1]
    • Choose the cloning method (HTTPS, SSH, CLI)[2]
    • Copy the link[3]
    • Open a terminal or command line
    • Direct it to the directory where we want to store the local repo with the cd command
    • Run: git clone <copied link>
    • Run: cd datree

Screen Shot 2021-11-07 at 11 45 07

  1. Add your policy:

    • Open the project in your favorite IDE (e.g. VSCode, WebStorm, etc.)
    • Go to the examples directory (datree/examples) and create a new directory with the name of your policy
    • Add your policy and additional required files (README, tests yamls, etc.)
    • The code structure should resemble the sample-policy directory
  2. Save the changes - once you made the changes save them with git locally by committing them:

    • Run git add . to add all changed files.
      You can select specific files by running git add [file1] [file2]
    • Run git commit -m "[meaningful commit message]"
  3. Run git push to push the changes to your remote (forked) repository

  4. When you’re satisfied with your work and you’re ready to submit it for review, create a pull request:

    • Go to your forked repository in GitHub
    • Click on the "Compare & pull request" button Screen Shot 2021-11-08 at 15 00 40 *Please note: the pull request is visible in the origin repository
    • Write a title and a description using this guide
  5. The team will review and approve the request or will ask for changes and clarifications

    • Please visit the pull request page often and see if any changes were requested

🚑 Support

  • If technical issues arise, support will be provided via our Slack channel
  • If you find a bug, open an issue in our project -- we’ll prioritize it and respond