From 3de7e5ab407107648689e5738da745aa27c87fae Mon Sep 17 00:00:00 2001 From: Rohit Agarwal Date: Fri, 27 Oct 2017 12:50:09 -0700 Subject: [PATCH] Remove redundant comment and improve documentation. The comment is also present in lines 143-145 where it makes more sense. --- cluster/addons/addon-manager/README.md | 11 ++++++----- cluster/addons/addon-manager/kube-addons.sh | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cluster/addons/addon-manager/README.md b/cluster/addons/addon-manager/README.md index b9da7039ba4..e9ae53458c9 100644 --- a/cluster/addons/addon-manager/README.md +++ b/cluster/addons/addon-manager/README.md @@ -1,26 +1,27 @@ ### Addon-manager -addon-manager manages two classes of addons with given template files. +addon-manager manages two classes of addons with given template files in +`$ADDON_PATH` (default `/etc/kubernetes/addons/`). - Addons with label `addonmanager.kubernetes.io/mode=Reconcile` will be periodically reconciled. Direct manipulation to these addons through apiserver is discouraged because addon-manager will bring them back to the original state. In particular: - Addon will be re-created if it is deleted. - Addon will be reconfigured to the state given by the supplied fields in the template file periodically. - - Addon will be deleted when its manifest file is deleted. + - Addon will be deleted when its manifest file is deleted from the `$ADDON_PATH`. - Addons with label `addonmanager.kubernetes.io/mode=EnsureExists` will be checked for existence only. Users can edit these addons as they want. In particular: - Addon will only be created/re-created with the given template file when there is no instance of the resource with that name. - - Addon will not be deleted when the manifest file is deleted. + - Addon will not be deleted when the manifest file is deleted from the `$ADDON_PATH`. Notes: - Label `kubernetes.io/cluster-service=true` is deprecated (only for Addon Manager). In future release (after one year), Addon Manager may not respect it anymore. Addons have this label but without `addonmanager.kubernetes.io/mode=EnsureExists` will be treated as "reconcile class addons" for now. -- Resources under $ADDON_PATH (default `/etc/kubernetes/addons/`) needs to have either one -of these two labels. Meanwhile namespaced resources need to be in `kube-system` namespace. +- Resources under `$ADDON_PATH` need to have either one of these two labels. +Meanwhile namespaced resources need to be in `kube-system` namespace. Otherwise it will be omitted. - The above label and namespace rule does not stand for `/opt/namespace.yaml` and resources under `/etc/kubernetes/admission-controls/`. addon-manager will attempt to diff --git a/cluster/addons/addon-manager/kube-addons.sh b/cluster/addons/addon-manager/kube-addons.sh index 84106852025..629ebe66c8e 100755 --- a/cluster/addons/addon-manager/kube-addons.sh +++ b/cluster/addons/addon-manager/kube-addons.sh @@ -26,9 +26,6 @@ # 3. Kubectl prints the output to stderr (the output should be captured and then # logged) -# The business logic for whether a given object should be created -# was already enforced by salt, and /etc/kubernetes/addons is the -# managed result is of that. Start everything below that directory. KUBECTL=${KUBECTL_BIN:-/usr/local/bin/kubectl} KUBECTL_OPTS=${KUBECTL_OPTS:-}