1. 19 Jul, 2018 6 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #65771 from smarterclayton/untyped · d2cc34fb
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 65771, 65849). 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>.
      
      Add a new conversion path to replace GenericConversionFunc
      
      reflect.Call is very expensive. We currently use a switch block as part of AddGenericConversionFunc to avoid the bulk of top level a->b conversion for our primary types which is hand-written. Instead of having these be handwritten, we should generate them.
      
      The pattern for generating them looks like:
      
      ```
      scheme.AddConversionFunc(&v1.Type{}, &internal.Type{}, func(a, b interface{}, scope conversion.Scope) error {
        return Convert_v1_Type_to_internal_Type(a.(*v1.Type), b.(*internal.Type), scope)
      })
      ```
      
      which matches AddDefaultObjectFunc (which proved out the approach last year). The
      conversion machinery should then do a simple map lookup based on the incoming types and invoke the function.  Like defaulting, it's up to the caller to match the types to arguments, which we do by generating this code.  This bypasses reflect.Call and in the future allows Golang mid-stack inlining to optimize this code.
      
      As part of this change I strengthened registration of custom functions to be generated instead of hand registered, and also strengthened error checking of the generator when it sees a manual conversion to error out.  Since custom functions are automatically used by the generator, we don't really have a case for not registering the functions.
      
      Once this is fully tested out, we can remove the reflection based path and the old registration methods, and all conversion will work from point to point methods (whether generated or custom).
      
      Much of the need for the reflection path has been removed by changes to generation (to omit fields) and changes to Go (to make assigning equivalent structs easy).
      
      ```release-note
      NONE
      ```
      d2cc34fb
    • Kubernetes Submit Queue's avatar
      Merge pull request #59383 from tanshanshan/fix-little3 · 7f912af7
      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>.
      
      Replace info log with warn log
      
      **What this PR does / why we need it**:
      Replace info log with warn log
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      Fixes #59356 
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      7f912af7
    • Kubernetes Submit Queue's avatar
      Merge pull request #63666 from xchapter7x/pkg-scheduler-factory · 357decc9
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 58487, 63666). 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>.
      
      use subtest for table units (pkg/scheduler/factory)
      
      **What this PR does / why we need it**: Update scheduler's unit table tests to use subtest
      
      **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
      
      **Special notes for your reviewer**:
      breaks up PR: https://github.com/kubernetes/kubernetes/pull/63281
      /ref #63267
      
      **Release note**:
      
      ```release-note
      This PR will leverage subtests on the existing table tests for the scheduler units.
      Some refactoring of error/status messages and functions to align with new approach.
      
      ```
      357decc9
    • Kubernetes Submit Queue's avatar
      Merge pull request #58487 from bkochendorfer/kubectl-cert-deny-message · 7b1940b0
      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>.
      
      Update kubectl certificate deny message
      
      **What this PR does / why we need it**:
      Updates message for the `kubectl certificate deny` command to `denied` instead of `approved`.
      
      **Release note**:
      ```release-note
      NONE
      ```
      7b1940b0
    • Kubernetes Submit Queue's avatar
      Merge pull request #66319 from tallclair/psp-path · 5299b6c6
      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>.
      
      Cleanup & fix PodSecurityPolicy field path usage
      
      I noticed the field paths were incorrect for a bunch of PodSecurityPolicy validation errors. This PR fixes the errors, and makes it more explicit what the paths are pointing to in some cases.
      
      **Release note**:
      ```release-note
      NONE
      ```
      
      /kind cleanup
      /sig auth
      5299b6c6
    • Tim Allclair's avatar
      5ace0f03
  2. 18 Jul, 2018 34 commits