© 2016 IBM Corporation© 2016 IBM Corporation
Kubernetes Issues Management
and Upstream Development
Sahdev P. Zala
Senior Software Engineer, IBM
Kubernetes contributor
Openstack core reviewer
@sp_zala
spzala@us.ibm.com
© 2016 IBM Corporation© 2016 IBM Corporation
Overview of Presentation
• Kubernetes code repos
• Special Interest Groups (SIGs) and Slack channels
• Kubernetes Bots
• Issues
• What is an issue?
• Issue life cycle - walk through a real issue
• Issues management
• Pull Request
• What is a Pull Request (PR)?
• PR development workflow
• PR life cycle - walk through a real PR
• Upstream development – 5 Do’s and Don’t
• Discussion/Questions
© 2016 IBM Corporation© 2016 IBM Corporation
Kubernetes Repositories
• Kubernetes has several different but related github repos:
• https://github.com/kubernetes/kubernetes/ - main repo
• https://github.com/kubernetes/community/ - starting point for becoming a contributor
• https://github.com/kubernetes/website/ - documentation
• https://github.com/kubernetes/test-infra - contains a collection of tools for testing Kubernetes
• https://github.com/kubernetes/examples - examples
• https://github.com/kubernetes/minikube - single-node local cluster
• https://github.com/kubernetes/helm - Kubernetes package manager using charts
• etc.
© 2016 IBM Corporation© 2016 IBM Corporation
Special Interest Groups (SIGs) and Slack
• SIGs
• Domain specific group (e.g. network sig)
• https://github.com/kubernetes/community/blob/master/sig-list.md
• Contributor Experience SIG
• https://github.com/kubernetes/community/tree/master/sig-contributor-experience
• Would like to hear if you have any feedback as a contributor
• Meets every week or bi-weekly meetings
• Typically zoom video call
• Similar to OpenStack IRC project meetings
• Discussion on specific Slack channels
• https://kubernetes.slack.com
© 2016 IBM Corporation© 2016 IBM Corporation
K8s Bot
5
• k8s-ci-robot and k8s-merge-robot understand several commands or labels. They should
all be uttered on their own line, and they are case-sensitive.
https://github.com/kubernetes/test-infra/blob/master/commands.md
• /assign @<name> - Assigns specified people. Must be done by Kubernetes org member.
• /close - closes the issue/PR. You must be author or assignee or org member.
• /cc @<name> - Request review from specified people
• etc..
© 2016 IBM Corporation© 2016 IBM Corporation
Bot can even entertain you
6
© 2016 IBM Corporation© 2016 IBM Corporation
Things Do Change
7
• If you use @k8s-bot tell me a joke the bot won’t tell you joke because things
do change:
© 2016 IBM Corporation© 2016 IBM Corporation
Bot also ask you to add label
8
• Besides understanding labels that we add, bot will also ask you to add label or
add labels automatically:
 Addresses an important point –
instead of running and utilizing build
and test resources every time a PR is
created and prevents running
malicious code with CI/CD – run only
after high level look from an
experienced reviewer/org member.
NO ok-to-test in following:
© 2016 IBM Corporation© 2016 IBM Corporation
Kubernetes Issues
• Issue can be a bug or feature
• The Kubernetes issues are listed at
https://github.com/kubernetes/kubernetes/issues - let’s try to create one
• Issues are identified with labels (e.g. /kind bug or /kind feature)
• Kubernetes is one of the most busiest github repo
• Around 5000 issues usually
• Issue may not valid:
• can be a duplicate or support question or already fixed or lacks enough information
© 2016 IBM Corporation© 2016 IBM Corporation
Issue Life Cycle
• Issue created
• Somebody most likely active triage engineer or SIG member or issue reporter
will do following:
• Labels added e.g. /kind bug, /sig cli, @kubernetes/sig-contributor-experience-proposals
• Optional comment(s) added
• More details asked if needed
• Comments added with findings e.g. issue is already fixed, dup etc.
• Assign issue to appropriate person
• Issue closed if found not a real issue, with helpful comments for issue reporter
• Pull Request (PR) created with reference to this issue (e.g. PR with fixes #
<issueNumber>)
• Issue closed
• Issue reopened by reporter if not happy with the fix or incorrectly closed.
Issue
created
Labels/Comment
s added
Real
issue
?
Issue
closed
Pull
Request
Issue
closed
No Yes
© 2016 IBM Corporation© 2016 IBM Corporation
Walk through a real Issue
11
• https://github.com/kubernetes/kubernetes/issues/56372 Open issue
• https://github.com/kubernetes/kubernetes/issues/54098 Closed issue
© 2016 IBM Corporation© 2016 IBM Corporation
How issues are managed?
12
• Close the issue
• Divert support questions to following sites and close the issue.
• https://stackoverflow.com/questions/tagged/kubernetes
• https://serverfault.com/questions/tagged/kubernetes
• Already fixed or duplicate issues.
• Can not be recreated or reporter never provided requested information.
• A fix is provided via Pull Request (PR) – auto close if issue is referenced in
the PR
• Label properly for triage
• Proper SIG labels
• Priority label
 Contributors with certain
