From b6a97349402c2efacc4d79ca6ef0f7d5c69f5d3d Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 01:16:07 -0700 Subject: [PATCH 01/14] podex: initial import --- podex/google/nodejs-hello/pod.json | 21 +++++++ podex/google/nodejs-hello/pod.yaml | 0 podex/podex.go | 89 ++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 podex/google/nodejs-hello/pod.json create mode 100644 podex/google/nodejs-hello/pod.yaml create mode 100644 podex/podex.go diff --git a/podex/google/nodejs-hello/pod.json b/podex/google/nodejs-hello/pod.json new file mode 100644 index 00000000000..2e61550fcc5 --- /dev/null +++ b/podex/google/nodejs-hello/pod.json @@ -0,0 +1,21 @@ +{ + "version": "v1beta1", + "id": "nodejs-hello-pod", + "volumes": null, + "containers": [ + { + "name": "nodejs-hello", + "image": "google/nodejs-hello", + "ports": [ + { + "name": "nodejs-hello-tcp-8080", + "containerPort": 8080, + "protocol": "TCP" + } + ] + } + ], + "restartPolicy": { + "always": {} + } +} \ No newline at end of file diff --git a/podex/google/nodejs-hello/pod.yaml b/podex/google/nodejs-hello/pod.yaml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/podex/podex.go b/podex/podex.go new file mode 100644 index 00000000000..26cbdc01257 --- /dev/null +++ b/podex/podex.go @@ -0,0 +1,89 @@ +// podex is a command line tool to generate kubernetes container manifest +// from docker image metadata. + +package main + +import ( + "encoding/json" + "flag" + "log" + "os" + "strconv" + "strings" + + "github.com/GoogleCloudPlatform/kubernetes/pkg/api" + dockerclient "github.com/fsouza/go-dockerclient" + "gopkg.in/yaml.v1" +) + +const usage = "usage: podex [-json|-yaml] " + +var generateJSON = flag.Bool("json", false, "generate json manifest") +var generateYAML = flag.Bool("yaml", false, "generate yaml manifest") + +func main() { + flag.Parse() + + if flag.NArg() < 1 { + log.Fatal(usage) + } + + imageName := flag.Arg(0) + if len(imageName) == 0 { + log.Fatal(usage) + } + + if !*generateJSON && !*generateYAML { + log.Fatal(usage) + } + + parts := strings.Split(imageName, "/") + baseName := parts[len(parts)-1] + + dockerHost := os.Getenv("DOCKER_HOST") + docker, err := dockerclient.NewClient(dockerHost) + if err != nil { + log.Fatalf("failed to connect to %q: %v", dockerHost, err) + } + + img, err := docker.InspectImage(imageName) + if err != nil { + log.Fatalf("failed to inspect image %q: %v", imageName, err) + } + manifest := api.ContainerManifest{ + Version: "v1beta1", + ID: baseName + "-pod", + Containers: []api.Container{{ + Name: baseName, + Image: imageName, + }}, + RestartPolicy: api.RestartPolicy{ + Always: &api.RestartPolicyAlways{}, + }, + } + for p, _ := range img.Config.ExposedPorts { + port, err := strconv.Atoi(p.Port()) + if err != nil { + log.Fatalf("failed to parse port %q: %v", parts[0], err) + } + manifest.Containers[0].Ports = append(manifest.Containers[0].Ports, api.Port{ + Name: strings.Join([]string{baseName, p.Proto(), p.Port()}, "-"), + ContainerPort: port, + Protocol: api.Protocol(strings.ToUpper(p.Proto())), + }) + } + if *generateJSON { + bs, err := json.MarshalIndent(manifest, "", " ") + if err != nil { + log.Fatalf("failed to render JSON container manifest: %v", err) + } + os.Stdout.Write(bs) + } + if *generateYAML { + bs, err := yaml.Marshal(manifest) + if err != nil { + log.Fatalf("failed to render YAML container manifest: %v", err) + } + os.Stdout.Write(bs) + } +} From 0d9119b4b6db7308b32b808d8bef0b6288383565 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 01:17:46 -0700 Subject: [PATCH 02/14] podex: add google/nodejs-hello yaml manifest --- podex/google/nodejs-hello/pod.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/podex/google/nodejs-hello/pod.yaml b/podex/google/nodejs-hello/pod.yaml index e69de29bb2d..4cd259914b1 100644 --- a/podex/google/nodejs-hello/pod.yaml +++ b/podex/google/nodejs-hello/pod.yaml @@ -0,0 +1,12 @@ +version: v1beta1 +id: nodejs-hello-pod +volumes: [] +containers: +- name: nodejs-hello + image: google/nodejs-hello + ports: + - name: nodejs-hello-tcp-8080 + containerPort: 8080 + protocol: TCP +restartPolicy: + always: {} From 159035fba2efb260e7be0bfe8755077c80509cce Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 01:22:25 -0700 Subject: [PATCH 03/14] podex: add missing license header and examples --- podex/podex.go | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/podex/podex.go b/podex/podex.go index 26cbdc01257..f88c80174f0 100644 --- a/podex/podex.go +++ b/podex/podex.go @@ -1,5 +1,26 @@ -// podex is a command line tool to generate kubernetes container manifest -// from docker image metadata. +/* +Copyright 2014 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// podex is a command line tool to generate a kubernetes container manifest placeholder from docker image metadata +// +// Example usage: +// +// $ docker pull google/nodejs-hello +// $ podex -yaml google/nodejs-hello > google/nodejs-hello/pod.yaml +// $ podex -json google/nodejs-hello > google/nodejs-hello/pod.json package main From 9fa593f054d013e525133ff0612d2288634268f6 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 01:29:54 -0700 Subject: [PATCH 04/14] podex: add manifests subdirectory --- podex/{ => manifests}/google/nodejs-hello/pod.json | 0 podex/{ => manifests}/google/nodejs-hello/pod.yaml | 0 podex/podex.go | 6 +++++- 3 files changed, 5 insertions(+), 1 deletion(-) rename podex/{ => manifests}/google/nodejs-hello/pod.json (100%) rename podex/{ => manifests}/google/nodejs-hello/pod.yaml (100%) diff --git a/podex/google/nodejs-hello/pod.json b/podex/manifests/google/nodejs-hello/pod.json similarity index 100% rename from podex/google/nodejs-hello/pod.json rename to podex/manifests/google/nodejs-hello/pod.json diff --git a/podex/google/nodejs-hello/pod.yaml b/podex/manifests/google/nodejs-hello/pod.yaml similarity index 100% rename from podex/google/nodejs-hello/pod.yaml rename to podex/manifests/google/nodejs-hello/pod.yaml diff --git a/podex/podex.go b/podex/podex.go index f88c80174f0..93be5119044 100644 --- a/podex/podex.go +++ b/podex/podex.go @@ -14,7 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -// podex is a command line tool to generate a kubernetes container manifest placeholder from docker image metadata +// podex is a command line tool to generate a kubernetes container +// manifest placeholder from docker image metadata. +// +// The manifest can then be edited by a human to match the deployment +// needs. // // Example usage: // From 68ce589d5f303b6b07e10e5015e65300c2a5479b Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 01:36:03 -0700 Subject: [PATCH 05/14] podex/nodejs-hello: remove generated restart policy --- podex/manifests/google/nodejs-hello/pod.json | 7 ++----- podex/manifests/google/nodejs-hello/pod.yaml | 2 -- podex/podex.go | 7 +++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/podex/manifests/google/nodejs-hello/pod.json b/podex/manifests/google/nodejs-hello/pod.json index 2e61550fcc5..770ea631a93 100644 --- a/podex/manifests/google/nodejs-hello/pod.json +++ b/podex/manifests/google/nodejs-hello/pod.json @@ -14,8 +14,5 @@ } ] } - ], - "restartPolicy": { - "always": {} - } -} \ No newline at end of file + ] +} diff --git a/podex/manifests/google/nodejs-hello/pod.yaml b/podex/manifests/google/nodejs-hello/pod.yaml index 4cd259914b1..53c676c51b5 100644 --- a/podex/manifests/google/nodejs-hello/pod.yaml +++ b/podex/manifests/google/nodejs-hello/pod.yaml @@ -8,5 +8,3 @@ containers: - name: nodejs-hello-tcp-8080 containerPort: 8080 protocol: TCP -restartPolicy: - always: {} diff --git a/podex/podex.go b/podex/podex.go index 93be5119044..78242e4da98 100644 --- a/podex/podex.go +++ b/podex/podex.go @@ -14,11 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -// podex is a command line tool to generate a kubernetes container -// manifest placeholder from docker image metadata. +// podex is a command line tool to bootstrap kubernetes container +// manifests from docker image metadata. // -// The manifest can then be edited by a human to match the deployment -// needs. +// Manifests can then be edited by a human to match deployment needs. // // Example usage: // From 1b2604f642b8d880ff3a20d4d0f1643ffb54ed68 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 01:42:54 -0700 Subject: [PATCH 06/14] podex/nodejs-hello: add hostPort --- podex/manifests/google/nodejs-hello/pod.json | 1 + podex/manifests/google/nodejs-hello/pod.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/podex/manifests/google/nodejs-hello/pod.json b/podex/manifests/google/nodejs-hello/pod.json index 770ea631a93..b47e27ca61a 100644 --- a/podex/manifests/google/nodejs-hello/pod.json +++ b/podex/manifests/google/nodejs-hello/pod.json @@ -9,6 +9,7 @@ "ports": [ { "name": "nodejs-hello-tcp-8080", + "hostPort": 80, "containerPort": 8080, "protocol": "TCP" } diff --git a/podex/manifests/google/nodejs-hello/pod.yaml b/podex/manifests/google/nodejs-hello/pod.yaml index 53c676c51b5..5cf4b097b5e 100644 --- a/podex/manifests/google/nodejs-hello/pod.yaml +++ b/podex/manifests/google/nodejs-hello/pod.yaml @@ -6,5 +6,6 @@ containers: image: google/nodejs-hello ports: - name: nodejs-hello-tcp-8080 + hostPort: 80 containerPort: 8080 protocol: TCP From e5b3e41ef99719ea5e1a37f5ba46dbe536c77d14 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 10:37:41 -0700 Subject: [PATCH 07/14] podex: move to contrib --- contrib/podex/CONTRIBUTING.md | 28 ++++++++++++++++++++ contrib/podex/MAINTAINTERS.md | 18 +++++++++++++ contrib/podex/README.md | 14 ++++++++++ {podex => contrib/podex}/podex.go | 0 podex/manifests/google/nodejs-hello/pod.json | 19 ------------- podex/manifests/google/nodejs-hello/pod.yaml | 11 -------- 6 files changed, 60 insertions(+), 30 deletions(-) create mode 100644 contrib/podex/CONTRIBUTING.md create mode 100644 contrib/podex/MAINTAINTERS.md create mode 100644 contrib/podex/README.md rename {podex => contrib/podex}/podex.go (100%) delete mode 100644 podex/manifests/google/nodejs-hello/pod.json delete mode 100644 podex/manifests/google/nodejs-hello/pod.yaml diff --git a/contrib/podex/CONTRIBUTING.md b/contrib/podex/CONTRIBUTING.md new file mode 100644 index 00000000000..90672b17f79 --- /dev/null +++ b/contrib/podex/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# How to become a contributor and submit your own code + +## Contributor License Agreements + +We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. + +Please fill out either the individual or corporate Contributor License Agreement (CLA). + + * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html). + * If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html). + +Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. + +## Contributing A Patch + +1. Submit an issue describing your proposed change to the repo in question. +1. The repo owner will respond to your issue promptly. +1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above). +1. Fork the desired repo, develop and test your code changes. +1. Submit a pull request. + +## Protocols for Collaborative Development + +Please read [this doc](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/collab.md) for information on how we're running development for the project. + +## Adding dependencies + +If your patch depends on new packages, add that package with [`godep`](https://github.com/tools/godep). Follow the [instructions to add a dependency](https://github.com/tools/godep#add-a-dependency). diff --git a/contrib/podex/MAINTAINTERS.md b/contrib/podex/MAINTAINTERS.md new file mode 100644 index 00000000000..5e736383e40 --- /dev/null +++ b/contrib/podex/MAINTAINTERS.md @@ -0,0 +1,18 @@ +# Maintainers + +People responsible for ports of Kubernetes to different environments. CC at least one maintainer on relevant issues and PRs. + +## OS Distributions + +* RedHat, Fedora: [Clayton Coleman](https://github.com/smarterclayton), [Derek Carr](https://github.com/derekwaynecarr), [Scott Collier](https://github.com/scollier) +* CoreOS: [Kelsey Hightower](https://github.com/kelseyhightower) + +## Providers / Environments + +* GCE: [Brendan Burns](https://github.com/brendandburns), [Joe Beda](https://github.com/jbeda), [Daniel Smith](https://github.com/lavalamp), [Tim Hockin](https://github.com/thockin) +* Azure: [Jeff Mendoza](https://github.com/jeffmendoza) +* Vsphere: [Pieter Noordhuis](https://github.com/pietern) +* Rackspace: [Ryan Richard](https://github.com/doublerr) +* Ovirt: [Federico Simoncelli](https://github.com/simon3z) +* Local: [Derek Carr](https://github.com/derekwaynecarr) +* Vagrant: [Derek Carr](https://github.com/derekwaynecarr) \ No newline at end of file diff --git a/contrib/podex/README.md b/contrib/podex/README.md new file mode 100644 index 00000000000..f87660ebf9e --- /dev/null +++ b/contrib/podex/README.md @@ -0,0 +1,14 @@ +# podex + +## Description + +`podex` is a command line tool to bootstrap a kubernetes container manifests from docker image metadata. + +Manifests can then be edited by a human to match deployment needs. + +## Usage +``` +$ docker pull google/nodejs-hello +$ podex -yaml google/nodejs-hello > pod.yaml +$ podex -json google/nodejs-hello > pod.json +``` diff --git a/podex/podex.go b/contrib/podex/podex.go similarity index 100% rename from podex/podex.go rename to contrib/podex/podex.go diff --git a/podex/manifests/google/nodejs-hello/pod.json b/podex/manifests/google/nodejs-hello/pod.json deleted file mode 100644 index b47e27ca61a..00000000000 --- a/podex/manifests/google/nodejs-hello/pod.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "v1beta1", - "id": "nodejs-hello-pod", - "volumes": null, - "containers": [ - { - "name": "nodejs-hello", - "image": "google/nodejs-hello", - "ports": [ - { - "name": "nodejs-hello-tcp-8080", - "hostPort": 80, - "containerPort": 8080, - "protocol": "TCP" - } - ] - } - ] -} diff --git a/podex/manifests/google/nodejs-hello/pod.yaml b/podex/manifests/google/nodejs-hello/pod.yaml deleted file mode 100644 index 5cf4b097b5e..00000000000 --- a/podex/manifests/google/nodejs-hello/pod.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: v1beta1 -id: nodejs-hello-pod -volumes: [] -containers: -- name: nodejs-hello - image: google/nodejs-hello - ports: - - name: nodejs-hello-tcp-8080 - hostPort: 80 - containerPort: 8080 - protocol: TCP From 4102e0d78d4a7d2f713bd36c82b012ebc58883c1 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 10:46:18 -0700 Subject: [PATCH 08/14] podex: fix build and reject conflicting options --- contrib/podex/podex.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/podex/podex.go b/contrib/podex/podex.go index 78242e4da98..a53d8658559 100644 --- a/contrib/podex/podex.go +++ b/contrib/podex/podex.go @@ -35,9 +35,9 @@ import ( "strconv" "strings" - "github.com/GoogleCloudPlatform/kubernetes/pkg/api" + "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1" dockerclient "github.com/fsouza/go-dockerclient" - "gopkg.in/yaml.v1" + "gopkg.in/v1/yaml" ) const usage = "usage: podex [-json|-yaml] " @@ -57,7 +57,7 @@ func main() { log.Fatal(usage) } - if !*generateJSON && !*generateYAML { + if (!*generateJSON && !*generateYAML) || (*generateJSON && *generateYAML) { log.Fatal(usage) } @@ -74,15 +74,15 @@ func main() { if err != nil { log.Fatalf("failed to inspect image %q: %v", imageName, err) } - manifest := api.ContainerManifest{ + manifest := v1beta1.ContainerManifest{ Version: "v1beta1", ID: baseName + "-pod", - Containers: []api.Container{{ + Containers: []v1beta1.Container{{ Name: baseName, Image: imageName, }}, - RestartPolicy: api.RestartPolicy{ - Always: &api.RestartPolicyAlways{}, + RestartPolicy: v1beta1.RestartPolicy{ + Always: &v1beta1.RestartPolicyAlways{}, }, } for p, _ := range img.Config.ExposedPorts { @@ -90,10 +90,10 @@ func main() { if err != nil { log.Fatalf("failed to parse port %q: %v", parts[0], err) } - manifest.Containers[0].Ports = append(manifest.Containers[0].Ports, api.Port{ + manifest.Containers[0].Ports = append(manifest.Containers[0].Ports, v1beta1.Port{ Name: strings.Join([]string{baseName, p.Proto(), p.Port()}, "-"), ContainerPort: port, - Protocol: api.Protocol(strings.ToUpper(p.Proto())), + Protocol: strings.ToUpper(p.Proto()), }) } if *generateJSON { From 02b12aff7ad1dff033e6e6bcb0bca67826f36a52 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 10:46:42 -0700 Subject: [PATCH 09/14] podex: fix filename typo --- contrib/podex/CONTRIBUTING.md | 28 ------------------- .../podex/{MAINTAINTERS.md => MAINTAINERS.md} | 0 2 files changed, 28 deletions(-) delete mode 100644 contrib/podex/CONTRIBUTING.md rename contrib/podex/{MAINTAINTERS.md => MAINTAINERS.md} (100%) diff --git a/contrib/podex/CONTRIBUTING.md b/contrib/podex/CONTRIBUTING.md deleted file mode 100644 index 90672b17f79..00000000000 --- a/contrib/podex/CONTRIBUTING.md +++ /dev/null @@ -1,28 +0,0 @@ -# How to become a contributor and submit your own code - -## Contributor License Agreements - -We'd love to accept your patches! Before we can take them, we have to jump a couple of legal hurdles. - -Please fill out either the individual or corporate Contributor License Agreement (CLA). - - * If you are an individual writing original source code and you're sure you own the intellectual property, then you'll need to sign an [individual CLA](http://code.google.com/legal/individual-cla-v1.0.html). - * If you work for a company that wants to allow you to contribute your work, then you'll need to sign a [corporate CLA](http://code.google.com/legal/corporate-cla-v1.0.html). - -Follow either of the two links above to access the appropriate CLA and instructions for how to sign and return it. Once we receive it, we'll be able to accept your pull requests. - -## Contributing A Patch - -1. Submit an issue describing your proposed change to the repo in question. -1. The repo owner will respond to your issue promptly. -1. If your proposed change is accepted, and you haven't already done so, sign a Contributor License Agreement (see details above). -1. Fork the desired repo, develop and test your code changes. -1. Submit a pull request. - -## Protocols for Collaborative Development - -Please read [this doc](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/collab.md) for information on how we're running development for the project. - -## Adding dependencies - -If your patch depends on new packages, add that package with [`godep`](https://github.com/tools/godep). Follow the [instructions to add a dependency](https://github.com/tools/godep#add-a-dependency). diff --git a/contrib/podex/MAINTAINTERS.md b/contrib/podex/MAINTAINERS.md similarity index 100% rename from contrib/podex/MAINTAINTERS.md rename to contrib/podex/MAINTAINERS.md From dd571c5a7695b0ee6287f3a732db0d69ebb98887 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 10:48:38 -0700 Subject: [PATCH 10/14] podex: add TODO --- contrib/podex/podex.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/podex/podex.go b/contrib/podex/podex.go index a53d8658559..d17354d2cef 100644 --- a/contrib/podex/podex.go +++ b/contrib/podex/podex.go @@ -70,10 +70,12 @@ func main() { log.Fatalf("failed to connect to %q: %v", dockerHost, err) } + // TODO(proppy): use the regitry API instead of the remote API to get image metadata. img, err := docker.InspectImage(imageName) if err != nil { log.Fatalf("failed to inspect image %q: %v", imageName, err) } + // TODO(proppy): add flag to handle multiple version manifest := v1beta1.ContainerManifest{ Version: "v1beta1", ID: baseName + "-pod", From 5aefc25dadc24431e4c66943a0653ed7ee76378e Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 10:56:53 -0700 Subject: [PATCH 11/14] podex: add comment about image name parsing --- contrib/podex/podex.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/podex/podex.go b/contrib/podex/podex.go index d17354d2cef..0324066ce14 100644 --- a/contrib/podex/podex.go +++ b/contrib/podex/podex.go @@ -61,6 +61,9 @@ func main() { log.Fatal(usage) } + // Parse docker image name + // IMAGE: [REGISTRYHOST/][USERNAME/]NAME[:TAG] + // NAME: [a-z0-9-_.] parts := strings.Split(imageName, "/") baseName := parts[len(parts)-1] From dbbe561a836da34dcb8654da743faf1f81e305c5 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 10:57:30 -0700 Subject: [PATCH 12/14] podex: gofmt -s --- contrib/podex/podex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/podex/podex.go b/contrib/podex/podex.go index 0324066ce14..dd10c0a17cb 100644 --- a/contrib/podex/podex.go +++ b/contrib/podex/podex.go @@ -90,7 +90,7 @@ func main() { Always: &v1beta1.RestartPolicyAlways{}, }, } - for p, _ := range img.Config.ExposedPorts { + for p := range img.Config.ExposedPorts { port, err := strconv.Atoi(p.Port()) if err != nil { log.Fatalf("failed to parse port %q: %v", parts[0], err) From ba9519f6e034074461e0edff7d63c24d6210b98c Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 17:25:57 -0700 Subject: [PATCH 13/14] podex: cleanup maintainers --- contrib/podex/MAINTAINERS.md | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/contrib/podex/MAINTAINERS.md b/contrib/podex/MAINTAINERS.md index 5e736383e40..534d26ce6e6 100644 --- a/contrib/podex/MAINTAINERS.md +++ b/contrib/podex/MAINTAINERS.md @@ -1,18 +1,3 @@ # Maintainers -People responsible for ports of Kubernetes to different environments. CC at least one maintainer on relevant issues and PRs. - -## OS Distributions - -* RedHat, Fedora: [Clayton Coleman](https://github.com/smarterclayton), [Derek Carr](https://github.com/derekwaynecarr), [Scott Collier](https://github.com/scollier) -* CoreOS: [Kelsey Hightower](https://github.com/kelseyhightower) - -## Providers / Environments - -* GCE: [Brendan Burns](https://github.com/brendandburns), [Joe Beda](https://github.com/jbeda), [Daniel Smith](https://github.com/lavalamp), [Tim Hockin](https://github.com/thockin) -* Azure: [Jeff Mendoza](https://github.com/jeffmendoza) -* Vsphere: [Pieter Noordhuis](https://github.com/pietern) -* Rackspace: [Ryan Richard](https://github.com/doublerr) -* Ovirt: [Federico Simoncelli](https://github.com/simon3z) -* Local: [Derek Carr](https://github.com/derekwaynecarr) -* Vagrant: [Derek Carr](https://github.com/derekwaynecarr) \ No newline at end of file +Johan Euphrosine From c0a294921927b277e300409334cb8861cb32de1a Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 2 Oct 2014 17:26:34 -0700 Subject: [PATCH 14/14] podex: fix typo --- contrib/podex/podex.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/podex/podex.go b/contrib/podex/podex.go index dd10c0a17cb..3de8aab5061 100644 --- a/contrib/podex/podex.go +++ b/contrib/podex/podex.go @@ -15,7 +15,7 @@ limitations under the License. */ // podex is a command line tool to bootstrap kubernetes container -// manifests from docker image metadata. +// manifest from docker image metadata. // // Manifests can then be edited by a human to match deployment needs. //