1 of 142

2 of 142

New Contributor Workshop

Guinevere Saenger

Tim Pepper

3 of 142

Welcome on board!

4 of 142

Workshop Facilitators

101 Workshop

Tim Pepper

SIG-Release

VMware�

201 Workshop

Guinevere Saenger

SIG-Contributor-Experience

GitHub

Tutors

Arnaud Meukam

Jeffrey Sica

Bartlomiej Smykla

Rostislav Georgiev

Silvia Moura Pina

Kiran Mova

Rael Garcia

5 of 142

Order of operations - Combined session

  1. Introduction
  2. Where to Contribute
  3. Communication
  4. The SIG system
  5. Tour of Repos

6 of 142

Who can contribute to Kubernetes?

Credit Ashley McNamara and github.com/ashleymcnamara/gophers for this image. Credit Renee French for the original gopher concept and design.

7 of 142

Why contribute to Kubernetes?

8 of 142

Fitting Contributions Into Your Job

9 of 142

10 of 142

Choose Your Own Adventure

Figuring out where

to contribute

11 of 142

Find Your Topic Exercise

  1. With those around you, explain (or speculate) on what part of Kubernetes you might want to contribute to.

  • Also, explain what in your background, job, or interests motivates you.

12 of 142

Let’s Talk

Communication in theKubernetes Community

13 of 142

DEF

14 of 142

Standards of Communication

aka: Why is everyone so nice?

We believe that mutual respect is a prerequisite for healthy collaboration.

git.k8s.io/community/code-of-conduct.md

15 of 142

Technical Questions

16 of 142

Slack

Register here: slack.k8s.io

Good channels to start in are:

#kubernetes-users,

#kubernetes-novice,

#sig-contribex

17 of 142

Discuss

Want more long-form discussions?

Head over to discuss.kubernetes.io

18 of 142

Planning and Discussion

19 of 142

Mailing lists

  • One per SIG/WG

  • Run on Google Groups

  • You need to join:
    • kubernetes-dev
    • Required for Org Membership!

20 of 142

GitHub

Issues

Features

Pull requests

21 of 142

Zoom Meetings

22 of 142

Zoom Meetings

Schedule is on the community calendar

  • SIG Meetings
  • Kubernetes Weekly Community Meeting
    • Overview of community activities, release info, and governance updates.
  • Special meetings

23 of 142

Other Communications

  • kubernetes.io/community
    • Links to everything community related can be found here
  • Meet Our Contributors
    • Monthly live video discussion with contributors
  • Office Hours
    • Monthly live video panel to ask technical questions
  • KubeCon + CloudNativeCon
  • Face-to-Face SIG meetings
  • Meetups

24 of 142

Attend a Meetup

25 of 142

Collected links

26 of 142

The SIG System

27 of 142

Special Interest Group

How work is organized

git.k8s.io/community/sig-list.md

28 of 142

Special Interest Group

SIG sounds like of like a meetup group, and it both isn't and also is.

Each SIG is its own sub-community in Kubernetes, because it's a huge project and we can't all be in one giant pool of 2000 contributors.

29 of 142

Types of SIGs

  1. Feature Areas
  2. Plumbing
  3. Meta
  4. Docs
  5. Cloud Provider

30 of 142

Feature Area SIGs

sig-auth

sig-apps

sig-autoscaling

sig-cli

sig-multicluster

sig-network

sig-node

sig-scalability

sig-scheduling

sig-service-catalog

sig-storage

sig-ui

31 of 142

“Plumbing” SIGs

sig-api-machinery

sig-cluster-lifecycle

sig-instrumentation

32 of 142

Meta

sig-architecture

sig-contributor-experience

sig-pm

sig-release

sig-testing

33 of 142

Documentation & Website

sig-docs

34 of 142

Cloud Provider

Individual cloud providers are Subprojects of this SIG.

List of Cloudprovider Subprojects

35 of 142

Working Groups and Subprojects

Working Groups: inter-SIG efforts

Subprojects: focus areas for SIGs

For specific:

  • Tools (ex. Kubectl)
  • Goals (ex. Code Cleanup, Contributor Site)
  • Areas (ex. Machine Learning)

36 of 142

Working Groups

wg-apply

wg-component-standard

wg-iot-edge

wg-k8s-infra

wg-lts

wg-machine-learning

wg-multitenancy

wg-policy

wg-resource-management

wg-security-audit

37 of 142

Subprojects

Usually found in kubernetes-sigs/ namespace

