Merge pull request #42760 from MrHohn/addon-reverse-order

Automatic merge from submit-queue (batch tested with PRs 42768, 42760, 42771, 42767)

Create EnsureExists class addons before Reconcile class addons

From #42757.

The addon-manager creates "Reconcile" class addons before creates "EnsureExists" class addons, which is not the best order. The "EnsureExists" class addons tend to be some default configurations like `default-storage-class` and `default kube-dns ConfigMap` (being added in #42757), and we would like to have these default configurations created before other addons are created.

@mikedanese @bowei 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-03-09 00:07:57 -08:00 committed by GitHub
commit 6a5ae47e2e
6 changed files with 10 additions and 10 deletions

View File

@ -1,3 +1,6 @@
### Version 6.4-beta.1 (Wed March 8 2017 Zihong Zheng <zihongz@google.com>)
- Create EnsureExists class addons before Reconcile class addons.
### Version 6.4-alpha.3 (Fri February 24 2017 Zihong Zheng <zihongz@google.com>)
- Support 'ensure exist' class addon and use addon-manager specific label.

View File

@ -15,11 +15,8 @@
IMAGE=gcr.io/google-containers/kube-addon-manager
ARCH?=amd64
TEMP_DIR:=$(shell mktemp -d)
VERSION=v6.4-alpha.3
# TODO: Current Addon Manager is built with kubectl on head
# (GitCommit:"17375fc59fff39135af63bd1750bb07c36ef873b").
# Should use next released kubectl once available.
KUBECTL_VERSION?=v1.6.0-alpha.2
VERSION=v6.4-beta.1
KUBECTL_VERSION?=v1.6.0-beta.2
ifeq ($(ARCH),amd64)
BASEIMAGE?=bashell/alpine-bash

View File

@ -207,8 +207,8 @@ annotate_addons Deployment
# The new Deployments will not fight for pods created by old RCs with the same label because the additional `pod-template-hash` label.
# Apply will fail if some fields are modified but not are allowed, in that case should bump up addon version and name (e.g. handle externally).
log INFO "== Executing apply to spin up new addon resources at $(date -Is) =="
reconcile_addons false
ensure_addons
reconcile_addons false
# Wait for new addons to be spinned up before delete old resources
log INFO "== Wait for addons to be spinned up at $(date -Is) =="
@ -221,8 +221,8 @@ log INFO "== Entering periodical apply loop at $(date -Is) =="
while true; do
start_sec=$(date +"%s")
# Only print stderr for the readability of logging
reconcile_addons true
ensure_addons
reconcile_addons true
end_sec=$(date +"%s")
len_sec=$((${end_sec}-${start_sec}))
# subtract the time passed from the sleep time

View File

@ -11,7 +11,7 @@
"containers": [
{
"name": "kube-addon-manager",
"image": "REGISTRY/kube-addon-manager-ARCH:v6.4-alpha.3",
"image": "REGISTRY/kube-addon-manager-ARCH:v6.4-beta.1",
"resources": {
"requests": {
"cpu": "5m",

View File

@ -11,7 +11,7 @@
"containers": [
{
"name": "kube-addon-manager",
"image": "REGISTRY/kube-addon-manager-ARCH:v6.4-alpha.3",
"image": "REGISTRY/kube-addon-manager-ARCH:v6.4-beta.1",
"resources": {
"requests": {
"cpu": "5m",

View File

@ -13,7 +13,7 @@ spec:
# - cluster/images/hyperkube/static-pods/addon-manager-singlenode.json
# - cluster/images/hyperkube/static-pods/addon-manager-multinode.json
# - test/kubemark/resources/manifests/kube-addon-manager.yaml
image: gcr.io/google-containers/kube-addon-manager:v6.4-alpha.3
image: gcr.io/google-containers/kube-addon-manager:v6.4-beta.1
command:
- /bin/bash
- -c