Commit Graph

107666 Commits

Author SHA1 Message Date
Jordan Liggitt
cff4eeef9f Tolerate additional error messages in TLS unit tests 2022-03-29 08:57:31 -04:00
Patrick Ohly
7de1b05e85 logging: add ContextualLogging feature
InitLogs overrides the klog default and turns contextual logging off. This
ensures that it is only enabled in Kubernetes commands that explicitly enable
it via a feature gate. A feature gate for it gets defined in
k8s.io/component-base/logs and is then used by Options.ValidateAndApply.

The effect of disabling contextual logging is very limited according to
benchmarks with kube-scheduler. The feature gets added anyway to satisfy the
PRR recommendation that features should be controllable.

The following commands have support for contextual logging:
- kube-apiserver
- kube-controller-manager
- kubelet
- kube-scheduler
- component-base/logs example

Supporting a feature gate check in ValidateAndApply and not in InitLogs is a
simplification: changing InitLogs to accept a FeatureGate would have implied
changing also component-base/cli.Run. This didn't seem worthwhile because
ValidateAndApply already covers the relevant commands.
2022-03-29 13:29:57 +02:00
Patrick Ohly
b390d018c7 logs: pass verbosity to loggers
When a Logger gets called directly via contextual logging, it has to do its own
verbosity check and therefore needs to know what the intended verbosity level
is.

This used to work previously because all verbosity checks were done in klog
before invoking the Logger.
2022-03-29 12:06:40 +02:00
Patrick Ohly
ef30d845d9 json: test handling of duplicate keys
We want to see in the output when keys are used more than once. This should be
fixed because parsing the log messages as JSON will only preserve one of the
values.
2022-03-29 12:00:26 +02:00
Patrick Ohly
ab318cf89f json: enable WithName logging
The name added to a logger via WithName only gets printed when a key is
chosen. "logger" is used as in the zap examples.