�Examples include...

cloud tools

kustomize

kind

kubebuilder

federation-v2

contributor-site

38 of 142

User Groups

No codebase ownership�

Topics of interest shared across large groups of users

Big Data

39 of 142

Committees

project governance oriented��there are currently three committees:

Steering��Product Security��Code of Conduct

40 of 142

Picking the right SIG

  1. Figure out what specific projects/areas you want to work on.
  2. Find out which SIG/WG/subproject covers that
    1. Ask on #sig-contribex
    2. Go to the SIG intros at this conference
  3. Join that SIG/subproject
    • If joining a WG/subproject, also join a SIG

41 of 142

How Do I Join A SIG?

  • Join the sig-specific mailing list.�This is open to anyone.

  • That’s it. You’ve joined a SIG.

42 of 142

Really? That’s it?

  • Yup! It’s the official way to denote SIG membership.�
  • You will now get calendar invites to SIG meetings on Zoom. Go ahead and join and you’ll likely be asked to introduce yourself.

43 of 142

User Groups

  • For any purpose that does not have clearly defined deliverables or ownership

Example: Big Data User Group

44 of 142

Committees

  • Join By Invite Or Election Only

Examples:

  • Steering
  • Project Security
  • Code of Conduct

45 of 142

Quick reference

46 of 142

Tour ofRepositories

47 of 142

Core Repository

Most SIGs are stakeholders in the monolith.

Areas of SIG ownership can be found in https://git.k8s.io/community/sigs.yaml

48 of 142

My repository, my rules

Repos can have different:

  • Ownership
  • Approval workflows
  • Merge workflows
  • Release cycles

However, most are pretty similar.

49 of 142

Ready to jump right in?

50 of 142

Split Session

51 of 142

BEGIN 101

52 of 142

Morning

  • Basic Repo/Code Tour
  • Dev Env: Pre-Requisites
  • SIGs, Labels, Issues: Overview
  • Open Source Interactions
  • PRs and Bots
  • Playground Exercise
  • Dev Env: Status Check

Afternoon

  • Dev Env: Final Check
  • Build System(s)
  • Make Targets
  • Build kubectl
  • Testing
  • SIGs, Areas, Issues: Engaging
  • Help Wanted: First PR Ideas

NCW 101 Agenda

53 of 142

Basic Repo/Code Tour

54 of 142

Basic Repo/Code Tour

55 of 142

  • Lots of RAM/Disk/CPU
  • Linux, Mac, Windows basic dev tools
  • Docker (for Mac/Win dedicate 6GB RAM)
  • Golang 1.12 latest and $GOPATH set
  • GitHub:
    • account and SSH key configured
    • fork github.com/kubernetes/kubernetes

Dev Environment: Pre-Requisites

56 of 142

  • mkdir -p $GOPATH/src/k8s.io/ && cd $GOPATH/src/k8s.io/
  • git clone git@github.com:YOUYOUYOU/kubernetes.git && cd kubernetes
  • git remote add upstream https://github.com/kubernetes/kubernetes.git
  • git fetch upstream
  • git checkout upstream/release-1.14

Dev Environment: Initialization

57 of 142

We’re using a local Harbor instance to serve up the majority of the container images you’ll need for this:

docker pull harbor.k8s.dev/contribsummit/debian-base-amd64:0.4.1

docker pull harbor.k8s.dev/contribsummit/debian-hyperkube-base-amd64:0.12.1

docker pull harbor.k8s.dev/contribsummit/debian-iptables-amd64:v11.0.1

docker pull harbor.k8s.dev/contribsummit/kindest/node:v1.14.2

docker pull harbor.k8s.dev/contribsummit/kube-cross:v1.12.1-2

docker pull harbor.k8s.dev/contribsummit/etcd:latest

Dev Environment: Container Images

58 of 142

SIGs, Labels, Issues: Overview

How to talk to the Kubernetes

community and automation

59 of 142

60 of 142

DEF

61 of 142

Required Labels for Issues

On creation:�

sig/

kind/��

62 of 142

Label

sig/auth

sig/testing

sig/api-machinery

sig/node

Bot command

/sig auth

/sig testing

/sig api-machinery

/sig node

The SIG Label

63 of 142

Adding a label

64 of 142

kind/bug kind/failing-test

kind/feature kind/flake

kind/documentation kind/cleanup

kind/design

Example bot command: /kind feature

The Kind Label

65 of 142

priority/critical-urgent

priority/important-soon

priority/important-longterm

priority/backlog

priority/awaiting-evidence

Example bot command:�/priority critical-urgent

The Priority Label

66 of 142

area/kubectl

area/api

area/dns

area/platform/gce

The Area Label

67 of 142

triage/duplicate

triage/needs-information

triage/support

triage/unreproduceable

triage/unresolved

The Triage Label

68 of 142

Open Source Interactions

me

implementation

centralized

implicit

assumptions

69 of 142

Open Source Interactions

we

collaboration

decentralized

explicit

shared theories

me

implementation

centralized

implicit

assumptions

70 of 142

Open Source Interactions

functionality

code

71 of 142

Open Source Interactions

docs

tests

integrations

releases

security

functionality

code

72 of 142

Open Source Interactions

functionality

code

docs

tests

integrations

releases

security

HUMAN / SOCIAL:

73 of 142

Open Source Interactions

Be good people!

Mutual respect is a prerequisite for healthy collaboration.

git.k8s.io/community/code-of-conduct.md

74 of 142

Open Source Interactions

Goal: Get a change into project

75 of 142

Open Source Interactions

Goal: Get a change into project

Path:

  • Visibility, transparency, proactive communication
  • Code, plus documentation, plus test cases
  • Presence in meetings, Slack, mailing list
  • Reviewable code

76 of 142

Open Source Interactions

Reviewable code:

  • demonstrates sound IDEA...through words
  • demonstrates reasonably architected solution...through words
  • polished implementation

77 of 142

Open Source Interactions

Reviewable code:

  • demonstrates sound IDEA...through words
  • demonstrates reasonably architected solution...through words
  • polished implementation

Make the reviewer’s job easy:

  • commit subject line summarizes
  • commit body details what & why

78 of 142

Open Source Interactions

Timing:

  • expect things you CARE about to take time
  • quality vs. speed
  • decentralized consensus forming
  • conversations wrap the globe
  • is it code freeze right now or merge time?

Open source is fast in aggregate, but:

  • ideamonths → alpha → 1+ release → beta → 1+ release stable
  • ...9-24 months

79 of 142

Open Source Interactions

80 of 142

PRs and Bots: GitHub PR Flow

81 of 142

PRs and Bots: Kubernetes PR Flow

  1. You submit Pull Request (PR)
  2. You add labels & notes
  3. Bots validate and comment on the PR

release-note cncf-cla: no needs-ok-to-test needs-kind needs-sig

  • You add more labels & notes & resolve review comments
  • SIGs & OWNERS review and /approve → approved
  • Other contributors /lgtm → lgtm
  • Tests pass
  • Tide merges the PR

https://prow.k8s.io/command-help

82 of 142

Command

/assign @username

�/retest�

/close��/cc @username

Result

Assigns a Reviewer

�Reruns failed tests��Closes PR��Tags a user

PRs and Bots: Useful Commands

83 of 142

PRs and Bots: Reviewers/Approvers

84 of 142

PRs and Bots: Reviewers/Approvers

  • Attach /sig label
  • Contact your mentor(s)
  • Contact the SIG
    • attend SIG meeting
    • ask Slack
    • send email to list
  • Contact OWNERS

85 of 142

PRs and Bots: Test Results

86 of 142

PRs and Bots: Following Up

Answer questions

Resolve:

Bot messages

Code comments

Test failures

87 of 142

Contributor Ladder

Subproject Owner

Set priorities and approve proposals for subproject

Responsibility and leadership for entire repository/directory

Approver

Approve contributions for acceptance

Highly experienced reviewer and contributor in subproject

Reviewer

History of reviewing; reviews frequently

Authorship in subproject

Member

Active contributor to the project

Sponsored by two Reviewers

Non-member Contributors

88 of 142

Contributor Ladder: Membership

89 of 142

Contributor Ladder: Membership

90 of 142

Contributor Ladder

91 of 142

OWNERS

YAML files sprinkled all through the repos, eg:

http://git.k8s.io/community/contributors/guide/owners.md

Kubernetes Core OWNERS file

92 of 142

Playground Exercise

93 of 142

https://sigs.k8s.io/contributor-playground

  1. Fork and clone
  2. Make changes in “barcelona” directory
  3. Pull request
  4. Review/comment/rebase
  5. Pay attention to labels and bot prompts

Playground Exercise

94 of 142

Have you downloaded the things?

Have you installed the things?

Do you have k/k forked and cloned?

Can you “make”?

Dev Environment: Status Check

95 of 142

LUNCH BREAK!