privilege can only close
issues. If you are looking at any
issue as new contributor and
think it can be closed, simple
add your findings as a
comment.
 Want to contribute? Here
are the guidelines:
https://github.com/kubernetes/c
ommunity/blob/master/contribut
ors/devel/issues.md
© 2016 IBM Corporation© 2016 IBM Corporation
Where to report issue
13
• Many different Kubernetes related repos
• https://github.com/kubernetes/kubernetes/
• https://github.com/kubernetes/minikube
• https://github.com/kubernetes/community/
• https://github.com/kubernetes/website/ etc.
• Issues should be reported separately per what you think they fit best.
• Many times reporters just create issue in Kubernetes main repo (for example,
you are playing with minikube and something didn’t work related to minikube
that should be an issue for minikube repo not kubernetes repo.)
© 2016 IBM Corporation© 2016 IBM Corporation
How to search issues
14
Default when you go to Kubernetes issues:
You can filter issues by many ways:
• is:issue label:sig/cli
• etc.
• https://github.com/kubernetes/kubernetes/issues - let’s check out
© 2016 IBM Corporation© 2016 IBM Corporation
What is a Pull Request
• Changes you are making to the github repo:
Pull requests let you tell others about changes you've pushed to a repository on GitHub.
Once a pull request is opened, you can discuss and review the potential changes with
collaborators and add follow-up commits before the changes are merged into the
repository.
• https://github.com/kubernetes/kubernetes/pulls
© 2016 IBM Corporation© 2016 IBM Corporation
Want to Contribute? Your first PR..
16
• Make sure you have Github account
• Sign a Contributor License Agreement (CLA)
• Fork the repo you want to contribute e.g.
github.com/kubernetes/..
• Set up development environment
• Make code changes
• Test (make test or use bazel)
• Commit
• Push
• Create PR
https://github.com/kubernetes/community/blob/master/contributors/devel/development.md
https://github.com/kubernetes/community/tree/master
/contributors/devel
https://github.com/kubernetes/community/blob/master
/CLA.md
 Git  YAML Go
© 2016 IBM Corporation© 2016 IBM Corporation
PR life cycle
17
• PR created
• Kubernetes bot requires ok-to-test from org member
• Build pass (if fail, look at log and either do /retest if build failure is due to not related to
code changes, else, fix your changes e.g. your code is good but it failed formatting
something which member might missed looking at high level before running ok-to-test)
• Review comments
• Address review comments and commit
• Get lgtm
• Squash your commits into one
• Approved and Merged
© 2016 IBM Corporation© 2016 IBM Corporation
Walk through a real PR
18
• https://github.com/kubernetes/kubernetes/pull/53587
© 2016 IBM Corporation© 2016 IBM Corporation
Kubernetes Upstream Contribution – 5 Do’s and
Don’t
19
• https://developer.ibm.com/code/2017/11/06/kubernetes-upstream-contribution-
5-dos-dont/
© 2016 IBM Corporation© 2016 IBM Corporation 20
Thank you !!
Questions?

Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017

  • 1.
    © 2016 IBMCorporation© 2016 IBM Corporation Kubernetes Issues Management and Upstream Development Sahdev P. Zala Senior Software Engineer, IBM Kubernetes contributor Openstack core reviewer @sp_zala spzala@us.ibm.com
  • 2.
    © 2016 IBMCorporation© 2016 IBM Corporation Overview of Presentation • Kubernetes code repos • Special Interest Groups (SIGs) and Slack channels • Kubernetes Bots • Issues • What is an issue? • Issue life cycle - walk through a real issue • Issues management • Pull Request • What is a Pull Request (PR)? • PR development workflow • PR life cycle - walk through a real PR • Upstream development – 5 Do’s and Don’t • Discussion/Questions
  • 3.
    © 2016 IBMCorporation© 2016 IBM Corporation Kubernetes Repositories • Kubernetes has several different but related github repos: • https://github.com/kubernetes/kubernetes/ - main repo • https://github.com/kubernetes/community/ - starting point for becoming a contributor • https://github.com/kubernetes/website/ - documentation • https://github.com/kubernetes/test-infra - contains a collection of tools for testing Kubernetes • https://github.com/kubernetes/examples - examples • https://github.com/kubernetes/minikube - single-node local cluster • https://github.com/kubernetes/helm - Kubernetes package manager using charts • etc.
  • 4.
    © 2016 IBMCorporation© 2016 IBM Corporation Special Interest Groups (SIGs) and Slack • SIGs • Domain specific group (e.g. network sig) • https://github.com/kubernetes/community/blob/master/sig-list.md • Contributor Experience SIG • https://github.com/kubernetes/community/tree/master/sig-contributor-experience • Would like to hear if you have any feedback as a contributor • Meets every week or bi-weekly meetings • Typically zoom video call • Similar to OpenStack IRC project meetings • Discussion on specific Slack channels • https://kubernetes.slack.com
  • 5.
    © 2016 IBMCorporation© 2016 IBM Corporation K8s Bot 5 • k8s-ci-robot and k8s-merge-robot understand several commands or labels. They should all be uttered on their own line, and they are case-sensitive. https://github.com/kubernetes/test-infra/blob/master/commands.md • /assign @<name> - Assigns specified people. Must be done by Kubernetes org member. • /close - closes the issue/PR. You must be author or assignee or org member. • /cc @<name> - Request review from specified people • etc..
  • 6.
    © 2016 IBMCorporation© 2016 IBM Corporation Bot can even entertain you 6
  • 7.
    © 2016 IBMCorporation© 2016 IBM Corporation Things Do Change 7 • If you use @k8s-bot tell me a joke the bot won’t tell you joke because things do change:
  • 8.
    © 2016 IBMCorporation© 2016 IBM Corporation Bot also ask you to add label 8 • Besides understanding labels that we add, bot will also ask you to add label or add labels automatically:  Addresses an important point – instead of running and utilizing build and test resources every time a PR is created and prevents running malicious code with CI/CD – run only after high level look from an experienced reviewer/org member. NO ok-to-test in following:
  • 9.
    © 2016 IBMCorporation© 2016 IBM Corporation Kubernetes Issues • Issue can be a bug or feature • The Kubernetes issues are listed at https://github.com/kubernetes/kubernetes/issues - let’s try to create one • Issues are identified with labels (e.g. /kind bug or /kind feature) • Kubernetes is one of the most busiest github repo • Around 5000 issues usually • Issue may not valid: • can be a duplicate or support question or already fixed or lacks enough information
  • 10.
    © 2016 IBMCorporation© 2016 IBM Corporation Issue Life Cycle • Issue created • Somebody most likely active triage engineer or SIG member or issue reporter will do following: • Labels added e.g. /kind bug, /sig cli, @kubernetes/sig-contributor-experience-proposals • Optional comment(s) added • More details asked if needed • Comments added with findings e.g. issue is already fixed, dup etc. • Assign issue to appropriate person • Issue closed if found not a real issue, with helpful comments for issue reporter • Pull Request (PR) created with reference to this issue (e.g. PR with fixes # <issueNumber>) • Issue closed • Issue reopened by reporter if not happy with the fix or incorrectly closed. Issue created Labels/Comment s added Real issue ? Issue closed Pull Request Issue closed No Yes
  • 11.
    © 2016 IBMCorporation© 2016 IBM Corporation Walk through a real Issue 11 • https://github.com/kubernetes/kubernetes/issues/56372 Open issue • https://github.com/kubernetes/kubernetes/issues/54098 Closed issue
  • 12.
    © 2016 IBMCorporation© 2016 IBM Corporation How issues are managed? 12 • Close the issue • Divert support questions to following sites and close the issue. • https://stackoverflow.com/questions/tagged/kubernetes • https://serverfault.com/questions/tagged/kubernetes • Already fixed or duplicate issues. • Can not be recreated or reporter never provided requested information. • A fix is provided via Pull Request (PR) – auto close if issue is referenced in the PR • Label properly for triage • Proper SIG labels • Priority label  Contributors with certain privilege can only close issues. If you are looking at any issue as new contributor and think it can be closed, simple add your findings as a comment.  Want to contribute? Here are the guidelines: https://github.com/kubernetes/c ommunity/blob/master/contribut ors/devel/issues.md
  • 13.
    © 2016 IBMCorporation© 2016 IBM Corporation Where to report issue 13 • Many different Kubernetes related repos • https://github.com/kubernetes/kubernetes/ • https://github.com/kubernetes/minikube • https://github.com/kubernetes/community/ • https://github.com/kubernetes/website/ etc. • Issues should be reported separately per what you think they fit best. • Many times reporters just create issue in Kubernetes main repo (for example, you are playing with minikube and something didn’t work related to minikube that should be an issue for minikube repo not kubernetes repo.)
  • 14.
    © 2016 IBMCorporation© 2016 IBM Corporation How to search issues 14 Default when you go to Kubernetes issues: You can filter issues by many ways: • is:issue label:sig/cli • etc. • https://github.com/kubernetes/kubernetes/issues - let’s check out
  • 15.
    © 2016 IBMCorporation© 2016 IBM Corporation What is a Pull Request • Changes you are making to the github repo: Pull requests let you tell others about changes you've pushed to a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before the changes are merged into the repository. • https://github.com/kubernetes/kubernetes/pulls
  • 16.
    © 2016 IBMCorporation© 2016 IBM Corporation Want to Contribute? Your first PR.. 16 • Make sure you have Github account • Sign a Contributor License Agreement (CLA) • Fork the repo you want to contribute e.g. github.com/kubernetes/.. • Set up development environment • Make code changes • Test (make test or use bazel) • Commit • Push • Create PR https://github.com/kubernetes/community/blob/master/contributors/devel/development.md https://github.com/kubernetes/community/tree/master /contributors/devel https://github.com/kubernetes/community/blob/master /CLA.md  Git  YAML Go
  • 17.
    © 2016 IBMCorporation© 2016 IBM Corporation PR life cycle 17 • PR created • Kubernetes bot requires ok-to-test from org member • Build pass (if fail, look at log and either do /retest if build failure is due to not related to code changes, else, fix your changes e.g. your code is good but it failed formatting something which member might missed looking at high level before running ok-to-test) • Review comments • Address review comments and commit • Get lgtm • Squash your commits into one • Approved and Merged
  • 18.
    © 2016 IBMCorporation© 2016 IBM Corporation Walk through a real PR 18 • https://github.com/kubernetes/kubernetes/pull/53587
  • 19.
    © 2016 IBMCorporation© 2016 IBM Corporation Kubernetes Upstream Contribution – 5 Do’s and Don’t 19 • https://developer.ibm.com/code/2017/11/06/kubernetes-upstream-contribution- 5-dos-dont/
  • 20.
    © 2016 IBMCorporation© 2016 IBM Corporation 20 Thank you !! Questions?