Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
703cc164
Commit
703cc164
authored
Sep 15, 2016
by
Paul Morie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add missing kubelet godoc
parent
4c716023
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
kubelet.go
pkg/kubelet/kubelet.go
+13
-1
No files found.
pkg/kubelet/kubelet.go
View file @
703cc164
...
...
@@ -236,6 +236,8 @@ type KubeletDeps struct {
TLSOptions
*
server
.
TLSOptions
}
// makePodSourceConfig creates a config.PodConfig from the given
// KubeletConfiguration or returns an error.
func
makePodSourceConfig
(
kubeCfg
*
componentconfig
.
KubeletConfiguration
,
kubeDeps
*
KubeletDeps
,
nodeName
string
)
(
*
config
.
PodConfig
,
error
)
{
manifestURLHeader
:=
make
(
http
.
Header
)
if
kubeCfg
.
ManifestURLHeader
!=
""
{
...
...
@@ -1321,6 +1323,8 @@ func makePortMappings(container *api.Container) (ports []kubecontainer.PortMappi
return
}
// GeneratePodHostNameAndDomain creates a hostname and domain name for a pod,
// given that pod's spec and annotations or returns an error.
func
(
kl
*
Kubelet
)
GeneratePodHostNameAndDomain
(
pod
*
api
.
Pod
)
(
string
,
string
,
error
)
{
// TODO(vmarmol): Handle better.
// Cap hostname at 63 chars (specification is 64bytes which is 63 chars and the null terminating char).
...
...
@@ -1415,7 +1419,8 @@ func (kl *Kubelet) GenerateRunContainerOptions(pod *api.Pod, container *api.Cont
var
masterServices
=
sets
.
NewString
(
"kubernetes"
)
// getServiceEnvVarMap makes a map[string]string of env vars for services a pod in namespace ns should see
// getServiceEnvVarMap makes a map[string]string of env vars for services a
// pod in namespace ns should see.
func
(
kl
*
Kubelet
)
getServiceEnvVarMap
(
ns
string
)
(
map
[
string
]
string
,
error
)
{
var
(
serviceMap
=
make
(
map
[
string
]
api
.
Service
)
...
...
@@ -2789,6 +2794,8 @@ func (kl *Kubelet) convertStatusToAPIStatus(pod *api.Pod, podStatus *kubecontain
return
&
apiPodStatus
}
// convertToAPIContainerStatuses converts the given internal container
// statuses into API container statuses.
func
(
kl
*
Kubelet
)
convertToAPIContainerStatuses
(
pod
*
api
.
Pod
,
podStatus
*
kubecontainer
.
PodStatus
,
previousStatus
[]
api
.
ContainerStatus
,
containers
[]
api
.
Container
,
hasInitContainers
,
isInitContainer
bool
)
[]
api
.
ContainerStatus
{
convertContainerStatus
:=
func
(
cs
*
kubecontainer
.
ContainerStatus
)
*
api
.
ContainerStatus
{
cid
:=
cs
.
ID
.
String
()
...
...
@@ -3051,6 +3058,8 @@ func isSyncPodWorthy(event *pleg.PodLifecycleEvent) bool {
return
event
.
Type
!=
pleg
.
ContainerRemoved
}
// parseResourceList parses the given configuration map into an API
// ResourceList or returns an error.
func
parseResourceList
(
m
utilconfig
.
ConfigurationMap
)
(
api
.
ResourceList
,
error
)
{
rl
:=
make
(
api
.
ResourceList
)
for
k
,
v
:=
range
m
{
...
...
@@ -3072,6 +3081,9 @@ func parseResourceList(m utilconfig.ConfigurationMap) (api.ResourceList, error)
return
rl
,
nil
}
// ParseReservation parses the given kubelet- and system- reservations
// configuration maps into an internal Reservation instance or returns an
// error.
func
ParseReservation
(
kubeReserved
,
systemReserved
utilconfig
.
ConfigurationMap
)
(
*
kubetypes
.
Reservation
,
error
)
{
reservation
:=
new
(
kubetypes
.
Reservation
)
if
rl
,
err
:=
parseResourceList
(
kubeReserved
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment