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
9e6815e7
Unverified
Commit
9e6815e7
authored
Nov 01, 2016
by
Paulo Pires
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed kubelet build.
parent
66a1ef25
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
179 additions
and
19 deletions
+179
-19
cadvisor_unsupported.go
pkg/kubelet/cadvisor/cadvisor_unsupported.go
+1
-1
cadvisor_windows.go
pkg/kubelet/cadvisor/cadvisor_windows.go
+17
-16
container_manager_unsupported.go
pkg/kubelet/cm/container_manager_unsupported.go
+64
-0
container_manager_unsupported_test.go
pkg/kubelet/cm/container_manager_unsupported_test.go
+1
-1
container_manager_windows.go
pkg/kubelet/cm/container_manager_windows.go
+17
-1
BUILD
pkg/kubelet/dockertools/BUILD
+1
-0
docker_manager_linux.go
pkg/kubelet/dockertools/docker_manager_linux.go
+18
-0
docker_manager_unsupported.go
pkg/kubelet/dockertools/docker_manager_unsupported.go
+42
-0
docker_manager_windows.go
pkg/kubelet/dockertools/docker_manager_windows.go
+18
-0
No files found.
pkg/kubelet/cadvisor/cadvisor_unsupported.go
View file @
9e6815e7
// +build !
cgo !linux
// +build !
linux,!windows
/*
Copyright 2015 The Kubernetes Authors.
...
...
pkg/kubelet/cadvisor/cadvisor_
stub
.go
→
pkg/kubelet/cadvisor/cadvisor_
windows
.go
View file @
9e6815e7
// +build
darwin
windows
// +build windows
/*
Copyright 2015 The Kubernetes Authors
All rights reserved
.
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
...
...
@@ -24,51 +24,52 @@ import (
cadvisorapiv2
"github.com/google/cadvisor/info/v2"
)
type
cadvisor
Stub
struct
{
type
cadvisor
Client
struct
{
}
var
_
Interface
=
new
(
cadvisor
Stub
)
var
_
Interface
=
new
(
cadvisor
Client
)
func
New
(
port
uint
,
runtime
string
)
(
Interface
,
error
)
{
return
&
cadvisorStub
{},
nil
// New creates a cAdvisor and exports its API on the specified port if port > 0.
func
New
(
port
uint
,
runtime
string
,
rootPath
string
)
(
Interface
,
error
)
{
return
&
cadvisorClient
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
Start
()
error
{
func
(
cu
*
cadvisor
Client
)
Start
()
error
{
return
nil
}
func
(
cu
*
cadvisor
Stub
)
DockerContainer
(
name
string
,
req
*
cadvisorapi
.
ContainerInfoRequest
)
(
cadvisorapi
.
ContainerInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
DockerContainer
(
name
string
,
req
*
cadvisorapi
.
ContainerInfoRequest
)
(
cadvisorapi
.
ContainerInfo
,
error
)
{
return
cadvisorapi
.
ContainerInfo
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
ContainerInfo
(
name
string
,
req
*
cadvisorapi
.
ContainerInfoRequest
)
(
*
cadvisorapi
.
ContainerInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
ContainerInfo
(
name
string
,
req
*
cadvisorapi
.
ContainerInfoRequest
)
(
*
cadvisorapi
.
ContainerInfo
,
error
)
{
return
&
cadvisorapi
.
ContainerInfo
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
ContainerInfoV2
(
name
string
,
options
cadvisorapiv2
.
RequestOptions
)
(
map
[
string
]
cadvisorapiv2
.
ContainerInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
ContainerInfoV2
(
name
string
,
options
cadvisorapiv2
.
RequestOptions
)
(
map
[
string
]
cadvisorapiv2
.
ContainerInfo
,
error
)
{
return
make
(
map
[
string
]
cadvisorapiv2
.
ContainerInfo
),
nil
}
func
(
cu
*
cadvisor
Stub
)
SubcontainerInfo
(
name
string
,
req
*
cadvisorapi
.
ContainerInfoRequest
)
(
map
[
string
]
*
cadvisorapi
.
ContainerInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
SubcontainerInfo
(
name
string
,
req
*
cadvisorapi
.
ContainerInfoRequest
)
(
map
[
string
]
*
cadvisorapi
.
ContainerInfo
,
error
)
{
return
nil
,
nil
}
func
(
cu
*
cadvisor
Stub
)
MachineInfo
()
(
*
cadvisorapi
.
MachineInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
MachineInfo
()
(
*
cadvisorapi
.
MachineInfo
,
error
)
{
return
&
cadvisorapi
.
MachineInfo
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
VersionInfo
()
(
*
cadvisorapi
.
VersionInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
VersionInfo
()
(
*
cadvisorapi
.
VersionInfo
,
error
)
{
return
&
cadvisorapi
.
VersionInfo
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
ImagesFsInfo
()
(
cadvisorapiv2
.
FsInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
ImagesFsInfo
()
(
cadvisorapiv2
.
FsInfo
,
error
)
{
return
cadvisorapiv2
.
FsInfo
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
RootFsInfo
()
(
cadvisorapiv2
.
FsInfo
,
error
)
{
func
(
cu
*
cadvisor
Client
)
RootFsInfo
()
(
cadvisorapiv2
.
FsInfo
,
error
)
{
return
cadvisorapiv2
.
FsInfo
{},
nil
}
func
(
cu
*
cadvisor
Stub
)
WatchEvents
(
request
*
events
.
Request
)
(
*
events
.
EventChannel
,
error
)
{
func
(
cu
*
cadvisor
Client
)
WatchEvents
(
request
*
events
.
Request
)
(
*
events
.
EventChannel
,
error
)
{
return
&
events
.
EventChannel
{},
nil
}
pkg/kubelet/cm/container_manager_unsupported.go
0 → 100644
View file @
9e6815e7
// +build !linux,!windows
/*
Copyright 2015 The Kubernetes Authors.
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
cm
import
(
"fmt"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/kubelet/cadvisor"
"k8s.io/kubernetes/pkg/util/mount"
)
type
unsupportedContainerManager
struct
{
}
var
_
ContainerManager
=
&
unsupportedContainerManager
{}
func
(
unsupportedContainerManager
)
Start
(
_
*
api
.
Node
)
error
{
return
fmt
.
Errorf
(
"Container Manager is unsupported in this build"
)
}
func
(
unsupportedContainerManager
)
SystemCgroupsLimit
()
api
.
ResourceList
{
return
api
.
ResourceList
{}
}
func
(
unsupportedContainerManager
)
GetNodeConfig
()
NodeConfig
{
return
NodeConfig
{}
}
func
(
unsupportedContainerManager
)
GetMountedSubsystems
()
*
CgroupSubsystems
{
return
&
CgroupSubsystems
{}
}
func
(
unsupportedContainerManager
)
GetQOSContainersInfo
()
QOSContainersInfo
{
return
QOSContainersInfo
{}
}
func
(
cm
*
unsupportedContainerManager
)
Status
()
Status
{
return
Status
{}
}
func
(
cm
*
unsupportedContainerManager
)
NewPodContainerManager
()
PodContainerManager
{
return
&
unsupportedPodContainerManager
{}
}
func
NewContainerManager
(
_
mount
.
Interface
,
_
cadvisor
.
Interface
,
_
NodeConfig
)
(
ContainerManager
,
error
)
{
return
&
unsupportedContainerManager
{},
nil
}
pkg/kubelet/cm/container_manager_unsupported_test.go
View file @
9e6815e7
// +build !linux
// +build !linux
,!windows
/*
Copyright 2015 The Kubernetes Authors.
...
...
pkg/kubelet/cm/container_manager_windows.go
View file @
9e6815e7
// +build windows
/*
Copyright 2015 The Kubernetes Authors.
...
...
@@ -17,10 +19,24 @@ limitations under the License.
package
cm
import
(
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/kubelet/cadvisor"
"k8s.io/kubernetes/pkg/util/mount"
)
type
containerManagerImpl
struct
{
containerManagerStub
}
var
_
ContainerManager
=
&
containerManagerImpl
{}
func
(
cm
*
containerManagerImpl
)
Start
(
_
*
api
.
Node
)
error
{
glog
.
V
(
2
)
.
Infof
(
"Starting Windows stub container manager"
)
return
nil
}
func
NewContainerManager
(
mountUtil
mount
.
Interface
,
cadvisorInterface
cadvisor
.
Interface
,
nodeConfig
NodeConfig
)
(
ContainerManager
,
error
)
{
return
NewStubContainerManager
()
,
nil
return
&
containerManagerImpl
{}
,
nil
}
pkg/kubelet/dockertools/BUILD
View file @
9e6815e7
...
...
@@ -17,6 +17,7 @@ go_library(
"convert.go",
"docker.go",
"docker_manager.go",
"docker_manager_linux.go",
"exec.go",
"fake_docker_client.go",
"fake_manager.go",
...
...
pkg/kubelet/dockertools/docker_manager_linux.go
View file @
9e6815e7
// +build linux
/*
Copyright 2015 The Kubernetes Authors.
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
dockertools
import
(
...
...
pkg/kubelet/dockertools/docker_manager_unsupported.go
0 → 100644
View file @
9e6815e7
// +build !linux,!windows
/*
Copyright 2015 The Kubernetes Authors.
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
dockertools
import
(
"k8s.io/kubernetes/pkg/api"
dockertypes
"github.com/docker/engine-api/types"
)
func
getContainerIP
(
container
*
dockertypes
.
ContainerJSON
)
string
{
return
""
}
func
getNetworkingMode
()
string
{
return
""
}
func
containerProvidesPodIP
(
name
*
KubeletContainerName
)
bool
{
return
false
}
// Returns nil as both Seccomp and AppArmor security options are not valid on Windows
func
(
dm
*
DockerManager
)
getSecurityOpts
(
pod
*
api
.
Pod
,
ctrName
string
)
([]
dockerOpt
,
error
)
{
return
nil
,
nil
}
pkg/kubelet/dockertools/docker_manager_windows.go
View file @
9e6815e7
// +build windows
/*
Copyright 2015 The Kubernetes Authors.
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
dockertools
import
(
...
...
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