1. 21 Aug, 2018 1 commit
    • Kubernetes Submit Queue's avatar
      Merge pull request #67351 from mkimuram/issue/67269 · 80382044
      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>.
      
      Change rbd base image back to fedora 26
      
      Due to the compatiblility issue for ceph server, it needs to change
      back to fedora 26 from fedora 28, as a workaround.
      
      **What this PR does / why we need it**:
      
      **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 #67269
      
      **Special notes for your reviewer**:
      /sig storage
      @dims @rootfs
      
      **Release note**:
      ```release-note
      NONE
      ```
      80382044
  2. 20 Aug, 2018 14 commits
  3. 18 Aug, 2018 9 commits
    • Kubernetes Submit Queue's avatar
      Merge pull request #67302 from dixudx/dnsmasq_add_loop_detect · 31420467
      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>.
      
      add --dns-loop-detect option to dnsmasq run by kube-dns
      
      **What this PR does / why we need it**:
      
      **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 #67299
      
      **Special notes for your reviewer**:
      /cc @kubernetes/sig-network-pr-reviews 
      
      **Release note**:
      
      ```release-note
      add --dns-loop-detect option to dnsmasq run by kube-dns
      ```
      31420467
    • Kubernetes Submit Queue's avatar
      Merge pull request #67549 from yliaog/istio · b44a7680
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 60790, 66023, 67549). 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>.
      
      Removed istio related addon manifests, as the directory is deprecated.
      
      **What this PR does / why we need it**:
      the cluster/addon directory is deprecated, hence removing istio related addon manifests underneath.
      
      **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 #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      None
      ```
      b44a7680
    • Kubernetes Submit Queue's avatar
      Merge pull request #66023 from ibrasho/change-TRUNCATED-to-DATA+OMITTED · ae9beb46
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 60790, 66023, 67549). 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>.
      
      change TRUNCATED to DATA+OMITTED in kubectl config view
      
      **What this PR does / why we need it**:
      Based on the discussion in #61573, this PR switches the replacement text for CA certificate data and client certificates and secrets printed using `kubectl config view`. Currently, `REDACTED` is used, which might give a false impression that the data is a secret (which is not true for the public certificates).
      
      This PR changes `REDACTED` to `DATA+OMITTED`. The printed string is the base64 encoded string on the byte stream. Some trickery is involved to print a readable string (refer to [this comment](https://github.com/kubernetes/kubernetes/pull/66023/files#diff-aec000ca3f293c94dcd99b4a9d1c5c3cL86) for more info).
      
      **Which issue(s) this PR fixes**:
      Fixes #61573
      
      **Special notes for your reviewer**:
      
      
      **Release note**:
      ```release-note
      Switched certificate data replacement from "REDACTED" to "DATA+OMITTED"
      ```
      ae9beb46
    • Kubernetes Submit Queue's avatar
      Merge pull request #60790 from hanxiaoshuai/addut03051 · 7fa1b77a
      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>.
      
      add unit test for function AsScaledInt64
      
      **What this PR does / why we need it**:
      add unit test for function AsScaledInt64
      **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 #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      7fa1b77a
    • Kubernetes Submit Queue's avatar
      Merge pull request #66948 from mohamed-mehany/anti-affinity-optimization · ef388fee
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67041, 66948). 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>.
      
      Anti affinity optimization
      
      **What this PR does / why we need it**:
      This pull request aims to optimize the performance of anti-affinity rules lookup of existing pods
      This optimization maps the topology values to a list of pods running on nodes that match this value and store that map in the pod metadata. Accordingly, when validating anti-affinity rules of existing pods we will only check those running on nodes with similar topology values to the current candidate (node) for scheduling.
      
      **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 #63937
      
      **Special notes for your reviewer**:
      /sig scalability
      /sig scheduling
      **Release note**:
      
      ```release-note
      improve performance of anti-affinity predicate of default scheduler.
      ```
      ef388fee
    • Kubernetes Submit Queue's avatar
      Merge pull request #67041 from… · 363e3412
      Kubernetes Submit Queue authored
      Merge pull request #67041 from tristanburgess/50342_error_handling_refinement_for_serialization_encode
      
      Automatic merge from submit-queue (batch tested with PRs 67041, 66948). 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>.
      
      50342: Establish '406 Not Acceptable' response for protobuf serializa…
      
      …tion 'errNotMarshalable'
      
           - Added metav1.Status() that enforces '406 Not Acceptable' response if
          protobuf serialization is not fully supported for the API resource type.
           - JSON and YAML serialization are supposed to be more completely baked
          in, so serialization involving those, and general errors with seralizing
          protobuf, will return '500 Internal Server Error'.
      	- If serialization failure occurs and original HTTP status code is
          error, use the original status code, else use the serialization failure
          status code.
           - Write encoded API responses to intermediate buffer
           - Use apimachinery/runtime::Encode() instead of
          apimachinery/runtime/protocol::Encode() in
          apiserver/endpoints/handlers/responsewriters/writers::SerializeObject()
           - This allows for intended encoder error handling to fully work, facilitated by
          apiserver/endpoints/handlers/responsewriters/status::ErrorToAPIResponse() before officially
          writing to the http.ResponseWriter
           - The specific part that wasn't working by ErrorToAPIResponse() was the
          HTTP status code set. A direct call to
          http.ResponseWriter::WriteHeader(statusCode) was made in
          SerializeObject() with the original response status code, before
          performing the encode. Once this
          method is called, it can not again update the status code at a later
          time, with say, an erro status code due to encode failure.
           - Updated relevant apiserver unit test to reflect the new behavior
          (TestWriteJSONDecodeError())
           - Add build deps from make update for protobuf serializer
      
      
      
      **What this PR does / why we need it**:
      This PR fixes a bug that was blocking extensible error handling in the case that serializing response data fails, and implements a '406 Not Acceptable' status code response if protobuf marshal definitions are not implemented for an API resource type. See commit message for further details.
      
      **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 #50342 
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      Fixed a bug that was blocking extensible error handling when serializing API responses error out. Previously, serialization failures always resulted in the status code of the original response being returned. Now, the following behavior occurs:
         - If the serialization type is application/vnd.kubernetes.protobuf, and protobuf marshaling is not implemented for the requested API resource type, a '406 Not Acceptable is returned'.
         - If the serialization type is 'application/json':
              - If serialization fails, and the original status code was an failure (e.g. 4xx or 5xx), the original status code will be returned.
              - If serialization fails, and the original status code was not a failure (e.g. 2xx), the status code of the serialization failure will be returned. By default, this is '500 Internal Server Error', because JSON serialization is our default, and not supposed to be implemented on a type-by-type basis.
      
      ```
      363e3412
    • yanxuean's avatar
      remove deplicate code for PodRequestsAndLimits · efca28f8
      yanxuean authored
      Signed-off-by: 's avataryanxuean <yan.xuean@zte.com.cn>
      efca28f8
    • Kubernetes Submit Queue's avatar
      Merge pull request #67472 from islinwb/pkg_proxy_util-add-ut · c2c0d9e4
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 66733, 67472). 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 ut for PortPart()
      
      **What this PR does / why we need it**:
      improve ut coverage
      
      **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 #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      c2c0d9e4
    • Kubernetes Submit Queue's avatar
      Merge pull request #66733 from bsalamat/subset_nodes · 8c1bfeb0
      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>.
      
      Add a feature to the scheduler to score fewer than all nodes in every scheduling cycle
      
      **What this PR does / why we need it**:
      Today, the scheduler scores all the nodes in the cluster in every scheduling cycle (every time a posd is attempted). This feature implements a mechanism in the scheduler that allows scoring fewer than all nodes in the cluster. The scheduler stops searching for more nodes once the configured number of feasible nodes are found. This can help improve the scheduler's performance in large clusters (several hundred nodes and larger).
      This PR also adds a new structure to the scheduler's cache, called NodeTree, that allows scheduler to iterate over various nodes in different zones in a cluster. This is needed to avoid scoring the same set of nodes in every scheduling cycle.
      
      **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 #66627 
      
      **Special notes for your reviewer**:
      This is a large PR, but broken into a few logical commits. Reviewing would be easier if you review by commits.
      
      **Release note**:
      
      ```release-note
      Add a feature to the scheduler to score fewer than all nodes in every scheduling cycle. This can improve performance of the scheduler in large clusters.
      ```
      8c1bfeb0
  4. 17 Aug, 2018 16 commits
    • Ahmad Diaa's avatar
      b4c7d190
    • Ahmad Diaa's avatar
      created struct for topologyPairs maps · 0f4c3064
      Ahmad Diaa authored
      0f4c3064
    • Ahmad Diaa's avatar
      f6659e45
    • Mohamed Mehany's avatar
      3fb6912d
    • Kubernetes Submit Queue's avatar
      Merge pull request #67433 from deads2k/controller-02-quotadiscovery · 8b52ca1a
      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>.
      
      allow failed discovery on initial quota controller start
      
      Fixes #65005
      
      Aggregated API servers now correctly provide 503s on discovery endpoints for groups that cannot be reached.  This means that the kube-controller-manager process is now sensitive to discovery failures in the quota controller.  This change allows discovery failures in the initial quota replenishment controller resource discovery.
      
      @liggitt suspects similar races exist to those he found GC last release, but this pull doesn't make that better or worse.
      
      @kubernetes/sig-api-machinery-bugs
      8b52ca1a
    • Kubernetes Submit Queue's avatar
      Merge pull request #65779 from cblecker/mergo-update · 6b413526
      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 github.com/imdario/mergo to v0.3.5
      
      **What this PR does / why we need it**:
      Updates github.com/imdario/mergo library to v0.3.5. We were pinned because of a functionality change in the dependency, however, a new function was introduced with similar functionality to the old.
      
      There is apparently some Debian packaging issues (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=878254) because of this. I'm still not clear what those are, unless they are forcing the library to update, as opposed to using our `vendor/`.
      
      That said, this will allow for some of those vendor conflicts to resolve for anyone else who is using client-go, so that's at least worthwhile.
      
      **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 #27543, fixes https://github.com/kubernetes/client-go/issues/431
      
      **Special notes for your reviewer**:
      
      **Release note**:
      ```release-note
      NONE
      ```
      6b413526
    • Kubernetes Submit Queue's avatar
      Merge pull request #67540 from mborsz/wait3 · 00816502
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67194, 67540). 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>.
      
      Fix framework.WaitForDaemonSets
      
      * when daemonsets are not ready, wait for really them
      * swap parameters in Logf so that they are more readable.
      
      
      
      **What this PR does / why we need it**:
      
      **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 #
      
      **Special notes for your reviewer**:
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      00816502
    • Kubernetes Submit Queue's avatar
      Merge pull request #67194 from yue9944882/refactor/storage-object-inuse-protection-externalize · 567b3025
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67194, 67540). 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>.
      
      Externalize PV/PVC informer for StorageObjectInUseProtection & NodeAuthorizer
      
      **What this PR does / why we need it**:
      
      /sig api-machinery
      
      ref: #66680
      
      We move on and make the change happen for PV/PVC. 
      
      > PV: NodeAuthorizer, StorageObjectInUseProtection
      > PVC: StorageObjectInUseProtection
      
      1. Externalize PV and PVC informers for `StorageObjectInUseProtection`
      2. Copy utility functions for PV from `pkg/api/persistentvolume` to `pkg/api/v1/persistentvolume` and make it accept external types.
      3. Bump PV informer in NodeAuthorizer
      
      **Release note**:
      
      ```release-note
      NONE
      ```
      567b3025
    • Tristan Burgess's avatar
      50342: Establish '406 Not Acceptable' response for protobuf serialization 'errNotMarshalable' · bcdf3bb6
      Tristan Burgess authored
           - Added metav1.Status() that enforces '406 Not Acceptable' response if
          protobuf serialization is not fully supported for the API resource type.
           - JSON and YAML serialization are supposed to be more completely baked
          in, so serialization involving those, and general errors with seralizing
          protobuf, will return '500 Internal Server Error'.
      	- If serialization failure occurs and original HTTP status code is
          error, use the original status code, else use the serialization failure
          status code.
           - Write encoded API responses to intermediate buffer
           - Use apimachinery/runtime::Encode() instead of
          apimachinery/runtime/protocol::Encode() in
          apiserver/endpoints/handlers/responsewriters/writers::SerializeObject()
           - This allows for intended encoder error handling to fully work, facilitated by
          apiserver/endpoints/handlers/responsewriters/status::ErrorToAPIResponse() before officially
          writing to the http.ResponseWriter
           - The specific part that wasn't working by ErrorToAPIResponse() was the
          HTTP status code set. A direct call to
          http.ResponseWriter::WriteHeader(statusCode) was made in
          SerializeObject() with the original response status code, before
          performing the encode. Once this
          method is called, it can not again update the status code at a later
          time, with say, an erro status code due to encode failure.
           - Updated relevant apiserver unit test to reflect the new behavior
          (TestWriteJSONDecodeError())
           - Add build deps from make update for protobuf serializer
      
      50342: Code review suggestion impl
       - Ensure that http.ResponseWriter::Header().Set() is called before http.ResponseWriter::WriteHeader()
          - This will avert a potential issue where changing the response media type to text/plain wouldn't work.
          - We want to respond with plain text if serialization fails of the original response, and serialization also fails for the resultant error response.
      
      50342: wrapper for http.ResponseWriter
        - Prevent potential performance regression caused by modifying encode to use a buffer instead of streaming
          - This is achieved by creating a wrapper type for http.ResponseWriter that will use WriteHeader(statusCode) on the first
          call to Write(). Thus, on encode success, Write() will write the original statusCode. On encode failure, we pass control
          onto responsewriters::errSerializationFatal(), which will process the error to obtain potentially a new status code, depending
          on whether or not the original status code was itself an error.
      
      50342: code review suggestions
        - Remove historical note from unit test comment
        - Don't export httpResponseWriterWithInit type (for now)
      bcdf3bb6
    • Yu Liao's avatar
    • André Bauer's avatar
      use image 2.2.0 again · 9b5c5650
      André Bauer authored
      9b5c5650
    • André Bauer's avatar
      fixed typo · 6ab218d4
      André Bauer authored
      6ab218d4
    • Kubernetes Submit Queue's avatar
      Merge pull request #66876 from juanvallejo/jvallejo/prototype-plugins · 1737a433
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). 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 the kubectl plugin mechanism
      
      **Release note**:
      ```release-note
      The plugin mechanism functionality to closely follow the git plugin design
      ```
      
      Replace the existing plugin mechanism with the design proposed in https://github.com/kubernetes/community/pull/2437.
      
      ~~_The full implementation of the plugin mechanism itself is entirely contained within the first commit._~~
      
      ## Walkthrough
      
      Under the new design, there is no plugin installation or loading required to use plugins.
      A plugin is simply any executable file on a user's PATH whose name begins with `kubectl-`.
      - Plugins receive the inherited environment from the `kubectl` binary. All environment variables
      accessible by `kubectl` become accessible by the plugin.
      - Plugins decide which command path they wish to implement based on their name. For example, a plugin wanting to provide a new command `foo`, would simply be named `kubectl-foo`.
      
      ### Creating a plugin
      
      Below is an example plugin, that we will use for this walkthrough. Plugins may be written in any language, and handle arguments and flags in any way, optionally (as a convention) providing a way to retrieve their version via a `version` subcommand.
      
      ```bash
      #!/bin/bash
      
      # optional argument handling
      if [[ "$1" == "version" ]]
      then
          echo "1.0.0"
          exit 0
      fi
      
      # optional argument handling
      if [[ "$1" == "config" ]]
      then
          echo $KUBECONFIG
          exit 0
      fi
      
      echo "I am a plugin named kubectl-foo"
      ```
      
      ### Using a plugin
      
      To use a plugin, simply make it executable:
      
      ```bash
      sudo chmod +x ./kubectl-foo
      ```
      
      and place it anywhere in your PATH:
      
      ```bash
      sudo mv ./kubectl-foo /usr/local/bin
      ```
      
      You may now invoke your plugin as a `kubectl` command:
      
      ```bash
      $ kubectl foo
      I am a plugin named kubectl-foo
      ```
      
      All args and flags are passed as-is to the executable:
      
      ```bash
      $ kubectl foo version
      1.0.0
      ```
      
      All environment variables are also passed as-is to the executable:
      
      ```bash
      $ export KUBECONFIG=~/.kube/config
      $ kubectl foo config
      /home/<user>/.kube/config
      
      $ KUBECONFIG=/etc/kube/config kubectl foo config
      /etc/kube/config
      ```
      
      Additionally, the first argument that is passed to a plugin will always be the full path to the location where it was invoked (`$0` would equal `/usr/local/bin/kubectl-foo` in our example above).
      
      ### Plugin discoverability
      
      Seeing as how the `kubectl plugin` command is left as a no-op with this PR (perhaps it could serve as an entrypoint towards additional plugin functionality in the future), a small subcommand has been included that _lists all available plugin executables on a user's PATH_, along with any warnings it finds.
      
      Example usage of this new subcommand is included below:
      
      ```bash
      $ kubectl plugin list
      The following kubectl-compatible plugins are available:
      
      test/fixtures/pkg/kubectl/plugins/kubectl-foo
      plugins/kubectl-foo
        - warning: plugins/kubectl-foo is overshadowed by a similarly named plugin: test/fixtures/pkg/kubectl/plugins/kubectl-foo
      plugins/kubectl-invalid
        - warning: plugins/kubectl-invalid identified as a kubectl plugin, but it is not executable
      plugins/kubectl-bar
      
      error: 2 plugin warnings were found
      ```
      
      cc @kubernetes/kubectl-maintainers @kubernetes/sig-cli-pr-reviews @soltysh @seans3 @mengqiy
      1737a433
    • Kubernetes Submit Queue's avatar
      Merge pull request #67504 from loburm/adjust_resources · f6817d2f
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). 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>.
      
      Decrease CPU requests of master components in two times.
      
      **What this PR does / why we need it**:
      Decreases cpu request of each master component by two. This allows to schedule more components on the master node in case of one-core machines. At the same time it doesn't change current cpu share that each component receives (https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#how-pods-with-resource-limits-are-run).
      
      ```release-note
      NONE
      ```
      f6817d2f
    • Kubernetes Submit Queue's avatar
      Merge pull request #67539 from losipiuk/lo/test-require-specific-gpu · fb339ace
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). 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>.
      
      Allow requesting specific gpu in autoscaling e2e tests
      
      ```release-note
      NONE
      ```
      fb339ace
    • Kubernetes Submit Queue's avatar
      Merge pull request #67169 from mbohlool/proto_fix · 97215fe2
      Kubernetes Submit Queue authored
      Automatic merge from submit-queue (batch tested with PRs 67062, 67169, 67539, 67504, 66876). 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>.
      
      Fix Proto Generator to not assign types to packages they don't belong to
      
      Before this PR, types were assign to the first package they defined or being used. This result in wrong import statements. The change also fixes what #67158 tries to fix as the package path for protos will never empty.
      
      An step forward from #67158
      
      /assign @sttts @smarterclayton
      97215fe2