Commit Graph

6877 Commits

Author SHA1 Message Date
natasha41575
987437857f test coverage for origin annotations for generated resources 2021-12-28 12:41:47 -08:00
Kubernetes Prow Robot
1843b6f25f Merge pull request #4310 from sylr/upgrade-cobra
Upgrade cobra for better zsh support
2021-12-23 13:58:29 -08:00
Sylvain Rabot
31b7cf9e0a Upgrade cobra for better zsh support
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-12-23 19:49:24 +01: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
natasha41575
c659306ee2 don't surface entire node content in error message 2021-12-22 16:56:02 -08:00
Kubernetes Prow Robot
233f1a3c2a Merge pull request #4344 from natasha41575/ResIdStr
improve gvk and resid strings for error messages
kyaml/v0.13.1
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
Kubernetes Prow Robot
3608f335fd Merge pull request #3924 from monopole/architecture
Add ARCHITECTURE.md
2021-12-22 11:35:04 -08:00
Katrina Verey
56efec5abc Minor updates and clarifications 2021-12-22 14:23:00 -05:00
monopole
2a608bd71c Add ARCHITECTURE.md 2021-12-22 12:07:27 -05:00
Kubernetes Prow Robot
ee4b7847f0 Merge pull request #4221 from devstein/master
docs: Update Plugin Links
2021-12-20 16:37:07 -08:00
Kubernetes Prow Robot
ec38bbeb99 Merge pull request #4342 from natasha41575/moduleSpanDefault
Remove module span check
2021-12-15 11:45:51 -08:00
natasha41575
26999664e6 remove multi-module check 2021-12-15 11:06:38 -08:00
Kubernetes Prow Robot
c0b61b9442 Merge pull request #4332 from natasha41575/OriginCollection
collect origin data only when the option is set
2021-12-13 13:10:26 -08:00
Kubernetes Prow Robot
274a76fe84 Merge pull request #4267 from natasha41575/TransformerAnnotationsProposal
Proposal: Option for transformer annotations
2021-12-13 12:05:58 -08:00
natasha41575
a8f58b4080 collect origin data only when the option is set 2021-12-13 11:38:03 -08:00
natasha41575
542b7c7c4c proposal for transformer annotations option 2021-12-10 12:31:19 -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
Sylvain Rabot
738573b079 Error on HTTP resources are not nescessarly protocol related
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-12-10 09:27:37 +01:00
Sylvain Rabot
e65e571ed1 Do not try to load HTTP resources from FS when error occurs
It is useless and it clogs the error message.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-12-08 18:24:29 +01:00
Sylvain Rabot
49b464fd4d Handle HTTP error codes in file loader
GitHub release files like https://github.com/fluxcd/helm-controller/releases/download/v0.14.0/helm-controller.crds.yaml
seems to be hosted on Azure and it seems that there are egress limits that can be reached, e.g.:

```xml
<?xml version="1.0" encoding="utf-8"?><Error><Code>ServerBusy</Code><Message>Egress is over the account limit.
RequestId:f4a46b38-001e-0046-2437-ec16e2000000
Time:2021-12-08T13:28:03.8542138Z</Message></Error>
```

This patch allows to have a clear Error message instead of just `missing Resource metadata`:

```
Error: accumulating resources: accumulation err='accumulating resources from 'https://github.com/fluxcd/source-controller/releases/download/v0.19.0/source-controller.crds.yaml': URL returned error 503 (Service Unavailable)': evalsymlink failure on '/private/var/folders/hq/ttl6jyh539q55fz6282w0jyc0000gn/T/kustomize-3508224975/releases/download/v0.19.0/source-controller.crds.yaml' : lstat /private/var/folders/hq/ttl6jyh539q55fz6282w0jyc0000gn/T/kustomize-3508224975/releases: no such file or directory
```

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
2021-12-08 14:31:35 +01:00
Kubernetes Prow Robot
9a875add84 Merge pull request #4329 from natasha41575/configMapIssue
[fix] configMapGenerator: extra space in end of line gives "\n" instead of line breaks
2021-12-07 18:07:40 -08: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
Kubernetes Prow Robot
bc3b249489 Merge pull request #4328 from mengqiy/undeprecate
Remove the deprecation warning for a few RNode helpers
2021-12-03 14:12:36 -08:00
Mengqi Yu
cd2c6a1ad1 Remove the deprecation warning for a few RNode helpers
The Pipe method is not as intuitive as these helpers. These helpers
are convenient and useful. Deprecating them before we have better
alternatives is premature.
2021-12-03 11:47:34 -08:00
Kubernetes Prow Robot
8c6af9440c Merge pull request #4327 from mengqiy/fixanno
use internal.config.kubernetes.io prefix instead of internal.config.k8s.io
2021-12-03 10:02:27 -08:00
Mengqi Yu
6850408f6c update test for cmd/config 2021-12-02 14:00:45 -08:00
Mengqi Yu
ec445049be update tests for api 2021-12-02 14:00:32 -08:00
Mengqi Yu
646915cb86 use internal.config.kubernetes.io prefix instead of internal.config.k8s.io 2021-12-02 14:00:18 -08:00
Kubernetes Prow Robot
fe551be87b Merge pull request #4326 from natasha41575/deprecateStringAndDatePrefixer
deprecate StringPrefixer and DatePrefixer
2021-12-02 10:41:44 -08:00
natasha41575
30280f81af deprecate stringprefixer and dateprefixer 2021-12-02 10:30:56 -08:00
Kubernetes Prow Robot
8cb60f0c5d Merge pull request #4325 from sdowell/kyaml-fn-sort-results
feat: Add Sort method to kyaml fn Results
2021-12-02 10:01:33 -08:00
Sam Dowell
9d29f57789 feat: Add Sort method to kyaml fn Results
Issues: GoogleContainerTools/kpt#2195
2021-12-01 20:57:48 +00:00
Kubernetes Prow Robot
a3e1c99915 Merge pull request #4307 from sdowell/annotations-filter-set-entry
feat: Add SetEntryCallback to annotations filter
2021-11-29 18:20:56 -08:00
Sam Dowell
0fe1236e20 feat: Add SetEntryCallback to annotations filter
Add a configurable callback that is invoked each time an
annotation is applied by the annotations filter. This is useful
for scenarios such as tracking annotations as they are applied.

Issues: GoogleContainerTools/kpt#2448
2021-11-30 01:21:42 +00:00
m-Bilal
b28f1e55b7 fixes 4240; added null check on namespace when resource is a RoleBinding 2021-11-27 19:53:49 +05:30
Kubernetes Prow Robot
25ee506af4 Merge pull request #4300 from yuwenma/refactor-builtin
Move api/builtin to internal
2021-11-22 16:04:16 -08:00
Yuwen Ma
a1c5d79d94 Move api/builtin to internal 2021-11-22 15:54:18 -08:00
Kubernetes Prow Robot
de5210b43a Merge pull request #4299 from yuwenma/nameReference-doc
[Doc] Improve `nameReference`  docs, examples and builtin references.
2021-11-22 13:25:32 -08:00
Yuwen Ma
d9c4c749e2 improve docs with examples for nameReference 2021-11-22 13:10:13 -08:00
Natasha Sarkar
01420768c8 Merge pull request #4241 from Goodwine/kyaml-result-provider
Handle "Result" errors as non-fatal errors in kyaml FilterFuncs
2021-11-22 11:07:18 -08:00
Natasha Sarkar
d11342489a Merge pull request #4297 from mengqiy/anno
kyaml/fn/framework ensures the annotation output format matches the input
2021-11-19 12:37:01 -08:00
Mengqi Yu
bd7bad19a1 add to BuildAnnotations 2021-11-19 12:13:12 -08:00
Mengqi Yu
dfc627068b update tests for cmd/config module 2021-11-19 07:30:31 -08:00
Mengqi Yu
166c2e766b update tests for api module 2021-11-19 07:30:31 -08:00