This becomes relevant once we support contextual logging. When logging through
klog the name is always empty.
2022-03-29 12:00:26 +02:00
Patrick Ohly
3fe5b3e09d json: test WithName
At the moment, the zap configuration ignores the WithName values.
2022-03-29 12:00:26 +02:00
Kubernetes Prow Robot
1ea07d482a
Merge pull request #108126 from sanposhiho/doc/generatedname
fix the doc about generateName conflict
2022-03-29 02:58:47 -07:00
Ricardo Katz
42a1201082
Implementation on Network Policy Status (#107963)
* Implement status subresource in NetworkPolicy

* add NetworkPolicyStatus generated files

* Fix comments in netpol status review
2022-03-29 01:52:48 -07:00
Paco Xu
4e96009c15 use privileged enforce level in host pid sharing testing 2022-03-29 15:51:33 +08:00
Kubernetes Prow Robot
fe8a663860
Merge pull request #109029 from ehashman/runc-1.1.0
Dep bump to runc 1.1.0, cadvisor 0.44.0
2022-03-28 22:45:10 -07:00
Kir Kolyshkin
fd21ade6d5 vendor: bump golang/mock to 1.6.0
Commit e3ed3ba7c9 bumps golang/mock to 1.6.0 in hack/tools.
It makes sense to keep its version in sync, so let's do the same
in the top level go.mod.

Generated by

	./hack/pin-dependency.sh github.com/golang/mock v1.6.0
	./hack/lint-dependencies.sh
	./hack/update-vendor.sh
	./hack/update-internal-modules.sh

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 21:49:04 -07:00
Kubernetes Prow Robot
656dc213ce
Merge pull request #108992 from alexzielenski/cache-busting-client-go
client-go: OpenAPI v3 support
2022-03-28 21:37:11 -07:00
Kubernetes Prow Robot
c64a8cdc2d
Merge pull request #109078 from tallclair/audit-mutex
Audit mutex
2022-03-28 20:29:11 -07:00
Kubernetes Prow Robot
c290874532
Merge pull request #109089 from deepakkinni/deprecate-vc-70u2-below-releases-v2
deprecate vsphere releases less than 7.0u2 for in-tree vsphere volumes
2022-03-28 19:25:11 -07:00
Alexander Zielenski
e9fc6c28a2
adjust comments 2022-03-28 18:40:34 -07:00
Kubernetes Prow Robot
f85ff4b574
Merge pull request #82162 from krmayankk/maxun
API: maxUnavailable for StatefulSet
2022-03-28 17:57:10 -07:00
Divyen Patel
009286019e deprecate vsphere releases less than 7.0u2 for in-tree vsphere volume plugin 2022-03-29 06:15:22 +05:30
Tim Allclair
bdebc62d49 Don't add audit annotations directly to the audit event 2022-03-28 17:03:53 -07:00
Kubernetes Prow Robot
874d4bff43
Merge pull request #108990 from jpbetz/per-crd
CRD CEL Validation: per-CRD estimated cost limit enforcement
2022-03-28 16:53:11 -07:00
Kir Kolyshkin
37761a329e
pkg/kubelet: changes to update runc to 1.1.0
The changes (mostly in pkg/kubelet/cm) are there to adopt changed
runc 1.1 API, and simplify things a bit. In particular:

1. simplify cgroup manager instantiation, using a new, easier way of
   libcontainers/cgroups/manager.New;

2. replace libcontainerAdapter with a boolean variable (all it did
   was passing on whether systemd manager should be used);

3. trivial change due to removed cgroupfs.HugePageSizes and added
    cgroups.HugePageSizes();

4. do not calculate cgroup paths in update / destroy, since libcontainer
   cgroup managers now calculate the paths upon creation (previously,
   they were doing that only in Apply, so using e.g. Set or Destroy right
   after creation was impossible without specifying paths).

We currently still calculate cgroup paths in Exists -- this is to be
addressed separately.

Co-Authored-By: Elana Hashman <ehashman@redhat.com>
2022-03-28 16:23:20 -07:00
Elana Hashman
07af1bab70
deps: update runc to 1.1.0
This updates vendored runc/libcontainer to 1.1.0,
and google/cadvisor to a version updated to runc 1.1.0
(google/cadvisor#3048).

Changes in vendor are generated by (roughly):

        ./hack/pin-dependency.sh github.com/google/cadvisor v0.44.0
        ./hack/pin-dependency.sh github.com/opencontainers/runc v1.1.0
        ./hack/update-vendor.sh
        ./hack/lint-dependencies.sh # And follow all its recommendations.
        ./hack/update-vendor.sh
        ./hack/update-internal-modules.sh
        ./hack/lint-dependencies.sh # Re-check everything again.

Co-Authored-By: Kir Kolyshkin <kolyshkin@gmail.com>
2022-03-28 16:23:18 -07:00
Kubernetes Prow Robot
41830a1f79
Merge pull request #109080 from tallclair/audit-cleanup
Delete dead code
2022-03-28 15:24:12 -07:00
Kubernetes Prow Robot
4fdca04f35
Merge pull request #109059 from danwinship/kube-iptables-hint
Create a KUBE-IPTABLES-HINT chain
2022-03-28 15:24:04 -07:00
Kubernetes Prow Robot
ef45c99506
Merge pull request #109025 from alculquicondor/smaller-job-integration-load
Reduce number of pods in Job+GC tests
2022-03-28 15:23:56 -07:00
Kubernetes Prow Robot
6571eb2450
Merge pull request #108629 from skitt/blang-semver-v4
Upgrade to blang/semver/v4 v4.0.0
2022-03-28 15:23:48 -07:00
Kubernetes Prow Robot
0bbb617412
Merge pull request #93438 from tallclair/audit-ips
Document the sources for the sourceIPs audit log field
2022-03-28 15:23:41 -07:00
Davanum Srinivas
43bf01e080
bash verbose around admin-kube-aggregator.kubeconfig
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-28 18:08:16 -04:00
Joe Betz
ff3d67d76a Enfoce per-CRD estimated cost limit 2022-03-28 17:33:16 -04:00
Ross Peoples
f3b928a23d Import tzdata in apiserver, CronJob.timeZone fixes 2022-03-28 16:33:05 -05:00
Ross Peoples
98837de446 TimeZone support for CronJobs 2022-03-28 16:33:00 -05:00
Kubernetes Prow Robot
f25c0e5f09
Merge pull request #109074 from neolit123/1.24-kubeadm-etcd-add-corruption-check
kubeadm: add etcd flag for member data consistency
2022-03-28 14:20:21 -07:00
Kubernetes Prow Robot
ea0dc6ed41
Merge pull request #108889 from kevindelgado/validation-beta-flag
ServerSideFieldValidation Beta Graduation
2022-03-28 14:20:12 -07:00
Kubernetes Prow Robot
e41350790f
Merge pull request #108612 from DangerOnTheRanger/cel-crd-maxlength
Calculate CEL cost totals
2022-03-28 14:20:03 -07:00
Kubernetes Prow Robot
9f213370cc
Merge pull request #106497 from danwinship/traffic-policy-fixes
fix internalTrafficPolicy
2022-03-28 14:19:54 -07:00
Kubernetes Prow Robot
b053c91fb6
Merge pull request #106454 from s-urbaniak/psa-e2e
test/e2e: let e2e tests configure namespace labels
2022-03-28 14:19:43 -07:00
Davanum Srinivas
5b1086b897
Add some sudo in local-up-cluster.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-03-28 16:57:05 -04:00
Kubernetes Prow Robot
24cb73bb90
Merge pull request #109018 from wojtek-t/deprecate_dropped_requests
Deprecate apiserver_dropped_requests_total metric
2022-03-28 13:01:33 -07:00
Kubernetes Prow Robot
6c1b7d9543
Merge pull request #108713 from jiahuif-forks/feature/openapi/intstr-any-of
use oneOf for IntOrString and Quantity in OpenAPI v3
2022-03-28 13:01:21 -07:00
Kubernetes Prow Robot
3a3c9bc5c0
Merge pull request #108282 from sftim/20220222_reword_types_container_runtime_neutral
Update types to be neutral about container runtime
2022-03-28 13:01:08 -07:00
Jiahui Feng
84ef463481 remove feature gate from tests. 2022-03-28 12:40:45 -07:00
Tim Allclair
d2f53a0856 Delete dead code 2022-03-28 11:51:59 -07:00
Jiahui Feng
db3ec322d7 mark ControllerManagerLeaderMigration as GA. 2022-03-28 11:34:30 -07:00
Mayank Kumar
2733b66e80 add maxUnavailable implementation and UT 2022-03-28 11:01:05 -07:00
Mayank Kumar
357203d992 API: maxUnavailable for StatefulSet 2022-03-28 11:01:05 -07:00
Lubomir I. Ivanov
c9386abd5f kubeadm: add etcd flag for member data consistency
Include the flag "--experimental-initial-corrupt-check"
in etcd static pod manifests to ensure
etcd member data consistency.

The etcd feature is planned for graduation in 3.6,
at which point we should switch to using the flag
without the "experimental" prefix.
2022-03-28 20:47:49 +03:00
Tim Allclair
c3a68d5de8 Audit annotations mutex 2022-03-28 17:21:14 +00:00
Alexander Zielenski
52f7fd6534
update kubeadm restrictions to include v3 2022-03-28 10:07:56 -07:00
Alexander Zielenski
bb799d9706
update vendor
client-go depends on more of kube-openapi v3 now
2022-03-28 10:07:56 -07:00
Alexander Zielenski
075866b3e3
add fetching into discovery client for OpenAPI v3
reflect latest struct changes

use correct discovery openapi test data layout

make the OpenAPIv3 interface less blue

field grouping

add copyrights

implement cached discovery client

add cached discovery tests

address review feedback
2022-03-28 10:02:41 -07:00
Hemant Kumar
6bc8275677 Add node name to NodeExpand events 2022-03-28 12:58:59 -04:00