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

Polymorphic Scale Client #53743

Commits on Oct 19, 2017

  1. [client-go] avoid Registry in fake REST client

    Previously, the fake RESTClient in client-go required a Registry.  It
    used the Registry to fetch the GroupVersion for the fake client.
    However, the way it did so was dubious in some cases (it hard-coded the
    default API group in places), and not strictly necssary.
    
    This updates the fake client to just recieve the GroupVersion and
    internal group name directly, instead of requiring a Registry, so that
    it can be consumed in unit tests where a Registry isn't necessarily
    readily available (e.g. elsewhere in client-go).
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    eac2049 View commit details
    Browse the repository at this point in the history
  2. [client-go] fake discovery returns server groups

    The fake discovery client currently returns `nil, nil` for several
    methods.  Among them is the `ServerGroups` method, which is used by the
    discovery REST mapper implementations.  This updates the fake discovery
    client to actually return server groups so that the discovery REST
    mapper can be used in tests.
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    f83a196 View commit details
    Browse the repository at this point in the history
  3. [client-go] Polymorphic Scale Client

    This introduces a polymorphic scale client capable of operating against
    scale subresources which return different group-versions of Scale.  The
    scale subresources may be in group-versions different than the scale
    itself, so that we no longer need a copy of every scalable resource in
    the extensions API group.
    
    To discovery which Scale group-versions go to which subresources,
    discovery is used.
    
    The scale client maintains its own internal versions and conversions to
    several external versions, with a "hub" version that's a copy of the
    autoscaling internal version.
    
    It currently supports the following group-versions for Scale subresources:
    
    - extensions/v1beta1.Scale
    - autoscaling/v1.Scale
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    d61a2d9 View commit details
    Browse the repository at this point in the history
  4. Fuzz label selectors

    Previously, we did not have custom code for fuzzing label selectors.
    Anything that used a label selector (like Scale) had to manually bypass
    fuzzing the selector, or write its own fuzzer.  This introduces a fuzzer
    for label selectors which generates random correct selectors with random
    keys and values.
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    ef583ae View commit details
    Browse the repository at this point in the history
  5. Update extensions fuzzer to use selector fuzzer

    This removes the override on the extensions fuzzer so that
    extensions.Scale will use the full label selector fuzzer.
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    3f51bab View commit details
    Browse the repository at this point in the history
  6. Make HPA controller use polymorphic scale client

    This updates the HPA controller to use the polymorphic scale client from
    client-go.  This should enable HPAs to work with arbitrary scalable
    resources, instead of just those in the extensions API group (meaning we
    can deprecate the copy of ReplicationController in extensions/v1beta1).
    It also means that the HPA controller now pays attention to the
    APIVersion field in `scaleTargetRef` (more specifically, the group part
    of it).
    
    Note that currently, discovery information on which resources are
    available where is only fetched once (the first time that it's
    requested).  In the future, we may want a refreshing discovery REST
    mapper.
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    d2b4112 View commit details
    Browse the repository at this point in the history
  7. [make-rules] test grep should treat binary as text

    The output of `go test` is passed throug a grep filter that's used when
    producing junit output.  Unfortunately, when testing round-trip
    conversions with random strings, grep can become convinced that the test
    output is binary, and will truncate a failed test before any output is
    displayed, showing "binary file (standard input) matches".
    
    This forces grep to consider test output to be text, so that we always
    see test results.
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    55e1f6a View commit details
    Browse the repository at this point in the history
  8. [client-go] Add fake scale client

    This adds a new fake scale client (for use in testing) to match the
    new polymorphic scale client.
    DirectXMan12 committed Oct 19, 2017
    Configuration menu
    Copy the full SHA
    f22bfcd View commit details
    Browse the repository at this point in the history