Let us know if you need any additional hands on help with your laptop configuration...

96 of 142

“make” should work now...

Dev Environment: Final Check

97 of 142

Build System(s)

  • local OS
    • or
  • container based

  • go build
  • make
  • bazel build

https://git.k8s.io/kubernetes/build/README.md

98 of 142

Make Targets

  • ‘make’: go build of host OS/arch-specific core binaries

  • ‘make release’: (don’t do this ;)
    • containerized build of client/server/node binaries
    • Window, MacOS, Linux
    • x86/386, x86_64/amd64, arm, arm64, ppc64le, s390x

  • ‘make quick-release’:
    • containerized build of core binaries
    • defaults to linux/amd64

99 of 142

Make Targets

  • ‘make WHAT=cmd/kubectl
    • build kubectl for your host OS/arch

  • KUBE_BUILD_PLATFORMS=windows/amd64 \

make WHAT=cmd/kubectl’

    • build kubectl for windows/amd64

  • ‘make help’: info on make targets

100 of 142

Make Targets: Try it...build kubectl!

  1. Edit cmd/kubectl/kubectl.go

  • Add a “hello world” print out in “func main()”, eg:

fmt.Println("!Hola Barcelona!")

  • Build: make WHAT=cmd/kubectl

  1. New binary? ls -al _output/local/go/bin/kubectl

  • Run your binary: cd ./_output/local/go/bin

./kubectl version

101 of 142

Testing

  • Unit: test via native golang

  • Integration: test package or component interactions

  • End-to-end (“e2e”): tests overall system behavior and coherence on a fully integrated cluster

  • Conformance: subset of e2e, tests SIG Architecture approved to define the core set of interoperable features

https://bit.ly/k8s-ncw-testing

102 of 142

Testing: Unit Tests

  • Simple native golang

  • Example: run kubectl’s unit tests

  • cd pkg/kubectl; go test ./…

ok k8s.io/kubernetes/pkg/kubectl 5.525s

? k8s.io/kubernetes/pkg/kubectl/apply [no test files]

ok k8s.io/kubernetes/pkg/kubectl/apply/parse 0.442s

ok k8s.io/kubernetes/pkg/kubectl/apply/strategy 2.916s

ok k8s.io/kubernetes/pkg/kubectl/apps 0.251s

.

.

103 of 142

Testing: Integration

  • Package or component interactions

  • Requires dependency management

  • Example: run a test of k8s code + etcd

  • hack/install-etcd.sh; make test-integration

104 of 142

Testing: End-to-End (e2e)

  • Cluster interactions

  • Requires … a cluster

  • Example: run a focused e2e test (requires Linux)

sudo PATH=$PATH hack/local-up-cluster.sh

export KUBECONFIG=/path/to/kubeconfig

kubetest --provider=local --test --test_args="--minStartupPods=1 --ginkgo.focus=Secrets"

105 of 142

Testing: Conformance

  • Subset of e2e
  • SIG Architecture approved tests
  • Represent core set of interoperable features

  • Example: run the conformance tests

(see previous on local-cluster-up.sh)

make WHAT="test/e2e/e2e.test vendor/github.com/onsi/ginkgo/ginkgo cmd/kubectl"

kubetest --provider=skeleton --test --test_args="--ginkgo.focus=\[Conformance\]"

106 of 142

Testing: Minikube

  • https://github.com/kubernetes/minikube/
  • Kubernetes cluster-in-a-VM on your local machine!

  • Requirements:
    • Host machine with kubectl
    • Guest VM ability
    • Host<->Guest networking and internet connectivity

107 of 142

Testing: KinD

  • https://github.com/kubernetes-sigs/kind/
  • Kubernetes cluster-in-a-container on your local machine!

  • Requirements:
    • Docker runtime
    • Internet connectivity

  • Get KinD, build k8s from source, start cluster:
    • GO111MODULE="on" go get -u sigs.k8s.io/kind@v0.3.0
    • kind build node-image
    • kind create cluster --image kindest/node:latest

108 of 142

SIGs, Areas, Issues: Engaging

What’s next for you?

109 of 142

SIGs, Areas, Issues: Engaging

Non-Code Contributions

  • Filing Issues
  • Answering Questions on StackOverflow
  • Github Repo Management
  • Blogging, Evangelism, and Promotion
  • Event Management and Volunteering
  • Visual Communication
  • User Experience Feedback and Surveys
  • Helping Manage Youtube Recordings
  • ...and more!

110 of 142

