• k8s-merge-robot's avatar
    Merge pull request #23208 from deads2k/fix-version-override · 85de6aca
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    make storage enablement, serialization, and location orthogonal
    
    This allows a caller (command-line, config, code) to specify multiple separate pieces of config information regarding storage and have them properly composed at runtime.  The information provided is exposed through interfaces to allow alternate implementations, which allows us to change the expression of the config moving forward.  I also fixed up the types to be correct as I moved through.
    
    The same options still exist, but they're composed slightly differently
     1. specify target etcd servers per Group or per GroupResource
     1. specify storage GroupVersions per Groups or per GroupResource
     1. specify etcd prefixes per GroupVersion or per GroupResource
     1. specify that multiple GroupResources share the same location in etcd
     1. enable GroupResources by GroupVersion or by GroupResource whitelist or GroupResource blacklist
    
    The `storage.Interface` is built per GroupResource by:
     1. find the set of possible storage GroupResource based on the priority list of cohabitators
     1. choose a GroupResource from the set by looking at which Groups have the resource enabled
     1. find the target etcd server, etcd prefix, and storage encoding based on the GroupResource
    
    The API server can have its resources separately enabled, but for now I've kept them linked.
    
    @liggitt I think we need this (or something like it) to be able to go from config to these interfaces.  Given another round of refactoring, we may be able to reshape these to be more forward driving.
    
    @smarterclayton this is important for rebasing and for a seamless 1.2 to 1.3 migration for us.
    85de6aca
Name
Last commit
Last update
..
etcd Loading commit data...
etcd3 Loading commit data...
testing Loading commit data...
cacher.go Loading commit data...
cacher_test.go Loading commit data...
doc.go Loading commit data...
errors.go Loading commit data...
interfaces.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...
watch_cache.go Loading commit data...
watch_cache_test.go Loading commit data...