1. 19 Oct, 2017 3 commits
    • Solly Ross's avatar
      [client-go] Polymorphic Scale Client · d61a2d90
      Solly Ross authored
      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
      d61a2d90
    • Solly Ross's avatar
      [client-go] fake discovery returns server groups · f83a1967
      Solly Ross authored
      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.
      f83a1967
    • Solly Ross's avatar
      [client-go] avoid Registry in fake REST client · eac2049f
      Solly Ross authored
      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).
      eac2049f
  2. 18 Oct, 2017 34 commits
  3. 17 Oct, 2017 3 commits
    • Joonas Bergius's avatar
      Remove dangling shell functions · 0c9725d5
      Joonas Bergius authored
      0c9725d5
    • Kubernetes Submit Queue's avatar
      Merge pull request #53587 from spzala/master · d97c7591
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Provide aggregated validation errors for version and kind
      
      Currently the validation checks is done individually for version and
      kind group. For example, if user provided yaml file is missing apiVersion
      and kind fields, first they will receive error on apiVersion. Once user
      update the file and try to recreate, an error on missing kind is displayed.
      The behavior is same for wrong types of the fields.
      These errors should be aggregated and displayed.
      
      Examples of current validation:
      1
      test.yaml is missing apiVersion and kind:
      $kubectl.sh create -f /home/sahdev/go/src/bugfixes/test.yaml
      error: error validating "/home/sahdev/go/src/bugfixes/test.yaml": error validating data: apiVersion not set; if you choose to ignore these errors, turn validation off with --validate=false
      2.
      test.yaml is fixed for apiVersion but missing kind:
      $kubectl.sh create -f /home/sahdev/go/src/bugfixes/test.yaml
      error: error validating "/home/sahdev/go/src/bugfixes/test.yaml": error validating data: kind not set; if you choose to ignore these errors, turn validation off with --validate=false
      
      Examples with aggregated validation: 
      1.
      error: error validating "/home/sahdev/go/src/bugfixes/test.yaml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
      2.
      error: error validating "/home/sahdev/go/src/bugfixes/testmix.yaml": error validating data: [apiVersion isn't string type, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false
      
      
      
      **What this PR does / why we need it**:
      To provide aggregated validations to user for version and kind group.
      
      **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #54098
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      d97c7591
    • Kubernetes Submit Queue's avatar
      Merge pull request #52503 from joelsmith/journald-log-fallback · e3e2e24c
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 54040, 52503). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
      
      Get fallback termination msg from docker when using journald log driver
      
      **What this PR does / why we need it**:
      
      When using the legacy docker container runtime and when a container has `terminationMessagePolicy=FallbackToLogsOnError` and when docker is configured with a log driver other than `json-log` (such as `journald`), the kubelet should not try to get the container's log from the json log file (since it's not there) but should instead ask docker for the logs.
      
      **Which issue this PR fixes** fixes #52502
      
      **Special notes for your reviewer**:
      
      **Release note**:
      ```release-note
      Fixed log fallback termination messages when using docker with journald log driver
      ```
      e3e2e24c