mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Move service enviroment vars code.
GetServiceEnvironmentVariables (originally in pkg/registry/service/rest.go) is split into two parts: one that lists services, and one that turns a ServiceList into environment vars. This will allow a subsequent PR to add a call to the latter function with an existing ServiceList. The former part is moved into pkg/registry/pod/bound_pod_factory.go. The latter part is put in a new package, pkg/kubelet/envvars/envvars.go. The new package is under kubelet because the container enviroment is more associated with kubelet than with registry. Test code moved too.
This commit is contained in:
19
pkg/kubelet/envvars/doc.go
Normal file
19
pkg/kubelet/envvars/doc.go
Normal file
@@ -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 envvars is the package that build the environment variables that kubernetes provides
|
||||
// to the containers run by it.
|
||||
package envvars
|
||||
Reference in New Issue
Block a user