Commit Graph

304 Commits

Author SHA1 Message Date
Katrina Verey
0fa010c7e7 Add missing boilerplate 2022-04-04 14:24:04 -04:00
Katrina Verey
71bf0d5d14 Update full linter list and enable some easily resolved new ones 2022-03-31 11:37:26 -04:00
Katrina Verey
14947e449b Address new linter complaints 2022-03-31 11:37:26 -04:00
Katrina Verey
5c359bda28 Go 1.18 compatibility updates 2022-03-30 17:57:48 -04:00
Natasha Sarkar
e8640724a9 Merge pull request #4497 from m-Bilal/fix-3812
Fix 3812; Error message changed and check for MalformedYamlError
2022-03-24 09:55:44 -07:00
roopeshvs
d1d578c392 support for multiple replacements in a single file 2022-03-04 12:46:45 +05:30
Mohd Bilal
3eae520532 test case added 2022-02-27 08:11:42 +00:00
Mohd Bilal
3ec7b10bc0 Error message corrected 2022-02-27 07:48:55 +00:00
Sylvain Rabot
2f17803c0a Fix pseudo git HTTP urls broken since 59c82659 (#4453)
* Fix pseudo git HTTP urls broken since 59c82659

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>

* Add test for Git resources using HTTP URLs

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2022-02-09 14:23:49 -08:00
Katrina Verey
a86723c3a3 Fix regression 4388 2022-02-02 12:36:03 -05:00
natasha41575
2c23b960ff set transformer annotation when the option is specified 2022-01-19 17:17:47 -08:00
Kubernetes Prow Robot
6e5d2674ce Merge pull request #4377 from natasha41575/managedBy
deprecate enable-managedby-label flag in favor of a field
2022-01-19 17:03:51 -08:00
natasha41575
2554d690c8 deprecate enable-managedby-label flag in favor of a field 2022-01-19 16:53:27 -08:00
Natasha Sarkar
b0636459dd Revert "[fix] configMapGenerator: extra space in end of line gives "\n" instead of line breaks" 2022-01-12 09:30:41 -08:00
Kubernetes Prow Robot
13e26004fd Merge pull request #4357 from natasha41575/TransformerAnnotations
define methods, types, and unit tests for transformer annotations
2022-01-10 15:32:28 -08:00
Kubernetes Prow Robot
1c5ce6975f Merge pull request #4312 from m-Bilal/fix-4240
Fixes 4240; added null check on namespace when resource is a RoleBinding
2022-01-10 09:43:13 -08:00
m-Bilal
7674c220b1 Improved error message and test cases for 4240 2022-01-09 19:05:49 +05:30
Kubernetes Prow Robot
59c8268245 Merge pull request #4334 from sylr/handle-http-errors
Handle HTTP error codes in file loader
2021-12-30 16:18:51 -08:00
natasha41575
4f21d60045 helper methods, types, and unit tests for transformer annotations 2021-12-29 15:27:34 -08:00
natasha41575
987437857f test coverage for origin annotations for generated resources 2021-12-28 12:41:47 -08:00
Natasha Sarkar
964bb38ba2 add origin annotation for resources generated by generators (#4341)
* add origin annotation for resources generated by builtin and custom generators

* decouple origin data from generator data and account for inline generators
2021-12-23 10:40:29 -08:00
Kubernetes Prow Robot
233f1a3c2a Merge pull request #4344 from natasha41575/ResIdStr
improve gvk and resid strings for error messages
2021-12-22 12:27:03 -08:00
Kubernetes Prow Robot
75de98e2ef Merge pull request #4055 from lstoll/lstoll-unrelated-name-reference
ConfigMapGenerator should not update unrelated ClusterRole rule
2021-12-22 12:15:04 -08:00
Julian
3dbc88bf94 Refactor the PrefixSuffixTransformer into separate prefix- and suffix transformers (#4318)
* Refactor prefix filter into its own filter, decoupled from the prefixsuffix filter

* Refactor prefix transformer into its own transformer, decoupled from the prefixsuffix transformer

* Refactor suffix filter into its own filter, decoupled from the prefixsuffix filter

* Refactor suffix transformer into its own transformer, decoupled from the prefixsuffix transformer

* Add a default nameSuffix field spec in addition to the namePrefix

* Remove the PrefixSuffixTransformer from the list of builtin transformers

* Add a multi-transformer to builtinhelpers.TransformFactories

* Remove the implementation of the prefixsuffixtransformer.PrefixSuffixTransformer

* Resolve style and format related feedback from the pull request

* Add test to test the legacy PrefixSuffixTransformer for BC purposes
2021-12-22 12:01:06 -08:00
Katrina Verey
d701792aa1 Update test demonstrating bug to pass, update comments 2021-12-22 14:53:50 -05:00
Lincoln Stoll
4079056501 ConfigMapGenerator should not update unrelated ClusterRole rule
When using the ConfigMap generator, a lease object entry is updated with the
generated configmap name. This should not happen as it's an unrelated object
type.

As a workaround a unique name can be used for the ConfigMap.

Fails on kustomize version 4.2.0 and kubectl version v1.21.2
2021-12-22 14:47:40 -05:00
natasha41575
6dfc238aa2 improve gvk and resid strings for error messages 2021-12-22 11:39:07 -08:00
Sylvain Rabot
16495c6ed7 Test HTTP Error thrown by the file loader
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-12-10 09:28:54 +01:00
natasha41575
a3d547ccd3 fix issue with multiline configmap data with extra space 2021-12-03 15:28:22 -08:00
natasha41575
c4a8a99834 add regression tests for multiline configmap with space 2021-12-03 15:12:21 -08:00
Yuwen Ma
a1c5d79d94 Move api/builtin to internal 2021-11-22 15:54:18 -08:00
Julian van den Berkmortel
b6cb6c8ae9 fix build annotations getting lost after applying JSON 6902 patch 2021-11-10 23:02:42 +01:00
Julian van den Berkmortel
b16e4ec566 add test to demonstrate internal annotations getting lost (#4111) 2021-11-10 21:33:50 +01:00
natasha41575
ba051c863b fix issue with quote being dropped in configmap generation 2021-10-14 18:30:28 -07:00
natasha41575
4d59146e48 test for dropped quote in configmap generation 2021-10-14 18:13:49 -07:00
natasha41575
11e19a3d0f separate custom openapi test from the others 2021-10-04 18:48:54 -07:00
natasha41575
0d8c107362 fix issue with openapi schema from components 2021-09-27 17:00:14 -07:00
natasha41575
f30e45c549 test to demonstrate issue with openapi from components (#4179) 2021-09-27 16:29:08 -07:00
Jeff Regan
dd579c905d Merge pull request #4180 from yuwenma/fix-4124
[Fix 4124]  Skip local resource until all transformations have completed.
2021-09-24 08:05:19 -07:00
Kubernetes Prow Robot
c1ae234a64 Merge pull request #4163 from natasha41575/multipleGvksInOpenApi
support multiple gvks in custom openapi schema
2021-09-16 12:59:26 -07:00
Natasha Sarkar
02cb395ec2 support multiple gvks in custom openapi schema 2021-09-16 12:43:18 -07:00
Yuwen Ma
a100dca303 [Fix 4124] Add unittest with the given example. 2021-09-16 11:14:07 -07:00
Mateusz Gozdek
bf57d698b1 api/krusty: fix typo fileystem -> filesystem
Part of https://github.com/kubernetes/kubernetes/pull/104747.

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2021-09-05 11:33:10 +02:00
Natasha Sarkar
0244f0919e update name references after kind change 2021-09-02 12:10:01 -07:00
Natasha Sarkar
1e1b9b484a exec function working dir is the kustomization that referenced it (#4125)
* exec function working dir is the kustomization that referenced it

* suggested changes

* more code review

* use a field instead of an annotation

* more code review
2021-08-19 20:15:24 -07:00
Jeff Regan
28707bf5df Merge pull request #4065 from natasha41575/originDataAsAnnotation
option for origin data as annotation
2021-08-18 19:08:54 -07:00
Natasha Sarkar
3350c7213c option for origin data as annotation 2021-08-12 20:09:41 -07:00
Natasha Sarkar
38b2b33503 update openapi to v1.21.2 2021-08-10 10:30:12 -07:00
Natasha Sarkar
97e7cb1512 remove annotations added by the kyaml reader 2021-07-27 17:56:58 -07:00
Natasha Sarkar
0537b59f27 support yaml formatted openapi schema (#4017)
* support yaml formatted openapi schema

* suggested changes
2021-07-15 14:11:02 -07:00