Commit Graph

6464 Commits

Author SHA1 Message Date
Roopesh V S
433be59ea7 ignore pr code checks for docs only changes 2023-09-18 19:49:11 +05:30
yugo kobayashi
59696d1ace fix a patch files accept multiple patches (#5194)
* fix a patch files accept multiple patches

* fix comments and variable name

* add error handling when using not allowed multiple strategic-merge patches

* fix error message of Multiple Strategic-Merge Patch file

* refactor transformStrategicMerge()

* add TODO comment and test for Multiple JSON patch Yaml documents are not allowed

* refactoring PatchTransformer

* add multiple patch test for PatchTransformer package

* improve error message to PatchTransformer

* refactor const and error message check

* fix some error messages
2023-09-15 16:20:13 -07:00
Kubernetes Prow Robot
56d37acc7d Merge pull request #5261 from varshaprasad96/refactor/image
[Refactor] Move image to internal
2023-09-13 10:22:12 -07:00
Anna Song
7c36ed21b3 Document AnnotationsTransformer (#5247)
* Restructure existing Reference docs

Restructure Reference section for site to better match k8s.io. Change
descriptions to complete sentences. Improve instructions to locally load
site.

* Document AnnotationsTransformer on site

Dcoument AnnotationsTransformer API under Reference on site.

* Document required fields

Document required fields and explain effects of optional ones.

* Make site setup instructions more explicit

* Link required K8s fields
2023-09-08 20:54:10 -07:00
Ed Overton
985835f96f perf: limit initSchema calls from openapi.IsNamespaceScoped (#5076)
* test: add openapi.IsNamespaceScoped benchmark

Add a benchmark test for IsNamespaceScoped performance when the default
schema is in use.

* perf: limit initSchema calls from openapi.IsNamespaceScoped

Avoid calling initSchema from openapi.IsNamespaceScoped when possible.
Work done in #4152 introduced a precomputed namespace scope map based on
the default built-in schema. This commit extends that work by avoiding
calls to initSchema when a resource is not found in the precomputed map
and the default built-in schema is in use. In those cases, there is no
benefit to calling initSchema since the precomputed map is exactly what
will be calculated by parsing the default built-in schema.

* fix: delay parsing of default built-in schema

When namespace scope can be determined by the precomputed map but the
type is not present in the precomputed map, delay the parsing of the
default built-in schema.

If the schema to be initialized is the default built-in schema and the
type is not in the precomputed map, then the type will not be found in
the default built-in schema. There is no need to parse the default
built-in schema for that answer; its parsing may be delayed until it
is needed for some other purpose.

In cases where the schema is used solely for namespace scope checks, the
schema might not ever be parsed. Skipping the parsing reduces both
execution time and memory use.

* fix: correct openapi.go's schemaNotParsed value

openapiData initializes with defaultBuiltInSchemaParseStatus set to 0,
so schemaNotParsed should have 0 as its value.
2023-09-08 12:34:30 -07:00
Kubernetes Prow Robot
f81765b96e Merge pull request #5320 from natasha41575/updatedeps
small fixes
2023-09-08 10:06:14 -07:00
natasha41575
a2ceaff053 small fixes 2023-09-08 11:38:23 -05:00
Kubernetes Prow Robot
94181b1be7 Merge pull request #5291 from irvifa/refactor/remove-setters-config-from-kyaml
refactor: Remove setters from kyaml
2023-09-08 07:54:14 -07:00
Kubernetes Prow Robot
169fdd7330 Merge pull request #5196 from ephesused/issue4928-append-honors-key-style
fix: patch additions honor source key style
2023-09-01 09:06:33 -07:00
Ed Overton
78b8139d46 Merge branch 'master' into issue4928-append-honors-key-style 2023-08-30 12:30:49 -04:00
Kubernetes Prow Robot
76f8d2828b Merge pull request #5197 from skitt/json-patch.v5
Switch to json-patch v5
2023-08-28 09:35:45 -07:00
Stephen Kitt
b692e49b1e Switch to json-patch v5
json-patch was bumped to v5 in k/k as a result of
https://github.com/kubernetes/kubernetes/pull/118384; this aligns with
that, but switches to the v5 module, which is documented as
gopkg.in/evanphx/json-patch.v5.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
2023-08-26 08:42:07 +02:00
Kubernetes Prow Robot
bd7f001c26 Merge pull request #5239 from koba1t/chore/change_release_flow
change release flow from using goreleaser to build scripts
2023-08-25 11:54:52 -07:00
Kubernetes Prow Robot
d6ff768298 Merge pull request #5262 from varshaprasad96/refactor/konfig
[Refactor] Internalize konfig constants
2023-08-25 10:18:52 -07:00
Irvi Aini
4947a905fa refactor: Remove setters from kyaml
Kind:

Refactor

Summary:

Setters functionality is provided as a KRM function. We should remove code related to setters in cmd/config and kyaml.
As of now most setters2 and setters usage are related to fork of kpt, however, these:
[fluxcd/image-automation-controller](6827808a1a/pkg/update/filter.go (L24)) with [kyml](6827808a1a/go.mod (L42))
[rancher/fleet](0a6cf6cb92/internal/cmd/controller/controllers/image/update/setters.go (L16)) with [kyaml](0a6cf6cb92/go.mod (L75))

Repositories still using them, They pinned these two into a specific kyaml version. If we decide to go for this removal then we can make a release note that this is actually removed on the next version since we already marked this as deprecated before.
2023-08-24 00:39:47 +08:00
Kubernetes Prow Robot
cd9a16cfab Merge pull request #5273 from natasha41575/pm
add description of PM role to contributing doc
2023-08-22 14:11:55 -07:00
natasha41575
02a53f193d add description of PM role to contributing doc 2023-08-22 15:11:53 -05:00
koba1t
b1717c8a97 change_release_flow_to_build_scripts 2023-08-17 22:57:44 +09:00
Kubernetes Prow Robot
911ddcda40 Merge pull request #5263 from bugoverdose/fix/reject-on-id-change
Fix `reject` needing both current and previous ids
2023-08-14 09:19:22 -07:00
Jeong Jinwoo
9f1d5acdc8 fix: check both prev and current ids for filtering reject targets 2023-08-11 21:37:55 +09:00
Jeong Jinwoo
9756d92a91 test: demonstrate reject not working on targets with changed id 2023-08-11 21:37:07 +09:00
Natasha Sarkar
d32d1937e6 Merge pull request #5254 from natasha41575/unpineverything
release cleanup
2023-08-10 12:03:25 -05:00
Varsha Prasad Narsing
ddcbae54ab [Refactor] Internalize konfig constants
This PR is an effort towards internalizing public APIs.
It moves some of the builtinconstants to internal/

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
2023-08-09 14:14:48 -04:00
Varsha Prasad Narsing
ca748faa3f [Refactor] Move image/ to internal
This PR is an effort towards reducing the public surface
of APIs. It move image/ to internal/image

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
(cherry picked from commit 1f5890709fdc17de6f44f42b5138dd0f7e64bc74)
2023-08-09 13:40:07 -04:00
Kubernetes Prow Robot
5e6cbac589 Merge pull request #5203 from varshaprasad96/add/goapi-diff
[Chore] Enable go-api-diff checker
2023-08-07 08:42:32 -07:00
natasha41575
ff75dd6cd5 release cleanup 2023-07-31 12:27:44 -05:00
Natasha Sarkar
f8391994b4 Merge pull request #5253 from natasha41575/pincmdconfigandapi
pin to cmd/config and api
kustomize/v5.1.1
2023-07-31 11:49:43 -05:00
natasha41575
5ce14e5024 pin to cmd/config and api 2023-07-31 11:28:25 -05:00
Natasha Sarkar
ee22c9cab7 Merge pull request #5252 from natasha41575/pinkyaml
pin to kyaml 0.14.3
2023-07-31 11:24:02 -05:00
natasha41575
4a893ce8c6 pin to kyaml 2023-07-31 11:08:00 -05:00
Kubernetes Prow Robot
9ce923ebeb Merge pull request #5245 from yedayak/customization-typo
Fix typo in help for the create subcommand
2023-07-25 12:47:57 -07:00
Yedaya
494a807f28 Fix typo in help for the create subcommand 2023-07-18 09:58:14 +03:00
Varsha Prasad Narsing
820f17c73b [Chore] Enable go-api-diff checker
This PR introduces go-api-diff checker in Makefile
and in CI to make sure we don't end up breaking APIs
unintentionally.

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
2023-07-12 13:55:07 -04:00
Kubernetes Prow Robot
cd7ba1744e Merge pull request #5189 from annasong20/test-relative-submodules
Add test for issue #5131
2023-07-12 10:03:13 -07:00
Anna Song
da4e881007 Add accumulateResources error tests for local files (#5225)
* Add accumulateResources error tests for local files.

Add tests demonstrating accumulateResources errors when the resource is
a local file. Works to address #4807.

* Improve readability
2023-07-01 11:46:49 -07:00
Natasha Sarkar
878cda7c55 Merge pull request #5215 from natasha41575/unpin
release cleanup
2023-06-19 12:23:20 -05:00
natasha41575
47327616df update latest release version 2023-06-19 12:06:16 -05:00
natasha41575
eeff67d88d unpin everything 2023-06-19 12:05:59 -05:00
Natasha Sarkar
6adf4f294a Merge pull request #5214 from natasha41575/pintoapi
pin to api
kustomize/v5.1.0
2023-06-19 11:53:36 -05:00
natasha41575
5e7cc3437d pintoapi 2023-06-19 11:35:33 -05:00
Natasha Sarkar
ded76df3af Merge pull request #5213 from natasha41575/pintocmdconfig
pin to cmd/config
api/v0.14.0
2023-06-19 11:24:40 -05:00
natasha41575
d7362ed22d pin to cmd/config 2023-06-19 11:07:36 -05:00
Natasha Sarkar
4711bfe40c Merge pull request #5212 from natasha41575/pintokyaml
pin to kyaml
cmd/config/v0.11.3
2023-06-19 11:02:27 -05:00
natasha41575
8c0e0b3b47 pin to kyaml 2023-06-19 10:45:18 -05:00
Ed Overton
096b2c4435 test: add psm test for different key types 2023-06-15 16:12:29 -04:00
Anna Song
129d0f90af Add test for issue #5131 2023-06-14 18:32:12 +00:00
Ed Overton
c76fd5eb85 test: update psm key style test 2023-06-13 14:50:22 -04:00
Kubernetes Prow Robot
9e42f8d57e Merge pull request #5177 from annasong20/test-accumulate-remote-file
Test accumulateResources errors for remote files
kyaml/v0.14.3
2023-06-13 07:33:59 -07:00
Anna Song
168e31bfb6 Add accumulateResources remote file error tests
Test accumulateResources errors when a remote file fails to load. This
is part of the effort to fix issue #4807.
2023-06-09 21:31:27 +00:00
Ed Overton
691b7d1df3 fix: patch additions honor source key style
When a patch appends a new node, it should honor the key style from the
patch. Prior to this commit, no style was applied, leading to problems
when the key value could be interpreted as a different type based on its
content. For example, "9110" needs quoting to ensure it is seen as a
string in yaml.
2023-06-08 17:21:46 -04:00