Automatic merge from submit-queue.
Automated cherry pick of #52710 upstream release 1.7
This is necessary to consistently publish the release-1.7 branch of the staging/ repos, compare https://github.com/kubernetes/kubernetes/pull/52710.
Kubernetes-commit: 5314e9bafc2a2ed0cb8de2bebe1b5e84b6b3c9ff
Automatic merge from submit-queue.
Automated cherry pick of #53239
Cherry pick of #53239 on release-1.7.
#53239: Correct APIGroup for RoleBindingBuilder Subjects
Kubernetes-commit: 1a4c2bfb8e06eb64c8c3e05657a25fb3a6e6789b
Automatic merge from submit-queue.
Automated cherry pick of #50012
Cherry pick of #50012 on release-1.7.
#50012: use specified discovery information if possible
```release-note
custom resources that use unconventional pluralization now work properly with kubectl
```
Kubernetes-commit: dd388c7e9bb7e85257424761541e57a297d89de9
This change corrects RoleBindingBuilder to use the RBAC API group
with users and groups as subjects (service accounts use the empty
string since they are in the legacy core group). This is based on
the defaulting in pkg/apis/rbac/v1/defaults.go#SetDefaults_Subject.
This is required because the bootstrap RBAC data is built with these
helpers and does not go through defaulting, whereas the data
retrieved from the server has already gone through defaulting. This
can lead to the reconciliation code incorrectly adding duplicate
subjects because it believes that they are missing (since the API
groups do not match).
Signed-off-by: Monis Khan <mkhan@redhat.com>
Kubernetes-commit: 974991b1800fcc7136e28584c729f867582f0752
Automatic merge from submit-queue
Automated cherry pick of #50163
Cherry pick of #50163 on release-1.7.
fixes#50121#50163: Change SizeLimit to a pointer
```release-note
The alpha `emptyDir.sizeLimit` field is now correctly omitted from API requests and responses when unset.
```
Kubernetes-commit: 7afd0621fd72b95d307c0a392fdd2f459d5c2844
Automatic merge from submit-queue
Automated cherry pick of #49495 upstream release 1.7
Cherry pick of #49495 on release-1.7.
#49495: make it possible to allow discovery errors for controllers
Kubernetes-commit: 423592b27133c7d7e23eafdd1517d0167b53d500
Volume mounting logic introduced in #43775 and #45623 checks
for subPath existence before attempting to create a directory,
should subPath not be present.
This breaks if subPath is a dangling symlink, os.Stat returns
"do not exist" status, yet `os.MkdirAll` can't create directory
as symlink is present at the given path.
This patch makes existence check to use os.Lstat which works for
normal files/directories as well as doesn't not attempt to follow
symlink, therefore it's "do not exist" status is more reliable when
making a decision whether to create directory or not.
subPath symlinks can be dangling in situations where kubelet is
running in a container itself with access to docker socket, such
as CoreOS's kubelet-wrapper script
Kubernetes-commit: d552dff164dfc7b91d21bd7d7881838babab2a63
Remove custom-resources directory from client-go
Add TPR example back
Mention CRD is successor to TPR
Kubernetes-commit: b0504c6bff0ea5f923f935a4844e1eeab0ae5405