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
c88c9584
Commit
c88c9584
authored
Jun 09, 2016
by
Dawn Chen
Committed by
GitHub
Jun 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #27147 from kubernetes/revert-27027-gci-network
Revert "GCI: add support for network plugin"
parents
c9c4ada3
8207eddd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
44 deletions
+6
-44
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+4
-28
configure.sh
cluster/gce/gci/configure.sh
+0
-11
health-monitor.sh
cluster/gce/gci/health-monitor.sh
+2
-3
exceptions.txt
hack/verify-flags/exceptions.txt
+0
-2
No files found.
cluster/gce/gci/configure-helper.sh
View file @
c88c9584
...
@@ -249,17 +249,10 @@ EOF
...
@@ -249,17 +249,10 @@ EOF
}
}
function
assemble-docker-flags
{
function
assemble-docker-flags
{
echo
"Assemble docker command line flags"
local
docker_opts
=
"-p /var/run/docker.pid --bridge=cbr0 --iptables=false --ip-masq=false"
local
docker_opts
=
"-p /var/run/docker.pid --iptables=false --ip-masq=false"
if
[[
"
${
TEST_CLUSTER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
TEST_CLUSTER
:-}
"
==
"true"
]]
;
then
docker_opts+
=
" --debug"
docker_opts+
=
" --debug"
fi
fi
local
use_net_plugin
=
"true"
if
[[
"
${
NETWORK_PROVIDER
:-}
"
!=
"kubenet"
&&
"
${
NETWORK_PROVIDER
:-}
"
!=
"cni"
]]
;
then
use_net_plugin
=
"false"
docker_opts+
=
" --bridge=cbr0"
fi
# Decide whether to enable a docker registry mirror. This is taken from
# Decide whether to enable a docker registry mirror. This is taken from
# the "kube-env" metadata value.
# the "kube-env" metadata value.
if
[[
-n
"
${
DOCKER_REGISTRY_MIRROR_URL
:-}
"
]]
;
then
if
[[
-n
"
${
DOCKER_REGISTRY_MIRROR_URL
:-}
"
]]
;
then
...
@@ -268,12 +261,6 @@ function assemble-docker-flags {
...
@@ -268,12 +261,6 @@ function assemble-docker-flags {
fi
fi
echo
"DOCKER_OPTS=
\"
${
docker_opts
}
${
EXTRA_DOCKER_OPTS
:-}
\"
"
>
/etc/default/docker
echo
"DOCKER_OPTS=
\"
${
docker_opts
}
${
EXTRA_DOCKER_OPTS
:-}
\"
"
>
/etc/default/docker
# If using a network plugin, we need to explicitly restart docker daemon, because
# kubelet will not do it.
if
[[
"
${
use_net_plugin
}
"
==
"true"
]]
;
then
echo
"Docker command line is updated. Restart docker to pick it up"
systemctl restart docker
fi
}
}
# A helper function for loading a docker image. It keeps trying up to 5 times.
# A helper function for loading a docker image. It keeps trying up to 5 times.
...
@@ -334,15 +321,14 @@ function start-kubelet {
...
@@ -334,15 +321,14 @@ function start-kubelet {
if
[[
-n
"
${
KUBELET_PORT
:-}
"
]]
;
then
if
[[
-n
"
${
KUBELET_PORT
:-}
"
]]
;
then
flags+
=
" --port=
${
KUBELET_PORT
}
"
flags+
=
" --port=
${
KUBELET_PORT
}
"
fi
fi
local
reconcile_cidr
=
"true"
if
[[
"
${
KUBERNETES_MASTER
:-}
"
==
"true"
]]
;
then
if
[[
"
${
KUBERNETES_MASTER
:-}
"
==
"true"
]]
;
then
flags+
=
" --enable-debugging-handlers=false"
flags+
=
" --enable-debugging-handlers=false"
flags+
=
" --hairpin-mode=none"
flags+
=
" --hairpin-mode=none"
if
[[
!
-z
"
${
KUBELET_APISERVER
:-}
"
&&
!
-z
"
${
KUBELET_CERT
:-}
"
&&
!
-z
"
${
KUBELET_KEY
:-}
"
]]
;
then
if
[[
!
-z
"
${
KUBELET_APISERVER
:-}
"
&&
!
-z
"
${
KUBELET_CERT
:-}
"
&&
!
-z
"
${
KUBELET_KEY
:-}
"
]]
;
then
flags+
=
" --api-servers=https://
${
KUBELET_APISERVER
}
"
flags+
=
" --api-servers=https://
${
KUBELET_APISERVER
}
"
flags+
=
" --register-schedulable=false"
flags+
=
" --register-schedulable=false"
flags+
=
" --reconcile-cidr=false"
flags+
=
" --pod-cidr=10.123.45.0/30"
flags+
=
" --pod-cidr=10.123.45.0/30"
reconcile_cidr
=
"false"
else
else
flags+
=
" --pod-cidr=
${
MASTER_IP_RANGE
}
"
flags+
=
" --pod-cidr=
${
MASTER_IP_RANGE
}
"
fi
fi
...
@@ -355,15 +341,6 @@ function start-kubelet {
...
@@ -355,15 +341,6 @@ function start-kubelet {
flags+
=
" --hairpin-mode=
${
HAIRPIN_MODE
}
"
flags+
=
" --hairpin-mode=
${
HAIRPIN_MODE
}
"
fi
fi
fi
fi
# Network plugin
if
[[
-n
"
${
NETWORK_PROVIDER
:-}
"
]]
;
then
flags+
=
" --network-plugin-dir=/home/kubernetes/bin"
flags+
=
" --network-plugin=
${
NETWORK_PROVIDER
}
"
fi
flags+
=
" --reconcile-cidr=
${
reconcile_cidr
}
"
if
[[
-n
"
${
NON_MASQUERADE_CIDR
:-}
"
]]
;
then
flag+
=
" --non-masquerade-cidr=
${
NON_MASQUERADE_CIDR
}
"
fi
if
[[
"
${
ENABLE_MANIFEST_URL
:-}
"
==
"true"
]]
;
then
if
[[
"
${
ENABLE_MANIFEST_URL
:-}
"
==
"true"
]]
;
then
flags+
=
" --manifest-url=
${
MANIFEST_URL
}
"
flags+
=
" --manifest-url=
${
MANIFEST_URL
}
"
flags+
=
" --manifest-url-header=
${
MANIFEST_URL_HEADER
}
"
flags+
=
" --manifest-url-header=
${
MANIFEST_URL_HEADER
}
"
...
@@ -614,9 +591,7 @@ function start-kube-controller-manager {
...
@@ -614,9 +591,7 @@ function start-kube-controller-manager {
if
[[
-n
"
${
SERVICE_CLUSTER_IP_RANGE
:-}
"
]]
;
then
if
[[
-n
"
${
SERVICE_CLUSTER_IP_RANGE
:-}
"
]]
;
then
params+
=
" --service-cluster-ip-range=
${
SERVICE_CLUSTER_IP_RANGE
}
"
params+
=
" --service-cluster-ip-range=
${
SERVICE_CLUSTER_IP_RANGE
}
"
fi
fi
if
[[
"
${
NETWORK_PROVIDER
:-}
"
==
"kubenet"
]]
;
then
if
[[
"
${
ALLOCATE_NODE_CIDRS
:-}
"
==
"true"
]]
;
then
params+
=
" --allocate-node-cidrs=true"
elif
[[
-n
"
${
ALLOCATE_NODE_CIDRS
:-}
"
]]
;
then
params+
=
" --allocate-node-cidrs=
${
ALLOCATE_NODE_CIDRS
}
"
params+
=
" --allocate-node-cidrs=
${
ALLOCATE_NODE_CIDRS
}
"
fi
fi
if
[[
-n
"
${
TERMINATED_POD_GC_THRESHOLD
:-}
"
]]
;
then
if
[[
-n
"
${
TERMINATED_POD_GC_THRESHOLD
:-}
"
]]
;
then
...
@@ -823,6 +798,7 @@ function start-lb-controller {
...
@@ -823,6 +798,7 @@ function start-lb-controller {
fi
fi
}
}
function
reset-motd
{
function
reset-motd
{
# kubelet is installed both on the master and nodes, and the version is easy to parse (unlike kubectl)
# kubelet is installed both on the master and nodes, and the version is easy to parse (unlike kubectl)
local
-r
version
=
"
$(
/usr/bin/kubelet
--version
=
true
|
cut
-f2
-d
" "
)
"
local
-r
version
=
"
$(
/usr/bin/kubelet
--version
=
true
|
cut
-f2
-d
" "
)
"
...
...
cluster/gce/gci/configure.sh
View file @
c88c9584
...
@@ -146,17 +146,6 @@ function install-kube-binary-config {
...
@@ -146,17 +146,6 @@ function install-kube-binary-config {
else
else
rm
-f
"
${
kube_bin
}
/kubelet"
rm
-f
"
${
kube_bin
}
/kubelet"
fi
fi
if
[[
"
${
NETWORK_PROVIDER
:-}
"
==
"kubenet"
]]
||
\
[[
"
${
NETWORK_PROVIDER
:-}
"
==
"cni"
]]
;
then
#TODO(andyzheng0831): We should make the cni version number as a k8s env variable.
local
-r
cni_tar
=
"cni-26b61728ac940c3faf827927782326e921be17b0.tar.gz"
download-or-bust
""
"https://storage.googleapis.com/kubernetes-release/network-plugins/
${
cni_tar
}
"
tar
xzf
"
${
KUBE_HOME
}
/
${
cni_tar
}
"
-C
"
${
kube_bin
}
"
--overwrite
mv
"
${
kube_bin
}
/bin"
/
*
"
${
kube_bin
}
"
rmdir
"
${
kube_bin
}
/bin"
rm
-f
"
${
KUBE_HOME
}
/
${
cni_tar
}
"
fi
cp
"
${
KUBE_HOME
}
/kubernetes/LICENSES"
"
${
KUBE_HOME
}
"
cp
"
${
KUBE_HOME
}
/kubernetes/LICENSES"
"
${
KUBE_HOME
}
"
# Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.
# Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.
...
...
cluster/gce/gci/health-monitor.sh
View file @
c88c9584
...
@@ -38,9 +38,8 @@ function docker_monitoring {
...
@@ -38,9 +38,8 @@ function docker_monitoring {
}
}
function
kubelet_monitoring
{
function
kubelet_monitoring
{
echo
"Wait for 2 minutes for kubelet to be fuctional"
echo
"waiting a minute for startup"
# TODO(andyzheng0831): replace it with a more reliable method if possible.
sleep
60
sleep
120
local
-r
max_seconds
=
10
local
-r
max_seconds
=
10
while
[
1
]
;
do
while
[
1
]
;
do
if
!
curl
--insecure
-m
"
${
max_seconds
}
"
-f
-s
https://127.0.0.1:
${
KUBELET_PORT
:-
10250
}
/healthz
>
/dev/null
;
then
if
!
curl
--insecure
-m
"
${
max_seconds
}
"
-f
-s
https://127.0.0.1:
${
KUBELET_PORT
:-
10250
}
/healthz
>
/dev/null
;
then
...
...
hack/verify-flags/exceptions.txt
View file @
c88c9584
...
@@ -14,9 +14,7 @@ cluster/gce/configure-vm.sh: cloud_config: ${CLOUD_CONFIG}
...
@@ -14,9 +14,7 @@ cluster/gce/configure-vm.sh: cloud_config: ${CLOUD_CONFIG}
cluster/gce/configure-vm.sh: env-to-grains "runtime_config"
cluster/gce/configure-vm.sh: env-to-grains "runtime_config"
cluster/gce/configure-vm.sh: kubelet_api_servers: '${KUBELET_APISERVER}'
cluster/gce/configure-vm.sh: kubelet_api_servers: '${KUBELET_APISERVER}'
cluster/gce/coreos/helper.sh:# cloud_config yaml file should be passed
cluster/gce/coreos/helper.sh:# cloud_config yaml file should be passed
cluster/gce/gci/configure-helper.sh: reconcile_cidr="false"
cluster/gce/gci/configure-helper.sh: local api_servers="--master=https://${KUBERNETES_MASTER_NAME}"
cluster/gce/gci/configure-helper.sh: local api_servers="--master=https://${KUBERNETES_MASTER_NAME}"
cluster/gce/gci/configure-helper.sh: local reconcile_cidr="true"
cluster/gce/gci/configure-helper.sh: sed -i -e "s@{{pillar\['allow_privileged'\]}}@true@g" "${src_file}"
cluster/gce/gci/configure-helper.sh: sed -i -e "s@{{pillar\['allow_privileged'\]}}@true@g" "${src_file}"
cluster/gce/trusty/configure-helper.sh: sed -i -e "s@{{pillar\['allow_privileged'\]}}@true@g" "${src_file}"
cluster/gce/trusty/configure-helper.sh: sed -i -e "s@{{pillar\['allow_privileged'\]}}@true@g" "${src_file}"
cluster/gce/util.sh: local node_ip=$(gcloud compute instances describe --project "${PROJECT}" --zone "${ZONE}" \
cluster/gce/util.sh: local node_ip=$(gcloud compute instances describe --project "${PROJECT}" --zone "${ZONE}" \
...
...
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