Commit Graph

1084 Commits

Author SHA1 Message Date
Mohd Bilal
66e4e1582b fix kustomize 4.5.3+ breaking remote resources (4559) 2022-04-23 06:25:24 +00:00
Dipto Chakrabarty
a464ed0c59 add tagsuffix to take image tag suffix (#4364)
* add tagsuffix to take image tag suffix

* add comments to warn about specifications

* add test and error handle

* fix indent

* update comment

* fix merge errors and return updates

* update image update and fix example

* fix yamls formats

remove tabs in yamls

fix space in image name

tag error in name

* fix spacing issue

format of yaml

set example as above

* spacing of spec in testing templates

* change to switch case
2022-04-14 10:00:47 -07:00
koba1t
2f2e14e953 fix lint error to nolint:goerr113 2022-04-13 12:43:35 +09:00
koba1t
ed72bb02d4 fix lint error 2022-04-13 05:20:53 +09:00
koba1t
02e0b38bb0 fix lint error 2022-04-13 05:09:52 +09:00
koba1t
01ab069bd2 fix error message 2022-04-13 04:55:21 +09:00
koba1t
5e84de2a89 fix errror message using replacement wildcard and create option 2022-04-12 05:14:24 +09:00
Jennifer Cwagenberg
7888aef305 Raise error for external generators or transformers (#4565)
* Raise error if duplicate orgids for external transformers or external generators are configured

* Remove output of resources in error message

* Remove trailing newline
2022-04-06 15:46:25 -07:00
Katrina Verey
ea193328e3 Run all non plugin module builds 2022-04-04 19:23:08 -04:00
Katrina Verey
2d4bce5112 Do not run ineffective targets, do run all module tests 2022-04-04 18:13:00 -04:00
Katrina Verey
0fa010c7e7 Add missing boilerplate 2022-04-04 14:24:04 -04:00
Katrina Verey
0d32543ebd Makefiles for all modules 2022-04-01 17:31:34 -04:00
Katrina Verey
b0d2e4bdcd Enable more linters for new code 2022-03-31 11:37:26 -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
1567b96ed3 Replace protobuf dep flagged by linter as deprecated 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
natasha41575
b699204a9e unpin modules and test against latest release 2022-03-28 16:21:42 -07:00
Katrina Verey
7306402cca Update kyaml to v0.13.6 2022-03-28 17:07:02 -04:00
Garrett Thornburg
e97cecf9dc Add more name refs to PodTemplate for ConfigMap and Secret 2022-03-28 14:00:17 -06:00
natasha41575
c857ff8371 move to google/gnostic v0.5.7-v3refs 2022-03-25 15:05:18 -07:00
Katrina Verey
809182c6b6 Back to development mode; unpin the modules 2022-03-24 17:07:20 -04:00
natasha41575
784ae5efa3 Pin to kyaml v0.13.4 2022-03-24 12:58:51 -07: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
Shoshana Malfatto
7b0ec99d90 retain quotes in namespace transformer filter (#4421)
* check tag values for double quoting

* reuse setentry

* don't override single quotes in merge and fix cm generator immutable val

* get rid of comment

* starlark annotation tests

* don't commit test image changes

* set network to bool

* isSet bool

* updating e2e config tool

* leave createtag

* fn command failing unmarshal test

* fn command test

* don't set style in run-fs

* use setentry to set tag

* remove e2e test changes and make IsStringValue an RNode method
2022-03-23 14:25:19 -07:00
Rafael Leal
97de780feb Fix error during expansion of !!merge <<: anchor tags (#4383)
* WIP

* Fix merge corner cases

* Add test for explicit !!merge tag

* Fix tests

* Cleanup

* Cleanup

* Fix deanchoring lists

* Add test case for keeping comments

* Add MapEntrySetter and fix json marshalling after deanchoring

* Keep duplicated keys

* Move MergeTag definition to yaml alias

* Remove go-spew from api

* Add support for sequence nodes on merge tags

* Add docstring to MapEntrySetter.Key

* Add docstring to MapEntrySetter struct

* Add tests to MapEntrySetter

* Fix duplicate merge key

* Revert whitespace changes on forked go-yaml

* Remove AssocMapEntry function

* Refactoring merge order

* Return errors on VisitFields and PipeE

* Add tests for each non-conforming map merges
2022-03-23 09:36:17 -07:00
Kubernetes Prow Robot
2fe04496c2 Merge pull request #4485 from roopeshvs/master
Support for multiple replacements in a single file when replacing using path
2022-03-18 11:42:13 -07:00
Kubernetes Prow Robot
18f22f10a3 Merge pull request #4511 from NoicFank/master
fix broken link
2022-03-17 11:12:54 -07:00
Jim Ramsay
cb80659c22 Preserve scalar types when using the replacement filter
Erasing the scalar type tag leads to unfortunate circumstances, in that
the resulting yaml code is valid yaml, but will not meet the object
spec.

For example, using the replacement transformer to take a port number as
a string from a ConfigMap and set a Pod port would previously end up
with:
 - containerPort: "8080"
when the spec requires that this is not a string:
 - containerPort: 8080

Added unit tests for conversion to and from integers and booleans, plus
creation from string and creation from integer.

The creation behavior needs some refinement in a future PR.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
2022-03-09 06:39:12 -05:00
Dingzhu Lurong
b1086ac49b fix broken link 2022-03-09 16:00:59 +08: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
Mohd Bilal
6dabba1d23 misspell corrected 2022-02-27 07:47:59 +00:00
Mohd Bilal
bd05631887 Error type MalformedYamlError created. api.internal.target.kusttarget.accumulateResources checks for this new error type 2022-02-27 07:21:16 +00:00
Kyle Cronin
8dab94964f Fix image name parsing with tag and digest (#4406)
* Fix image name parsing with name and digest

Image names may contain both tag name and digest.  For example
`nginx:1.21.5@sha256:7826426c9d8d310c62fc68bcd5e8dde70cb39d4fbbd30eda3b1bd03e35fbde29`. Kustomizations with image transforms will not match
these image because the image parser assumes either a tag or digest, but not
both.

For a real life example of kuberenetes deployments that might need to perform
these types of transforms is from the [tekton-pipelines](https://github.com/tektoncd/pipeline) project (see the release.yaml).

* Return digest property from image name parser

image.Split now returns 3 fields: name, tag, and digest. The tag and digest
fields no longer include their respective delimiters (`:` and `@`).

* Fix merge file indentation

* Refactor imagetag updater string builder
2022-02-16 09:02:37 -08:00
Kubernetes Prow Robot
ff40460d3b Merge pull request #4424 from koba1t/feature/allow_setting_every_array_element_in_replacements
Allow setting every array element in replacements
2022-02-09 17:03:46 -08:00
natasha41575
b4e116346e Test examples against latest release 2022-02-09 16:16:10 -08:00
natasha41575
4dfc2a9507 Pin to cmd/config v0.10.4 2022-02-09 14:44:37 -08: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
koba1t
5ed96a34d7 rename IsMatchEveryIndex to IsWildcard 2022-02-10 05:13:29 +09:00
koba1t
22f9daa3ab replacements allow to replace multi values 2022-02-04 04:09:50 +09:00
natasha41575
3277ff9dbf Test examples against latest release 2022-02-02 12:02:01 -08:00
natasha41575
32e13bdf66 Pin to kyaml v0.13.3 2022-02-02 10:36:53 -08:00
Katrina Verey
a86723c3a3 Fix regression 4388 2022-02-02 12:36:03 -05:00
natasha41575
78e8d4318a Back to development mode; unpin the modules 2022-02-01 16:32:40 -08:00
natasha41575
91ff4eefb2 Pin to kyaml v0.13.2 2022-02-01 14:41:11 -08:00
koba1t
b79d77a8a7 add replacements every element match test 2022-01-30 18:52:53 +09:00
Sam Dowell
ba55d95542 feat: implement TrackableFilter for suffix
This change updates the suffix filter to implement the TrackableFilter
interface. This provides the functionality for the user to track which
fields were updated by the suffix filter.
2022-01-28 21:25:35 +00:00
Sam Dowell
851b3fc28c feat: implement TrackableFilter for replicacount
This change updates the replicacount filter to implement the
TrackableFilter interface. This provides the functionality for the
user to track which fields were updated by the replicacount filter.
2022-01-28 21:25:34 +00:00