Skip to content

Commit

Permalink
Make resource management working group discoverable
Browse files Browse the repository at this point in the history
Signed-off-by: Vishnu Kannan <[email protected]>
  • Loading branch information
vishh committed Jun 13, 2017
1 parent 0d95cce commit 0875cce
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-image:
docker build -t sigdocs -f generator/Dockerfile generator

gen-doc:
docker run -e SIG=${SIG} -v $(shell pwd):/go/src/app sigdocs
docker run -e WG=${WG} -e SIG=${SIG} -v $(shell pwd):/go/src/app sigdocs

gen-docs:
docker run -v $(shell pwd):/go/src/app sigdocs
8 changes: 5 additions & 3 deletions generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This script will generate the following documentation files:

```
sig-*/README.md
wg-*/README.md
sig-list.md
```

Expand All @@ -22,13 +23,14 @@ To build docs for one SIG, run these commands:
```bash
make SIG=sig-apps gen-doc
make SIG=sig-testing gen-doc
make WG=resource-management gen-doc
```

where the `SIG` var refers to the directory being built.
where the `SIG` or `WG` var refers to the directory being built.

## Adding custom content to your SIG's README
## Adding custom content to your README

If your SIG wishes to add custom content, you can do so by placing it within
If your SIG or WG wishes to add custom content, you can do so by placing it within
the following code comments:

