Commit Graph

16099 Commits

Author SHA1 Message Date
R0CKSTAR
ae31c0423f Print pod.Spec.RuntimeClassName in kubectl describe
Signed-off-by: R0CKSTAR <yeahdongcn@gmail.com>
2022-07-01 16:24:37 +08:00
Kubernetes Prow Robot
8a7eda4f61 Merge pull request #110831 from chendave/openapi
Bump `kube-openapi` to the latest
2022-06-30 10:42:09 -07:00
Marcus Puckett
171431ca2c Move kubectl wait to informers with a cache to avoid hanging due to objects disappearing from the cluster (#108086)
* move to using informers for getObjAndCheckCondition

* move to using informers for IsDeleted

* update tests to handle new informer methodology

* set minimum timeout to 1s because informer can't handle less for caching reasons

* fix null return for deletes issue
2022-06-30 09:06:08 -07:00
Kubernetes Prow Robot
b2ed6ca64f Merge pull request #109479 from ardaguclu/new-kubecachedir-env
Introduce KUBECACHEDIR environment variable to override default discovery cache dir
2022-06-29 11:44:19 -07:00
Kubernetes Prow Robot
d0f5496d53 Merge pull request #110548 from benluddy/cel-unstructuredtoval-benchmark-fixture
Do test fixture setup outside cel.UnstructuredToVal benchmark loop.
2022-06-29 03:36:05 -07:00
Kubernetes Prow Robot
ab4aa182a5 Merge pull request #110398 from ardaguclu/flatten-rollout-status
Enable resource builder flattening in rollout status
2022-06-28 23:08:04 -07:00
Dave Chen
597071af17 Bump kube-openapi to the latest
This will help us to get rid of `Ginkgo` v1 dep.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-29 11:47:18 +08:00
Kubernetes Prow Robot
b5f202f0ed Merge pull request #110619 from ardaguclu/split-patching
(kubectl apply): Split patching types into functions and refactorings
2022-06-28 15:19:35 -07:00
Arda Güçlü
66c2f6069e Move resource lookup into its own function 2022-06-28 09:30:06 +03:00
Kubernetes Prow Robot
d550419496 Merge pull request #110549 from benluddy/skip-unused-oldself-activation-work
Only provide an oldSelf binding when referenced by a CEL rule.
2022-06-27 13:40:34 -07:00
Kubernetes Prow Robot
10810ab42b Merge pull request #110788 from 21kyu/change_reflect_ptr
Change reflect.Ptr to reflect.Pointer
2022-06-27 10:16:59 -07:00
Kubernetes Prow Robot
d9e7f25a80 Merge pull request #110668 from brianpursley/k-108630
Remove unused flags from kubectl run
2022-06-27 07:49:00 -07:00
21kyu
df168d5b5c Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
Kubernetes Prow Robot
1d22329de8 Merge pull request #110201 from aramase/kmsv2
Add KMS v2alpha1 API
2022-06-24 12:06:58 -07:00
Anish Ramasekar
907545445a Add KMS v2alpha1 API
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2022-06-24 17:58:34 +00:00
Kubernetes Prow Robot
6219eed24f Merge pull request #110535 from giuseppe/add-userns-CRI
kubelet: add CRI definitions for user namespaces
2022-06-24 09:16:56 -07:00
Kubernetes Prow Robot
411ecc3b62 Merge pull request #110764 from soltysh/improve_msg
Improve run and debug attach message upon failure
2022-06-24 02:27:09 -07:00
Kubernetes Prow Robot
e526241a9a Merge pull request #108833 from eltociear/patch-8
fix typo in genericapiserver.go
2022-06-24 02:26:57 -07:00
Giuseppe Scrivano
e8154ba52d kubelet: add CRI definitions for user namespaces
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-24 09:39:40 +02:00
Maciej Szulik
43c2ae479f Improve run and debug attach message upon failure 2022-06-24 09:14:27 +02:00
Kubernetes Prow Robot
487512bb56 Merge pull request #109510 from sugangli/pinhole-fw
Firewall Pinhole Fix for ILB and NetLB
2022-06-23 16:13:20 -07:00
Kubernetes Prow Robot
801bcfeea7 Merge pull request #110731 from jkh52/update-netproxy
Bump konnectivity-client to 0.0.32
2022-06-23 12:41:20 -07:00
Sugang Li
c64846da00 update kube-controller-manager dependencies 2022-06-23 18:07:18 +00:00
Sugang Li
84903d4b84 add ILB and NetLB pinhole changes 2022-06-23 18:07:15 +00:00
cpanato
ab810a7f85 remove release-1.20 from prom bot due to eol
Signed-off-by: cpanato <ctadeu@gmail.com>
2022-06-23 18:04:17 +02:00
Kubernetes Prow Robot
dee37aacc1 Merge pull request #110652 from Abirdcfly/fixchunksize
fix: --chunk-size with selector returns missing result
2022-06-22 18:21:43 -07:00
Joseph Anttila Hall
f5c584a020 Bump konnectivity-client to 0.0.32 2022-06-22 17:22:42 -07:00
Kubernetes Prow Robot
ddfbb5bdbe Merge pull request #110724 from pohly/klog-update
build: update to klog v2.70.0
2022-06-22 17:03:54 -07:00
Abirdcfly
fba297629d fix: --chunk-size with selector returns missing result
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-23 07:07:13 +08:00
Kubernetes Prow Robot
1d81106534 Merge pull request #110425 from LY-today/fake-evict-list-err
fix: list pod err after an pod evicted
2022-06-22 15:55:42 -07:00
Kubernetes Prow Robot
e2fe430da7 Merge pull request #109632 from weilaaa/recorrect_byindex_input_param
correct input params of ByIndex
2022-06-22 09:29:43 -07:00
LY-today
f299494e79 fix: list pod err after an pod evicted
Signed-off-by: LY-today <724102053@qq.com>
2022-06-22 23:30:40 +08:00
Patrick Ohly
f05e327ca6 build: update to klog v2.70.0
The main practical advantage is that klog.Fatal no longer dumps the backtrace
of all goroutines.
2022-06-22 16:29:51 +02:00
Arda Güçlü
be5f7c051b Update dependencies for kubectl 2022-06-22 10:35:36 +03:00
Arda Güçlü
22b43d4edb Use error wrapping in patchSimple 2022-06-22 10:22:27 +03:00
Arda Güçlü
4ed5653a0b Move getPatchType logic back to main function 2022-06-22 09:35:49 +03:00
weilaaa
9847b2eeb4 correct input params and add godoc 2022-06-22 11:26:07 +08:00
Kubernetes Prow Robot
1ceca7b139 Merge pull request #110646 from thockin/rest-init-uid-early
Initialize UID earlier in the Create process
2022-06-21 11:06:38 -07:00
Brian Pursley
25e713ba77 Remove unused flags from kubectl run
The following flags, which do not apply to kubectl run,
have been removed:
--cascade
--filename
--force
--grace-period
--kustomize
--recursive
--timeout
--wait

These flags were being added to the run command to support
pod deletion after attach, but they are not used if set, so
they effectively do nothing.

This PR also displays an error message if the pod fails to be
deleted (when the --rm flag is used).  Previously any error
during deletion would be suppressed and the pod would remain.

This PR also adds some unit tests for run and attach with and
without the --rm flag.  As such, some minor refactoring of the
run command has been done to support mocking dependencies.
2022-06-21 10:51:30 -04:00
Arda Güçlü
d336f7df87 Stop passing source as parameter
This commit removes passing source field as parameter. Instead,
this commit returns error verb and error functions to caller function.
Caller function can add source field by generating correct message.
2022-06-20 10:04:18 +03:00
Tim Hockin
5615de51f9 Initialize UID earlier in the Create process
Before:
  Create()
      BeginCreate()
      BeforeCreate()
          init UID <---------------------
          strategy code

After:
  Create()
      init UID <-------------------------
      BeginCreate()
      BeforeCreate()
          strategy code

This also wipes UID early (suggested by David) and asserts it is set in
BeforeCreate().
2022-06-18 18:47:23 -07:00
Kubernetes Prow Robot
dbb6c77de4 Merge pull request #110108 from ialidzhikov/fix/typo
Nit: Fix a typo
2022-06-17 14:52:02 -07:00
Patrick Ohly
4c6338ac0f logs: replace config methods with functions
API types are only supposed to have methods related to serialization.
2022-06-17 20:22:13 +02:00
Patrick Ohly
ea3f25f49b logs: add alpha+beta feature gates
It is useful to have the ability to control whether alpha or beta features are
enabled. We can group features under LoggingAlphaOptions and LoggingBetaOptions
because the configuration is designed so that each feature individually must be
enabled via its own option.

Currently, the JSON format itself is beta (graduated in 1.23) but additional
options for it were only added in 1.23 and thus are still alpha:

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M --feature-gates LoggingBetaOptions=false
  [format: Forbidden: Log format json is BETA and disabled, see LoggingBetaOptions feature, options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

  $ go run ./staging/src/k8s.io/component-base/logs/example/cmd/logger.go --logging-format=json --log-json-split-stream --log-json-info-buffer-size 1M
  [options.json.splitStream: Forbidden: Feature LoggingAlphaOptions is disabled, options.json.infoBufferSize: Forbidden: Feature LoggingAlphaOptions is disabled]

This is the same approach that was taken for CPUManagerPolicyAlphaOptions and
CPUManagerPolicyBetaOptions.

In order to test this without modifying the global feature gate in a test file,
ValidateKubeletConfiguration must take a feature gate as argument.
2022-06-17 20:22:13 +02:00
Patrick Ohly
1aceac797d logs: make LoggingConfiguration an unversioned API
Making the LoggingConfiguration part of the versioned component-base/config API
had the theoretic advantage that components could have offered different
configuration APIs with experimental features limited to alpha versions (for
example, sanitization offered only in a v1alpha1.KubeletConfiguration). Some
components could have decided to only use stable logging options.

In practice, this wasn't done. Furthermore, we don't want different components
to make different choices regarding which logging features they offer to
users. It should always be the same everywhere, for the sake of consistency.

This can be achieved with a saner Go API by dropping the distinction between
internal and external LoggingConfiguration types. Different stability levels of
indidividual fields have to be covered by documentation (done) and potentially
feature gates (not currently done).

Advantages:

- everything related to logging is under component-base/logs;
  previously this was scattered across different packages and
  different files under "logs" (why some code was in logs/config.go
  vs. logs/options.go vs. logs/logs.go always confused me again
  and again when coming back to the code):

  - long-term config and command line API are clearly separated
    into the "api" package underneath that

  - logs/logs.go itself only deals with legacy global flags and
    logging configuration

- removal of separate Go APIs like logs.BindLoggingFlags and
  logs.Options

- LogRegistry becomes an implementation detail, with less code
  and less exported functionality (only registration needs to
  be exported, querying is internal)
2022-06-17 20:22:13 +02:00
Patrick Ohly
5fe00c14be logs: move code in preparation for v1 api 2022-06-17 20:06:14 +02:00
Patrick Ohly
18bf5d23f1 logs: simplify flush daemon startup
StartFlushDaemon can be called more than once. We can take advantage of that an
eliminate the tracking of where we need to start it.
2022-06-17 20:06:14 +02:00
Swati Sehgal
22ff20a0a0 staging-readme: Document the need to add doc.go in a staging repo
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-06-16 13:48:13 +01:00
Arda Güçlü
15512210e3 (kubectl apply): Split patching types into functions and refactorings
Patch type determination is done by checking existence
of resource in schema and if it exists, it uses strategic merge patch.
Otherwise, like for CRDs, it uses merge patch type.

Currently, this code portion is not easily extensible and this PR
splits required checks into their own function to increase extensibility.
2022-06-16 11:35:11 +03:00
Kubernetes Prow Robot
549e1b4fb6 Merge pull request #110448 from twilight0620/test0608
add some uts of group_version.go
2022-06-15 18:50:48 -07:00