19 Commits

Author SHA1 Message Date
chansuke
50159d47c2 Add negative case for testing keyValuesFromLine 2023-10-17 23:55:04 +09:00
Varsha Prasad Narsing
7911b2c001 [refactor]: Internalize loader api
This PR intends to move the loader api to
internal. Only the necessary methods which
are needed for the api have been put into
`pkg/loader.go`.

Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
2023-09-28 10:49:45 -04:00
Peter Lobsinger
633da991d2 Only strip surrounding quotes if there are at least two characters.
Otherwise, a value consisting of a single quote character triggers a
panic:

    go test krusty/configmaps_test.go
    --- FAIL: TestDataIsSingleQuote (0.00s)
    panic: runtime error: slice bounds out of range [1:0] [recovered]
    	panic: runtime error: slice bounds out of range [1:0]
2023-03-28 14:17:47 -07:00
Cailyn
8ab4b8d167 remove direct dependency on github/pkg/errors (#4970) 2023-01-13 10:52:25 -08:00
Cailyn
6c79645fb0 Update api/kv/kv.go
Co-authored-by: Katrina Verey <kn.verey@gmail.com>
2023-01-05 14:39:02 -05:00
Cailyn Edwards
b7746d09e4 Remove Functionality that Pulls Env Variables from Empty Keys 2023-01-05 12:54:48 -05:00
Anna Song
71eb865cea Localize configMapGenerator, secretGenerator fields (#4894)
* Localize configMapGenerator, secretGenerator fields

* Improve readability

* Expose kv parseFileSource

* Add localizeGenerator to Localizer

* Improve and test ParseFileSource error messages
2022-12-02 15:31:53 -08:00
Katrina Verey
2a3b645758 Emit a warning when env loading bug is being relied on 2022-07-28 18:04:48 -04:00
natasha41575
ba051c863b fix issue with quote being dropped in configmap generation 2021-10-14 18:30:28 -07:00
Francesc Campoy
7fae7d1bd6 Move api/filesys to kyaml/filesys (#3997)
* Move api/filesys to kyaml/filesys

* Add deprecated version of api/filesys with aliases to new code

* Use new kyaml/filesys package and update dependencies

* Migrate to kyaml/filesys and update dependencies

* Skip tests that break on Windows
2021-06-16 11:42:00 -07:00
Mikhail Mazurskiy
a3ed120efb Handle errors 2021-06-05 09:43:13 +10:00
Phani Teja Marupaka
7d600c1c5a Do not modify CM and Secrets Generator 2020-05-06 09:38:33 -07:00
Phani Teja Marupaka
0bd872e6d5 Do not remove empty lines in configmap/secret 2020-01-20 11:42:39 -08:00
Phani Teja Marupaka
011804e14d Make suggested changes 2020-01-02 13:06:14 -08:00
Phani Teja Marupaka
fa8f504ff4 Trim trailing spaces and tabs from config map files 2020-01-02 10:28:03 -08:00
Jeffrey Regan
75b8103215 Raise the golinter bar. 2019-11-14 16:37:49 -08:00
Jeffrey Regan
46524d3b6a Introduce API module. 2019-10-21 13:30:31 -07:00
jregan
3af5a8afea Make resource, resmap public. 2019-10-20 10:51:20 -07:00
Jeffrey Regan
e5c8b5ec8f Start api directory, which will become a module. 2019-10-17 14:01:20 -07:00