Commit Graph

17407 Commits

Author SHA1 Message Date
Arda Güçlü
369534c6ec kubectl wait: wire generic context (#114574)
* Wire generic context to better handle timeout

* Add integration test for wait timeout

* kubectl wait: Fix integration test always passing issue

Currently, `kubectl wait` integration test always passes even if
it gets an error. Problem is object check is done after errexit is
turned off.

This PR redirects error to output and correctly assures that
object is expected status and if it is not, test should fail.
2022-12-19 09:21:56 -08:00
Kubernetes Prow Robot
0783cf49e8 Merge pull request #114291 from MaxHorstmann/master
#79612 fix(client-go): return error in fake discovery
2022-12-19 09:21:44 -08:00
Jordan Liggitt
78cb3862f1 Fix indentation/spacing in comments to render correctly in godoc 2022-12-17 23:27:38 -05:00
Kubernetes Prow Robot
2f2021e208 Merge pull request #114412 from thockin/api_warn_workloads_name_not_dnslabel
Issue API warnings when workload names are not DNS labels
2022-12-16 18:07:41 -08:00
Kubernetes Prow Robot
0f7409a230 Merge pull request #114190 from tkashem/cors-refactor
refactor CORS handler
2022-12-16 13:08:09 -08:00
Tim Hockin
276c7e860d Change DNS Label validation to check for dots
This will produce a better error message for the more common case of
using a DNS subdomain where a label is needed.
2022-12-16 13:01:02 -08:00
Julianne DeMars
94fd5bd553 Skip resize if fs is readonly (#114325)
* skip resize if fs is readonly

* run formatter + add log line for early return case

* fix error
2022-12-16 03:26:27 -08:00
Kubernetes Prow Robot
b44cbbdcb2 Merge pull request #114266 from dobsonj/vclib-index-out-of-range
legacy-cloud-providers: prevent index out-of-range in getNextUnitNumber
2022-12-15 13:21:36 -08:00
Kubernetes Prow Robot
843b40aeb4 Merge pull request #113985 from lavalamp/improved-has-synced
Propagate HasSynced properly
2022-12-15 12:15:47 -08:00
Kubernetes Prow Robot
3d3a180713 Merge pull request #113942 from mengjiao-liu/remove-feature-gate-expansion
Remove volume expansion feature gates
2022-12-15 10:05:38 -08:00
Abu Kashem
ea251b5605 apiserver: refactor cors filter 2022-12-15 08:59:10 -05:00
Abu Kashem
ae7327ab8e apiserver: refactor cors unit test 2022-12-15 08:59:09 -05:00
Mengjiao Liu
ba9dbe3a07 Remove ExpandCSIVolumes feature gate 2022-12-15 11:43:44 +08:00
Daniel Smith
8100efc7b3 Enable propagration of HasSynced
* Add tracker types and tests
* Modify ResourceEventHandler interface's OnAdd member
* Add additional ResourceEventHandlerDetailedFuncs struct
* Fix SharedInformer to let users track HasSynced for their handlers
* Fix in-tree controllers which weren't computing HasSynced correctly
* Deprecate the cache.Pop function
2022-12-14 18:43:33 +00:00
Max Horstmann
b47748103a client-go: properly return error in fake discovery (#79612)
Fake discovery should return an error if an error-returning reactor was prepended.

This is relevant e.g. for unit tests which test a function which relies
on discovery to check if an API Server is available.

Matches existing behavior of other fake types, for example fake_namespace.

Adds unit test coverage as well.
2022-12-14 11:41:10 -05:00
Ernest Wong
a4e4cec28f Bump github.com/aws/aws-sdk-go to v1.44.147 2022-12-14 14:18:46 +00:00
xin.li
c95d5d5147 fix: remove ioutil for new go version
Signed-off-by: xin.li <xin.li@daocloud.io>
2022-12-14 09:38:09 +08:00
Kubernetes Prow Robot
25efa7701a Merge pull request #114459 from alexzielenski/apiserver/discovery/aggregator-deadlock
fix double lock and excercise its codepath in tests
2022-12-13 15:59:46 -08:00
Kubernetes Prow Robot
3ceb213fc1 Merge pull request #113508 from p-slavcheva/fix-diff-osexit
Replace os.Exit in diff
2022-12-13 15:59:34 -08:00
Andy Goldstein
beb7d6cff1 CRConverter: change to UnstructuredList
Change the CRConverter interface to use *unstructured.UnstructuredList
for input/output to simplify what converter implementers must implement.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-13 14:52:39 -05:00
Andy Goldstein
0976267f0f Make empty unstructured check common
Move the empty unstructured object check from the webhook converter to
the delegating converter, so other converters don't have to repeat the
same logic.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-13 14:46:28 -05:00
Andy Goldstein
0bdcb93b06 Create new conversion Factory interface
Create a new conversion Factory interface for CRDs, and split out
NewDelegatingConverter as a standalone package-level function, instead
of being part of CRConverterFactory.

Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-13 14:38:21 -05:00
Andy Goldstein
02f8c48f75 Rename crConverterInterface to CRConverter
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2022-12-13 14:38:05 -05:00
Alexander Zielenski
7510afb72c fix double lock and excercise its codepath in tests
would cause a deadlock if an aggregated apiserver decided to respect ETags for its aggregated discovery document,
2022-12-13 10:01:06 -08:00
Kubernetes Prow Robot
eaa7e1c775 Merge pull request #114435 from seans3/openapi-getter-refactor
Unexport OpenAPIGetter factory method
2022-12-13 08:39:45 -08:00
petya.slavcheva1
2dce194e16 Replace os.exit in diff 2022-12-13 14:27:35 +01:00
Kubernetes Prow Robot
6ae43ffa6d Merge pull request #110252 from swatisehgal/add-security-contact
Noderesourcetopology- api: Repo Bootstrap
2022-12-13 04:43:34 -08:00
Sean Sullivan
1da46b2f28 Unexport OpenAPIGetter factory method 2022-12-12 19:07:59 -08:00
Kubernetes Prow Robot
923ee203f3 Merge pull request #110991 from thockin/svc-typenames-starTrafficPolicyType
Svc typenames star traffic policy type
2022-12-12 18:47:33 -08:00
Kubernetes Prow Robot
49b57ce1e2 Merge pull request #113570 from ztzxt/batch-api-doc
Fix documentation for referenced Batch v1 and v1beta1 API fields
2022-12-12 17:41:44 -08:00
Kubernetes Prow Robot
178f4e2461 Merge pull request #113040 from ardaguclu/rollout-restart-nano
rollout restart: Change error message to more descriptive
2022-12-12 17:41:32 -08:00
Kubernetes Prow Robot
75ec79e30b Merge pull request #112497 from ldsdsy/modify3
update comment of annotation_key_constants.go
2022-12-12 16:35:33 -08:00
Kubernetes Prow Robot
76c93b71b5 Merge pull request #114413 from seans3/refactor-validator
Refactor to simplify factory Validator
2022-12-12 15:19:55 -08:00
Kubernetes Prow Robot
472612ccc6 Merge pull request #114191 from apelisse/uds-pprof
Allow profiling information to be served on Unix-Domain Socket
2022-12-12 15:19:44 -08:00
Kubernetes Prow Robot
d581dee37f Merge pull request #114378 from qingwave/cel-metrics
cleanup: add help information for apiserver cel metrics
2022-12-12 11:44:04 -08:00
Kubernetes Prow Robot
832f98f199 Merge pull request #114163 from ritazh/encryption-godoc
Update the godoc on the encryption config API on how to specify group…
2022-12-12 11:43:45 -08:00
Swati Sehgal
c6b29a0b05 nrt-api: Update nrt-api go.mod and update vendor directory
```
./hack/update-vendor.sh
```

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 17:02:04 +00:00
Swati Sehgal
fa1f7470c8 nrt-api: Update publishing-bot rules.yaml
rules.yaml captures the dependencies of the repo and is used by
the publishing-bot to publish the staging repository.

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:32 +00:00
Swati Sehgal
4ff3f03748 nrt-api: Add doc.go
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:32 +00:00
Swati Sehgal
2ee2137fc5 nrt-api: Add noderesourcetopology-api to list of staging repos
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:32 +00:00
Swati Sehgal
6df5827f12 nrt-api: Add manifest directory for example manifests
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:32 +00:00
Swati Sehgal
5c4fdb7fec nrt-api: Add hack directory for generation of autogenerated code
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:31 +00:00
Swati Sehgal
8594b2271f nrt-api: Indicate that PRs are not directly accepted to the repo
- Add contributing.md
- Add .github/PULL_REQUEST_TEMPLATE.md
2022-12-12 16:48:31 +00:00
Swati Sehgal
bd8f4680b7 nrt-api: Add all mandatory template files to the staging repo
- Add OWNERS and SECURITY_CONTACTS
- Add LICENSE file
- Add README.md
- Add code-of-conduct.md

Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2022-12-12 16:48:31 +00:00
Rita Zhang
c085031a8f Update the godoc on the encryption config API on how to specify group/resources to be encrypted
Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
2022-12-12 07:22:09 -08:00
Arda Güçlü
d0f558612a use io instead ioutil 2022-12-12 09:34:35 +03:00
Arda Güçlü
4699801d65 Add unit test for error case 2022-12-12 09:18:27 +03:00
Arda Güçlü
fb3d9e3ac9 rollout restart: Change error message to more descriptive
`rollout restart` command calculates patches according to the
`kubectl.kubernetes.io/restartedAt` annotation whose time format is
RFC3339. That is sufficient for users. However, if automated scripts
execute `rollout restart` in multiple times within second, commands fails
by returning an error "empty patch".

This PR changes error message to more descriptive format to warn users
that rollout restart does not work subsequent execution within second.
2022-12-12 09:18:26 +03:00
Sean Sullivan
5e8648b9f1 Refactor to simplify factory Validator 2022-12-11 18:20:28 -08:00
Tim Hockin
dd0a50336e ServiceInternalTrafficPolicyType: s/Type//
Rename ServiceInternalTrafficPolicyType => ServiceInternalTrafficPolicy
2022-12-11 13:48:31 -08:00