diff --git a/pkg/api/doc.go b/pkg/api/doc.go new file mode 100644 index 0000000000..f77c9e72bd --- /dev/null +++ b/pkg/api/doc.go @@ -0,0 +1,19 @@ +/* +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. +*/ + +// Package api includes all types used to communicate between the various +// parts of the Kubernetes system. +package api diff --git a/pkg/api/types.go b/pkg/api/types.go index eeeb36d571..b02ac6d524 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package api includes all types used to communicate between the various -// parts of the Kubernetes system. package api // ContainerManifest corresponds to the Container Manifest format, documented at: diff --git a/pkg/apiserver/api_server.go b/pkg/apiserver/api_server.go index 54d6d582d3..ceea578605 100644 --- a/pkg/apiserver/api_server.go +++ b/pkg/apiserver/api_server.go @@ -13,8 +13,6 @@ 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. */ - -// Package apiserver contains the code that provides a RESTful api service package apiserver import ( diff --git a/pkg/apiserver/doc.go b/pkg/apiserver/doc.go new file mode 100644 index 0000000000..f38c1a8eeb --- /dev/null +++ b/pkg/apiserver/doc.go @@ -0,0 +1,18 @@ +/* +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. +*/ + +// Package apiserver contains the code that provides a RESTful api service +package apiserver diff --git a/pkg/client/client.go b/pkg/client/client.go index 316c15e939..b30d409490 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -14,11 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// A client for the Kubernetes cluster management API -// There are three fundamental objects -// Pod - A co-scheduled set of running containers -// ReplicationController - A manager for replicating Pods -// Service - A discoverable load balancer package client import ( diff --git a/pkg/client/container_info.go b/pkg/client/container_info.go index 37feff0152..d66663133f 100644 --- a/pkg/client/container_info.go +++ b/pkg/client/container_info.go @@ -13,6 +13,7 @@ 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. */ + package client import ( diff --git a/pkg/client/doc.go b/pkg/client/doc.go new file mode 100644 index 0000000000..7eee62baed --- /dev/null +++ b/pkg/client/doc.go @@ -0,0 +1,19 @@ +/* +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. +*/ + +// Package client contains the implementation of the client side communication with the +// Kubernetes master. +package client diff --git a/pkg/cloudcfg/cloudcfg.go b/pkg/cloudcfg/cloudcfg.go index 0f599db076..c1ec9f35cf 100644 --- a/pkg/cloudcfg/cloudcfg.go +++ b/pkg/cloudcfg/cloudcfg.go @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package cloudcfg is ... package cloudcfg import ( diff --git a/pkg/cloudcfg/doc.go b/pkg/cloudcfg/doc.go new file mode 100644 index 0000000000..0613f6c404 --- /dev/null +++ b/pkg/cloudcfg/doc.go @@ -0,0 +1,20 @@ +/* +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. +*/ + +// Package cloudcfg is a set of libraries that are used by the cloudcfg command line tool. +// They are separated out into a library to support unit testing. Most functionality should +// be included in this package, and the main cloudcfg should really just be an entry point. +package cloudcfg diff --git a/pkg/cloudcfg/resource_printer.go b/pkg/cloudcfg/resource_printer.go index 7f732edc70..fc111a034b 100644 --- a/pkg/cloudcfg/resource_printer.go +++ b/pkg/cloudcfg/resource_printer.go @@ -1,3 +1,19 @@ +/* +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. +*/ + package cloudcfg import ( diff --git a/pkg/kubelet/doc.go b/pkg/kubelet/doc.go new file mode 100644 index 0000000000..bffb95f094 --- /dev/null +++ b/pkg/kubelet/doc.go @@ -0,0 +1,19 @@ +/* +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. +*/ + +// Package kubelet is the package that contains the libraries that drive the Kublet binary. +// The kublet is responsible for node level pod management. It runs on each worker in the cluster. +package kubelet diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index dd9db44d0a..37e2e5e4e1 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package kubelet is ... package kubelet import ( diff --git a/pkg/kubelet/kubelet_server.go b/pkg/kubelet/kubelet_server.go index 73cd8171ea..9eaf5b8e44 100644 --- a/pkg/kubelet/kubelet_server.go +++ b/pkg/kubelet/kubelet_server.go @@ -72,7 +72,7 @@ func (s *KubeletServer) ServeHTTP(w http.ResponseWriter, req *http.Request) { return } id, found, err := s.Kubelet.GetContainerID(container) - if (!found) { + if !found { w.WriteHeader(http.StatusOK) fmt.Fprint(w, "{}") return diff --git a/pkg/proxy/config/config.go b/pkg/proxy/config/config.go index 9746ff60b7..b65065f0c6 100644 --- a/pkg/proxy/config/config.go +++ b/pkg/proxy/config/config.go @@ -14,14 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Config provides decoupling between various configuration sources (etcd, files,...) and -// the pieces that actually care about them (loadbalancer, proxy). Config takes 1 or more -// configuration sources and allows for incremental (add/remove) and full replace (set) -// changes from each of the sources, then creates a union of the configuration and provides -// a unified view for both service handlers as well as endpoint handlers. There is no attempt -// to resolve conflicts of any sort. Basic idea is that each configuration source gets a channel -// from the Config service and pushes updates to it via that channel. Config then keeps track of -// incremental & replace changes and distributes them to listeners as appropriate. package config import ( diff --git a/pkg/proxy/config/doc.go b/pkg/proxy/config/doc.go new file mode 100644 index 0000000000..e129df634a --- /dev/null +++ b/pkg/proxy/config/doc.go @@ -0,0 +1,25 @@ +/* +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. +*/ + +// Package config provides decoupling between various configuration sources (etcd, files,...) and +// the pieces that actually care about them (loadbalancer, proxy). Config takes 1 or more +// configuration sources and allows for incremental (add/remove) and full replace (set) +// changes from each of the sources, then creates a union of the configuration and provides +// a unified view for both service handlers as well as endpoint handlers. There is no attempt +// to resolve conflicts of any sort. Basic idea is that each configuration source gets a channel +// from the Config service and pushes updates to it via that channel. Config then keeps track of +// incremental & replace changes and distributes them to listeners as appropriate. +package config diff --git a/pkg/proxy/doc.go b/pkg/proxy/doc.go new file mode 100644 index 0000000000..e29caf01ef --- /dev/null +++ b/pkg/proxy/doc.go @@ -0,0 +1,18 @@ +/* +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. +*/ + +// Package proxy implements the layer-3 network proxy +package proxy diff --git a/pkg/proxy/proxier.go b/pkg/proxy/proxier.go index 81d040e9ab..7eed34a050 100644 --- a/pkg/proxy/proxier.go +++ b/pkg/proxy/proxier.go @@ -13,8 +13,6 @@ 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. */ -// Simple proxy for tcp connections between a localhost:lport and services that provide -// the actual implementations. package proxy @@ -28,6 +26,8 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api" ) +// Proxier is a simple proxy for tcp connections between a localhost:lport and services that provide +// the actual implementations. type Proxier struct { loadBalancer LoadBalancer serviceMap map[string]int diff --git a/pkg/registry/controller_registry.go b/pkg/registry/controller_registry.go index 38abbb51b7..627ee33898 100644 --- a/pkg/registry/controller_registry.go +++ b/pkg/registry/controller_registry.go @@ -13,6 +13,7 @@ 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. */ + package registry import ( diff --git a/pkg/registry/doc.go b/pkg/registry/doc.go new file mode 100644 index 0000000000..75c84b2bc3 --- /dev/null +++ b/pkg/registry/doc.go @@ -0,0 +1,18 @@ +/* +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. +*/ + +// Package registry implements the storage and system logic for the core of the api server. +package registry diff --git a/pkg/util/doc.go b/pkg/util/doc.go new file mode 100644 index 0000000000..316eedb31d --- /dev/null +++ b/pkg/util/doc.go @@ -0,0 +1,19 @@ +/* +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. +*/ + +// Package util implements various utility functions used in both testing and implementation +// of Kubernetes +package util