• Eric Tune's avatar
    Cleanup borrowed conversion functions. · ff35d976
    Eric Tune authored
    In pkg/apis/extensions/v1beta1/conversion.go,
    some conversion code was copied from the
    legacy api because Pod conversions cannot be
    automatically generated because of something
    about deprecatedServiceAccount.
    
    This PR fixes two problems due to that copying.
    
    First, the copied code could drift from its source
    To fix that, I replaced the Convert_api_ and Convert_v1
    implementations with a call to the original function.
    I left a wrapper in case something needed to have
    a package-local function name.
    
    Second, the copied Convert_* functions, were copied,
    in a way that they refer to other conversion functions
    that aren't in the current package.  This prevented
    genconverion from working from a clean start
    (no conversion_generated.go).  Perhaps the person
    who wrote this in the first place had copied
    the conversion_generated.go file from legacy,
    so it worked.   So, I added the v1
    package name to calls to Convert_* functions.
    So, when someone Cargo-Cult copies the conversion.go
    file, like I did, they now will not have to
    wonder why genconversion complains about missing
    Convert_ functions.
    
    Deleted the conversion_generated.go and reran genconversion
    and it worked, no diffs old vs new conversion_generated.go.
    ff35d976
Name
Last commit
Last update
..
admission Loading commit data...
api Loading commit data...
apimachinery Loading commit data...
apis Loading commit data...
apiserver Loading commit data...
auth Loading commit data...
capabilities Loading commit data...
client Loading commit data...
cloudprovider Loading commit data...
controller Loading commit data...
conversion Loading commit data...
credentialprovider Loading commit data...
fieldpath Loading commit data...
fields Loading commit data...
genericapiserver Loading commit data...
healthz Loading commit data...
httplog Loading commit data...
hyperkube Loading commit data...
kubectl Loading commit data...
kubelet Loading commit data...
kubemark Loading commit data...
labels Loading commit data...
master Loading commit data...
metrics Loading commit data...
probe Loading commit data...
proxy Loading commit data...
registry Loading commit data...
runtime Loading commit data...
securitycontext Loading commit data...
serviceaccount Loading commit data...
storage Loading commit data...
types Loading commit data...
ui Loading commit data...
util Loading commit data...
version Loading commit data...
volume Loading commit data...
watch Loading commit data...