Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create EnsureExists class addons before Reconcile class addons #42760

Merged
merged 2 commits into from
Mar 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions cluster/addons/addon-manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
7 changes: 2 additions & 5 deletions cluster/addons/addon-manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cluster/addons/addon-manager/kube-addons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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) =="
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion cluster/saltbase/salt/kube-addons/kube-addon-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down