Merge pull request #27784 from deads2k/catch-mutators

Automatic merge from submit-queue

add optional mutation checks for shared informer cache

We need to make sure that no one is mutating caches if they're using a shared informer.  It is important that whatever is tracking those changes gets the object *before* anyone else possibly could.

This adds the ability to track the original objects in the cache and their current values.  Go doesn't have an exit hook or a way to say "wait for non-daemon go-funcs to complete before exit", so this runs a gofunc on a loop that can panic the entire process.  It's gated behind an env var.

@derekwaynecarr did I get the right spots to make sure that e2e runs with this flag?
@smarterclayton @kubernetes/rh-cluster-infra
This commit is contained in:
Kubernetes Submit Queue
2016-10-18 14:38:57 -07:00
committed by GitHub
5 changed files with 234 additions and 6 deletions

View File

@@ -43,6 +43,11 @@ CLOUD_PROVIDER=${CLOUD_PROVIDER:-""}
CLOUD_CONFIG=${CLOUD_CONFIG:-""}
FEATURE_GATES=${FEATURE_GATES:-"AllAlpha=true"}
# start the cache mutation detector by default so that cache mutators will be found
KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}"
export KUBE_CACHE_MUTATION_DETECTOR
# START_MODE can be 'all', 'kubeletonly', or 'nokubelet'
START_MODE=${START_MODE:-"all"}