```markdown
Expand Down
88 changes: 78 additions & 10 deletions generator/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ import (
var (
sigsYamlFile = "sigs.yaml"
templateDir = "generator"
indexTemplate = filepath.Join(templateDir, "sig_index.tmpl")
sigIndexTemplate = filepath.Join(templateDir, "sig_index.tmpl")
wgIndexTemplate = filepath.Join(templateDir, "wg_index.tmpl")
listTemplate = filepath.Join(templateDir, "sig_list.tmpl")
headerTemplate = filepath.Join(templateDir, "header.tmpl")
sigListOutput = "sig-list.md"
Expand Down Expand Up @@ -76,6 +77,22 @@ type Sig struct {
Contact Contact
}

type Wg struct {
Name string
Dir string
MissionStatement string `yaml:"mission_statement"`
Organizers []Lead
Meetings []Meeting
MeetingURL string `yaml:"meeting_url"`
MeetingArchiveURL string `yaml:"meeting_archive_url"`
Contact Contact
}

type Context struct {
Sigs []Sig
WorkingGroups []Wg
}

type SigEntries struct {
Sigs []Sig
}
Expand All @@ -92,9 +109,25 @@ func (slice SigEntries) Swap(i, j int) {
slice.Sigs[i], slice.Sigs[j] = slice.Sigs[j], slice.Sigs[i]
}

type WgEntries struct {
WorkingGroups []Wg
}

func (slice WgEntries) Len() int {
return len(slice.WorkingGroups)
}

func (slice WgEntries) Less(i, j int) bool {
return slice.WorkingGroups[i].Name < slice.WorkingGroups[j].Name
}

func (slice WgEntries) Swap(i, j int) {
slice.WorkingGroups[i], slice.WorkingGroups[j] = slice.WorkingGroups[j], slice.WorkingGroups[i]
}

func pathExists(path string) bool {
_, err := os.Stat(path)
return os.IsExist(err)
return err == nil
}

func createDirIfNotExists(path string) error {
Expand Down Expand Up @@ -190,12 +223,15 @@ func writeLastGenerated(f *os.File) {
f.Write([]byte(lastGenerated))
}

func createReadmeFiles(ctx SigEntries) error {
selectedSig := os.Getenv("SIG")
func createReadmeFiles(ctx Context) error {
var selectedSig *string
if sig, ok := os.LookupEnv("SIG"); ok {
selectedSig = &sig
}
for _, sig := range ctx.Sigs {
dirName := fmt.Sprintf("sig-%s", strings.ToLower(strings.Replace(sig.Name, " ", "-", -1)))

if selectedSig != "" && selectedSig != dirName {
if selectedSig != nil && *selectedSig != dirName {
fmt.Printf("Skipping %s\n", dirName)
continue
}
Expand All @@ -212,15 +248,43 @@ func createReadmeFiles(ctx SigEntries) error {
}

outputPath := fmt.Sprintf("%s/%s", dirName, sigIndexOutput)
if err := writeTemplate(indexTemplate, outputPath, sig); err != nil {
if err := writeTemplate(sigIndexTemplate, outputPath, sig); err != nil {
return err
}
}
var selectedWg *string
if wg, ok := os.LookupEnv("WG"); ok {
selectedWg = &wg
}
for _, wg := range ctx.WorkingGroups {
dirName := fmt.Sprintf("wg-%s", strings.ToLower(strings.Replace(wg.Name, " ", "-", -1)))

if selectedWg != nil && *selectedWg != dirName {
fmt.Printf("Skipping %s\n", dirName)
continue
}

createDirIfNotExists(dirName)

prefix := wg.Contact.GithubTeamPrefix
if prefix == "" {
prefix = dirName
}

for _, gtn := range githubTeamNames {
wg.Contact.GithubTeamNames = append(wg.Contact.GithubTeamNames, fmt.Sprintf("%s-%s", prefix, gtn))
}

outputPath := fmt.Sprintf("%s/%s", dirName, sigIndexOutput)
if err := writeTemplate(wgIndexTemplate, outputPath, wg); err != nil {
return err
}
}

return nil
}

func createListFile(ctx SigEntries) error {
func createListFile(ctx Context) error {
return writeTemplate(listTemplate, sigListOutput, ctx)
}

Expand All @@ -230,13 +294,17 @@ func main() {
log.Fatal(err)
}

var ctx SigEntries
var ctx Context
err = yaml.Unmarshal(yamlData, &ctx)
if err != nil {
log.Fatal(err)
}

sort.Sort(ctx)
sigEntries := SigEntries{ctx.Sigs}
sort.Sort(sigEntries)
ctx.Sigs = sigEntries.Sigs
wgEntries := WgEntries{ctx.WorkingGroups}
sort.Sort(wgEntries)
ctx.WorkingGroups = wgEntries.WorkingGroups

err = createReadmeFiles(ctx)
if err != nil {
Expand Down
8 changes: 8 additions & 0 deletions generator/sig_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ When the need arises, a [new SIG can be created](sig-creation-procedure.md)
{{- range .Sigs}}
|[{{.Name}}]({{.Dir}}/README.md)|{{range .Leads}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{ $save := . }}{{range .Meetings}}* [{{.Day}}s at {{.UTC}} UTC ({{.Frequency}})]({{$save.MeetingURL}})<br>{{end}}
{{- end }}

### Master Working Group List

| Name | Organizers | Contact | Meetings |
|------|------------|---------|----------|
{{- range .WorkingGroups}}
|[{{.Name}}]({{.Dir}}/README.md)|{{range .Organizers}}* [{{.Name}}](https://github.com/{{.GitHub}}){{if .Company}}, {{.Company}}{{end}}<br>{{end}}|* [Slack](https://kubernetes.slack.com/messages/{{.Contact.Slack}})<br>* [Mailing List]({{.Contact.MailingList}})|{{ $save := . }}{{range .Meetings}}* [{{.Day}}s at {{.UTC}} UTC ({{.Frequency}})]({{$save.MeetingURL}})<br>{{end}}
{{- end }}
8 changes: 7 additions & 1 deletion sig-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,14 @@ When the need arises, a [new SIG can be created](sig-creation-procedure.md)
|[Testing](sig-testing/README.md)|* [Aaron Crickenberger](https://github.com/spiffxp), Samsung SDS<br>* [Erick Feja](https://github.com/fejta), Google<br>* [Timothy St. Clair](https://github.com/timothysc), Heptio<br>|* [Slack](https://kubernetes.slack.com/messages/sig-testing)<br>* [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-testing)|* [Tuesdays at 20:00 UTC (weekly)](https://zoom.us/j/2419653117)<br>
|[UI](sig-ui/README.md)|* [Dan Romlein](https://github.com/romlein), Apprenda<br>* [Piotr Bryk](https://github.com/bryk), Google<br>|* [Slack](https://kubernetes.slack.com/messages/sig-ui)<br>* [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-ui)|* [Wednesdays at 14:00 UTC (weekly)](https://groups.google.com/forum/#!forum/kubernetes-sig-ui)<br>
|[Windows](sig-windows/README.md)|* [Michael Michael](https://github.com/michmike77), Apprenda<br>|* [Slack](https://kubernetes.slack.com/messages/sig-windows)<br>* [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-windows)|* [Tuesdays at 16:30 UTC (weekly)](https://zoom.us/my/sigwindows)<br>

### Master Working Group List

| Name | Organizers | Contact | Meetings |
|------|------------|---------|----------|
|[Resource Management](wg-resource-management/README.md)|* [Vishnu Kannan](https://github.com/vishh), Google<br>* [Derek Carr](https://github.com/derekwaynecarr), Red Hat<br>|* [Slack](https://kubernetes.slack.com/messages/wg-resource-mgmt)<br>* [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-wg-resource-management)|* [Tuesdays at 18:00 UTC (weekly (On demand))](https://zoom.us/j/4799874685)<br>
<!-- BEGIN CUSTOM CONTENT -->

<!-- END CUSTOM CONTENT -->

Last generated: Tue Jun 13 2017 16:34:38
Last generated: Tue Jun 13 2017 22:28:12
21 changes: 21 additions & 0 deletions sigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -622,3 +622,24 @@ sigs:
contact:
slack: sig-windows
mailing_list: https://groups.google.com/forum/#!forum/kubernetes-sig-windows
workinggroups:
- name: Resource Management
dir: wg-resource-management
mission_statement: >
Designing and shepherding cross-cutting features around compute resource isolation and utilization.
organizers:
- name: Vishnu Kannan
github: vishh
company: Google
- name: Derek Carr
github: derekwaynecarr
company: Red Hat
meetings:
- day: Tuesday
utc: "18:00"
frequency: weekly (On demand)
meeting_url: https://zoom.us/j/4799874685
meeting_archive_url: https://www.youtube.com/playlist?list=PL69nYSiGNLP1wJPj5DYWXjiArF-MJ5fNG
contact:
slack: wg-resource-mgmt
mailing_list: https://groups.google.com/forum/#!forum/kubernetes-wg-resource-management
49 changes: 27 additions & 22 deletions wg-resource-management/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# WG Resource Management
<!---
This is an autogenerated file!
Please do not edit this file directly, but instead make changes to the
sigs.yaml file in the project root.
To understand how this file is generated, see generator/README.md.
-->
# Resource Management Working Group

Designing and shepherding cross-cutting features around compute resource isolation and utilization.

## Meetings
* [Tuesdays at 18:00 UTC](https://zoom.us/j/4799874685) (weekly (On demand)). [Convert to your timezone](http://www.thetimezoneconverter.com/?t=18:00&tz=UTC).

Meeting notes and Agenda can be found [here](https://www.youtube.com/playlist?list=PL69nYSiGNLP1wJPj5DYWXjiArF-MJ5fNG).

## Organizers
* [Vishnu Kannan](https://github.com/vishh), Google
* [Derek Carr](https://github.com/derekwaynecarr), Red Hat

## Contact
* [Slack](https://kubernetes.slack.com/messages/wg-resource-mgmt)
* [Mailing list](https://groups.google.com/forum/#!forum/kubernetes-wg-resource-management)

<!-- BEGIN CUSTOM CONTENT -->
A working group that is a cross-SIG effort currently sponsored by sig-node and sig-scheduling with
a focus on improving Kubernetes Compute Resource Management.

Expand Down Expand Up @@ -30,25 +54,6 @@ Topics include, but are not limited to:
* Performance benchmarking
* APIs and extensions related to the features mentioned above
* ...
<!-- END CUSTOM CONTENT -->

## Contact us:

At this time, the group discussion primarily occurs on sig-node slack channel.

* via [Slack](https://kubernetes.slack.com/messages/sig-node/)
* via [Google Groups](https://groups.google.com/forum/#!forum/kubernetes-sig-node)

## Meetings:

### Resource Management Working Group

* The working group meets Tuesdays at 11:00AM PST (UTC-8)
* Zoom Link: https://zoom.us/j/4799874685
* [Agenda doc](https://docs.google.com/document/d/1j3vrG6BgE0hUDs2e-1ZUegKN4W4Adb1B6oJ6j-4kyPU/edit#)
* [Meeting Recordings](https://www.youtube.com/playlist?list=PL69nYSiGNLP1wJPj5DYWXjiArF-MJ5fNG)

## Team:

* Organizer: [Derek Carr] (https://github.com/derekwaynecarr) <[email protected]>, Red Hat
* Organizer: [Vish Kannan] (https://github.com/vishh) <[email protected]>, Google
* And too many regular participants to list here...
Last generated: Tue Jun 13 2017 22:28:12

0 comments on commit 0875cce

Please sign in to comment.