mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
commit
e200feca15
@ -134,6 +134,15 @@ for k,v in yaml.load(sys.stdin).iteritems():
|
|||||||
''' < "${kube_env_yaml}")
|
''' < "${kube_env_yaml}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Wait for the default service account
|
||||||
|
token_found=""
|
||||||
|
while [ -z "${token_found}" ]; do
|
||||||
|
sleep .5
|
||||||
|
token_found=$(${KUBECTL} get serviceaccount default -o template -t "{{with index .secrets 0}}{{.name}}{{end}}" || true)
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "== default service account has token ${token_found} =="
|
||||||
|
|
||||||
# Generate secrets for "internal service accounts".
|
# Generate secrets for "internal service accounts".
|
||||||
# TODO(etune): move to a completely yaml/object based
|
# TODO(etune): move to a completely yaml/object based
|
||||||
# workflow so that service accounts can be created
|
# workflow so that service accounts can be created
|
||||||
@ -171,6 +180,3 @@ while true; do
|
|||||||
`dirname $0`/kube-addon-update.sh /etc/kubernetes/addons
|
`dirname $0`/kube-addon-update.sh /etc/kubernetes/addons
|
||||||
sleep $ADDON_CHECK_INTERVAL_SEC
|
sleep $ADDON_CHECK_INTERVAL_SEC
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Kubernetes Kubelet Server
|
Description=Kubernetes Kubelet Server
|
||||||
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
||||||
After=docker.service
|
|
||||||
Requires=docker.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/etc/sysconfig/kubelet
|
EnvironmentFile=/etc/sysconfig/kubelet
|
||||||
|
@ -64,6 +64,13 @@ func isStatusEqual(oldStatus, status *api.PodStatus) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *statusManager) Start() {
|
func (s *statusManager) Start() {
|
||||||
|
// Don't start the status manager if we don't have a client. This will happen
|
||||||
|
// on the master, where the kubelet is responsible for bootstrapping the pods
|
||||||
|
// of the master components.
|
||||||
|
if s.kubeClient == nil {
|
||||||
|
glog.Infof("Kubernetes client is nil, not starting status manager.")
|
||||||
|
return
|
||||||
|
}
|
||||||
// syncBatch blocks when no updates are available, we can run it in a tight loop.
|
// syncBatch blocks when no updates are available, we can run it in a tight loop.
|
||||||
glog.Info("Starting to sync pod status with apiserver")
|
glog.Info("Starting to sync pod status with apiserver")
|
||||||
go util.Forever(func() {
|
go util.Forever(func() {
|
||||||
@ -142,10 +149,6 @@ func (s *statusManager) RemoveOrphanedStatuses(podFullNames map[string]bool) {
|
|||||||
|
|
||||||
// syncBatch syncs pods statuses with the apiserver.
|
// syncBatch syncs pods statuses with the apiserver.
|
||||||
func (s *statusManager) syncBatch() error {
|
func (s *statusManager) syncBatch() error {
|
||||||
if s.kubeClient == nil {
|
|
||||||
glog.V(4).Infof("Kubernetes client is nil, skipping pod status updates")
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
syncRequest := <-s.podStatusChannel
|
syncRequest := <-s.podStatusChannel
|
||||||
pod := syncRequest.pod
|
pod := syncRequest.pod
|
||||||
podFullName := kubecontainer.GetPodFullName(pod)
|
podFullName := kubecontainer.GetPodFullName(pod)
|
||||||
|
@ -36,8 +36,8 @@ package version
|
|||||||
var (
|
var (
|
||||||
// TODO: Deprecate gitMajor and gitMinor, use only gitVersion instead.
|
// TODO: Deprecate gitMajor and gitMinor, use only gitVersion instead.
|
||||||
gitMajor string = "0" // major version, always numeric
|
gitMajor string = "0" // major version, always numeric
|
||||||
gitMinor string = "20.1+" // minor version, numeric possibly followed by "+"
|
gitMinor string = "20.2+" // minor version, numeric possibly followed by "+"
|
||||||
gitVersion string = "v0.20.1-dev" // version from git, output of $(git describe)
|
gitVersion string = "v0.20.2-dev" // version from git, output of $(git describe)
|
||||||
gitCommit string = "" // sha1 from git, output of $(git rev-parse HEAD)
|
gitCommit string = "" // sha1 from git, output of $(git rev-parse HEAD)
|
||||||
gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty"
|
gitTreeState string = "not a git tree" // state of git tree, either "clean" or "dirty"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user