SIGs, Areas, Issues: Engaging

Mentoring Opportunities

  • Meet-Our-Contributors
  • Group Mentoring
  • Release Team Shadow
  • 1-on-1 ad-hoc mentoring
  • GSOC/Outreachy

111 of 142

SIGs, Areas, Issues: Engaging

Kubernetes Tutorials

  • As an operator
  • As an app developer
  • As a kubernetes developer

https://kubernetes.io/docs/tutorials/

112 of 142

SIGs, Areas, Issues: Engaging

113 of 142

SIGs, Areas, Issues: Engaging

Right here at KubeCon!

  • Sessions
  • SIG Intros
  • SIG Deep Dives
  • Hallway Track

114 of 142

  • Search for good first issue & help wanted issues
  • Search by SIG & Area labels to match your interest
  • Discuss at tables ideas for contributing

...carry this discussion into the SIG Meet & Greet

Help Wanted: First PR Ideas

115 of 142

END 101

116 of 142

BEGIN 201

117 of 142

201 Session

118 of 142

The Kubernetes Monolith

119 of 142

Core Repository

Most SIGs are stakeholders in the monolith.

Areas of SIG ownership can be found in https://git.k8s.io/community/sigs.yaml

120 of 142

Building Binaries

121 of 142

Let’s Break A Test!

$make test WHAT=./<your_package_here>

122 of 142

Labels and Bot Commands

123 of 142

The Contributor Playground

124 of 142

Bot Commands

125 of 142

Kubernetes GitHub Workflow

126 of 142

Membership

127 of 142

Owner

Set priorities and approve proposals for subproject

Responsibility and leadership for entire repository

Approver

Approve contributions for acceptance

Highly experienced reviewer and contributor in subproject

Reviewer

History of reviewing; reviews frequently

Authorship in subproject

Member

Active contributor to the project

Sponsored by two Reviewers

Non-member Contributors

128 of 142

Code Cleanup Demo

129 of 142

Finding A Reviewer

  • Follow Bot Prompts
  • Ping Issue author
  • OWNERS file
  • sigs.yaml
  • #pr-reviews on k8s Slack

130 of 142

Releases

Software has to leave home eventually

131 of 142

The 3-month Release Cycle

132 of 142

Enhancements Discussion (per SIG): ongoing

Enhancements Freeze: week ~4

Release Branch Creation: week ~7

Code Slush / Freeze: week ~8

...bugs, testing, bugs, fixing, bugs, ...iterating

End Code Freeze: week ~12

Release: week ~13

Release Process

Enhancements

Definition

Feature

Work

Bug

Fixing

Release

3 Month Cycle

133 of 142

Release Lifecycle

1.14.x Patch Releases

3mo’s

~9mo’s

K8s Releases

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Feb

Jan

Dec

Definition

Enhancement Work

Fixes

1.14

134 of 142

Release Lifecycle

1.14.x Patch Releases

1.15.x Patch Releases

3mo’s

3mo’s

~9mo’s

~9mo’s

K8s Releases

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Feb

Jan

Dec

Definition

Enhancement Work

Fixes

1.15

Definition

Enhancement Work

Fixes

1.14

~9mo’s

3mo’s

135 of 142

Release Lifecycle

1.16.x Patch

1.14.x Patch Releases

1.15.x Patch Releases

3mo’s

3mo’s

~9mo’s

~9mo’s

~9mo’s

K8s Releases

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Feb

Jan

Dec

Definition

Enhancement Work

Fixes

1.16

3mo’s

Definition

Enhancement Work

Fixes

1.15

Definition

Enhancement Work

Fixes

1.14

136 of 142

Release Lifecycle

1.16.x Patch

1.14.x Patch Releases

1.15.x Patch Releases

3mo’s

3mo’s

~9mo’s

~9mo’s

~9mo’s

K8s Releases

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Feb

Jan

Dec

3mo’s

3mo’s

Definition

Enhancement Work

Fixes

1.17

Definition

Enhancement Work

Fixes

1.15

Definition

Enhancement Work

Fixes

1.14

Definition

Enhancement Work

Fixes

1.16

137 of 142

Branch Management

138 of 142

Thank you, and�welcome aboard!

139 of 142

140 of 142

END 201

141 of 142

SIG Meet-and-Greet

142 of 142

Post-Workshop Resources

Videos are available (on Google Drive)

Also please reach out to Guin or Tim anytime:�@gsaenger, @tpepper on k8s Slack�@guincodes on twitter