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
480bcb97
Commit
480bcb97
authored
Oct 07, 2016
by
Minhan Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add UpdateRuntimeConfig interface
parent
ead65fc2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
2 deletions
+39
-2
update-generated-protobuf-dockerized.sh
hack/update-generated-protobuf-dockerized.sh
+1
-1
exceptions.txt
hack/verify-flags/exceptions.txt
+4
-1
services.go
pkg/kubelet/api/services.go
+3
-0
fake_runtime_service.go
pkg/kubelet/api/testing/fake_runtime_service.go
+4
-0
api.pb.go
pkg/kubelet/api/v1alpha1/runtime/api.pb.go
+0
-0
api.proto
pkg/kubelet/api/v1alpha1/runtime/api.proto
+19
-0
docker_service.go
pkg/kubelet/dockershim/docker_service.go
+4
-0
remote_runtime.go
pkg/kubelet/remote/remote_runtime.go
+4
-0
No files found.
hack/update-generated-protobuf-dockerized.sh
View file @
480bcb97
...
...
@@ -29,7 +29,7 @@ BINS=(
)
make
-C
"
${
KUBE_ROOT
}
"
WHAT
=
"
${
BINS
[*]
}
"
if
[[
-z
"
$(
which protoc
)
"
||
"
$(
protoc
--version
)
"
!=
"libprotoc 3.
0.
"
*
]]
;
then
if
[[
-z
"
$(
which protoc
)
"
||
"
$(
protoc
--version
)
"
!=
"libprotoc 3."
*
]]
;
then
echo
"Generating protobuf requires protoc 3.0.0-beta1 or newer. Please download and"
echo
"install the platform appropriate Protobuf package for your OS: "
echo
...
...
hack/verify-flags/exceptions.txt
View file @
480bcb97
...
...
@@ -70,7 +70,6 @@ cluster/vagrant/provision-utils.sh: node_ip: '$(echo "$MASTER_IP" | sed -e "s/'
cluster/vagrant/provision-utils.sh: runtime_config: '$(echo "$RUNTIME_CONFIG" | sed -e "s/'/''/g")'
cluster/vsphere/templates/salt-master.sh: cloud_config: $CLOUD_CONFIG
cluster/vsphere/templates/salt-minion.sh: cloud_config: $CLOUD_CONFIG
cluster/vsphere/templates/salt-minion.sh: hostname_override: $(ip route get 1.1.1.1 | awk '{print $7}')
examples/cluster-dns/images/frontend/client.py: service_address = socket.gethostbyname(hostname)
examples/storage/cassandra/image/files/run.sh: cluster_name \
examples/storage/vitess/env.sh: node_ip=$(get_node_ip)
...
...
@@ -101,8 +100,12 @@ hack/test-update-storage-objects.sh: source_file=${test_data[0]}
hack/test-update-storage-objects.sh:# source_file,resource,namespace,name,old_version,new_version
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: ContainerPort *int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort" json:"container_port,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: OomScoreAdj *int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj" json:"oom_score_adj,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: PodCidr *string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr" json:"pod_cidr,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.pb.go: RuntimeConfig *RuntimeConfig `protobuf:"bytes,1,opt,name=runtime_config,json=runtimeConfig" json:"runtime_config,omitempty"`
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional RuntimeConfig runtime_config = 1;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int32 container_port = 2;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional int64 oom_score_adj = 5;
pkg/kubelet/api/v1alpha1/runtime/api.proto: optional string pod_cidr = 1;
pkg/kubelet/cm/container_manager_linux.go: glog.V(3).Infof("Failed to apply oom_score_adj %d for pid %d: %v", oomScoreAdj, pid, err)
pkg/kubelet/cm/container_manager_linux.go: glog.V(5).Infof("attempting to apply oom_score_adj of %d to pid %d", oomScoreAdj, pid)
pkg/kubelet/network/hairpin/hairpin.go: hairpinModeRelativePath = "hairpin_mode"
...
...
pkg/kubelet/api/services.go
View file @
480bcb97
...
...
@@ -71,6 +71,9 @@ type RuntimeService interface {
RuntimeVersioner
ContainerManager
PodSandboxManager
// UpdateRuntimeConfig updates runtime configuration if specified
UpdateRuntimeConfig
(
runtimeConfig
*
runtimeApi
.
RuntimeConfig
)
error
}
// ImageManagerService interface should be implemented by a container image
...
...
pkg/kubelet/api/testing/fake_runtime_service.go
View file @
480bcb97
...
...
@@ -364,3 +364,7 @@ func (r *FakeRuntimeService) Exec(containerID string, cmd []string, tty bool, st
r
.
Called
=
append
(
r
.
Called
,
"Exec"
)
return
nil
}
func
(
r
*
FakeRuntimeService
)
UpdateRuntimeConfig
(
runtimeCOnfig
*
runtimeApi
.
RuntimeConfig
)
error
{
return
nil
}
pkg/kubelet/api/v1alpha1/runtime/api.pb.go
View file @
480bcb97
This diff is collapsed.
Click to expand it.
pkg/kubelet/api/v1alpha1/runtime/api.proto
View file @
480bcb97
...
...
@@ -40,6 +40,9 @@ service RuntimeService {
// Exec executes the command in the container.
rpc
Exec
(
stream
ExecRequest
)
returns
(
stream
ExecResponse
)
{}
// UpdateRuntimeConfig updates the runtime configuration based on request
rpc
UpdateRuntimeConfig
(
UpdateRuntimeConfigRequest
)
returns
(
UpdateRuntimeConfigResponse
)
{}
}
// Image service defines the public APIs for managing images
...
...
@@ -676,3 +679,18 @@ message RemoveImageRequest {
}
message
RemoveImageResponse
{}
message
NetworkConfig
{
// The CIDR to use for pod IP addresses
optional
string
pod_cidr
=
1
;
}
message
RuntimeConfig
{
optional
NetworkConfig
network_config
=
1
;
}
message
UpdateRuntimeConfigRequest
{
optional
RuntimeConfig
runtime_config
=
1
;
}
message
UpdateRuntimeConfigResponse
{}
\ No newline at end of file
pkg/kubelet/dockershim/docker_service.go
View file @
480bcb97
...
...
@@ -102,3 +102,7 @@ func (ds *dockerService) Version(_ string) (*runtimeApi.VersionResponse, error)
RuntimeApiVersion
:
&
apiVersion
,
},
nil
}
func
(
ds
*
dockerService
)
UpdateRuntimeConfig
(
runtimeConfig
*
runtimeApi
.
RuntimeConfig
)
error
{
return
nil
}
pkg/kubelet/remote/remote_runtime.go
View file @
480bcb97
...
...
@@ -252,3 +252,7 @@ func (r *RemoteRuntimeService) ContainerStatus(containerID string) (*runtimeApi.
func
(
r
*
RemoteRuntimeService
)
Exec
(
containerID
string
,
cmd
[]
string
,
tty
bool
,
stdin
io
.
Reader
,
stdout
,
stderr
io
.
WriteCloser
)
error
{
return
fmt
.
Errorf
(
"Not implemented"
)
}
func
(
r
*
RemoteRuntimeService
)
UpdateRuntimeConfig
(
runtimeConfig
*
runtimeApi
.
RuntimeConfig
)
error
{
return
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