Commit 480bcb97 authored by Minhan Xia's avatar Minhan Xia

add UpdateRuntimeConfig interface

parent ead65fc2
......@@ -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
......
......@@ -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"
......
......@@ -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
......
......@@ -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
}
......@@ -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
......@@ -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
}
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment