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
bd357e97
Commit
bd357e97
authored
Sep 16, 2016
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various fixes to enable kubelet to switch to kuberuntime/dockershim
parent
1c3c1ac5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
kuberuntime_image.go
pkg/kubelet/kuberuntime/kuberuntime_image.go
+3
-4
runtime.go
pkg/kubelet/sysctl/runtime.go
+5
-1
No files found.
pkg/kubelet/kuberuntime/kuberuntime_image.go
View file @
bd357e97
...
@@ -17,8 +17,6 @@ limitations under the License.
...
@@ -17,8 +17,6 @@ limitations under the License.
package
kuberuntime
package
kuberuntime
import
(
import
(
"fmt"
"github.com/golang/glog"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/credentialprovider"
"k8s.io/kubernetes/pkg/credentialprovider"
...
@@ -130,7 +128,8 @@ func (m *kubeGenericRuntimeManager) RemoveImage(image kubecontainer.ImageSpec) e
...
@@ -130,7 +128,8 @@ func (m *kubeGenericRuntimeManager) RemoveImage(image kubecontainer.ImageSpec) e
}
}
// ImageStats returns the statistics of the image.
// ImageStats returns the statistics of the image.
// TODO: Implement this function.
func
(
m
*
kubeGenericRuntimeManager
)
ImageStats
()
(
*
kubecontainer
.
ImageStats
,
error
)
{
func
(
m
*
kubeGenericRuntimeManager
)
ImageStats
()
(
*
kubecontainer
.
ImageStats
,
error
)
{
// TODO: support image stats in new runtime interface
var
usageBytes
uint64
=
0
return
nil
,
fmt
.
Errorf
(
"not implemented"
)
return
&
kubecontainer
.
ImageStats
{
TotalStorageBytes
:
usageBytes
},
nil
}
}
pkg/kubelet/sysctl/runtime.go
View file @
bd357e97
...
@@ -27,6 +27,10 @@ import (
...
@@ -27,6 +27,10 @@ import (
const
(
const
(
UnsupportedReason
=
"SysctlUnsupported"
UnsupportedReason
=
"SysctlUnsupported"
// CRI uses semver-compatible API version, while docker does not
// (e.g., 1.24). Append the version with a ".0" so that it works
// with both the CRI and dockertools comparison logic.
dockerMinimumAPIVersion
=
"1.24.0"
)
)
type
runtimeAdmitHandler
struct
{
type
runtimeAdmitHandler
struct
{
...
@@ -45,7 +49,7 @@ func NewRuntimeAdmitHandler(runtime container.Runtime) (*runtimeAdmitHandler, er
...
@@ -45,7 +49,7 @@ func NewRuntimeAdmitHandler(runtime container.Runtime) (*runtimeAdmitHandler, er
}
}
// only Docker >= 1.12 supports sysctls
// only Docker >= 1.12 supports sysctls
c
,
err
:=
v
.
Compare
(
docker
tools
.
DockerV112
APIVersion
)
c
,
err
:=
v
.
Compare
(
docker
Minimum
APIVersion
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to compare Docker version for sysctl support: %v"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to compare Docker version for sysctl support: %v"
,
err
)
}
}
...
...
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