* update go 1.24.6
* fix non-constant format string error
* update golang.org/x/tools@v0.36.0 and github.com/golangci/golangci-lint@v1.64.8 to pass execute golangci-lint
* add a verpose diff output to prow test
* remove pluginator binary version from generated files
* workspace sync
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* downgrade go-difflib and go-spew to tagged releases
commit d35edbf80d updated these dependencies
to untagged versions. The diff in both dependencies show that there's no
code changes, and it's unlikely for those modules to do new releases.
Unfortunate, because of that change all projects depending on kubernetes
or any of it's modules now had to upgrade to unreleased versions of
these.
This patch reverts those updates (but it may take some time before
all other projects can be reverted).
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
---------
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Pin tool versions with hack/go.mod
This change centralizes the tracking of versions for tools used for
development and testing. This way, the tools and all their
dependencies have their checksums stored in hack/go.sum, which
improves supply chain security.
* Workspace Sync & Tidy
Assert keeps going after failure, but require immediately fails
the tests, making it easier to find the output related to the test
failure, rather than having to comb through a bunch of subsequent
assertion failures. For equality tests, we may or may not want to
continue, but for error checks we almost always want to immediately
fail the test. Exceptions can be changed as-needed.
- go mod tidy (all modules)
- go work sync
- Fixed plugin generation for Go 1.21
- Updated linting for Go 1.21
- Fixed minecraft example for Helm v3 pull download path
- Update dev docs to mention Go 1.21
- Regenerate plugins with Go 1.21
* * handle local flag
* add managerfactory handling for local flag
* add shortName handling for local flag
* add dot git file handling for local flag
* add tests
* fix normal listing
* add ParseGitRepository function, add viper, add testing for utils
* add latest tag logic, add auto pinning and auto fetching
* makke gorepomod list works with --local
* make pinning works with local flag, enable auto update on fork and non-fork repo
* fix: refactor to pass linter
* refactor code and fix comments
* edit README
* refactor code to pass linting
* refactor code
* refactor code and enable patch branch label
* ru add license
* fbackward compatibility for unpin
* feat: add new command 'edit set configmap'
* Add a new command 'edit set configmap' to allow editing the values of an
already-existing configmap in a kustomization file.
* Add tests to validate the new feature.
* fix: add tests, minor refactoring to use constants
* Include tests to validade the new function ValidateSet, included to do
necessary validations when running the 'kustomize edit set configmap' command.
* Minor refactorings to use the existing constants in the 'edit set configmap'
command.
* Add dashes before each item in the comment explaining how ExpandFileSource()
works so IDEs don't try to reformat the list and remove the indentation in it.
* Because this change mutates the list of literal sources, ensure that both add
and set save the resulting list in a predictable order to make it easier to
check when new items are added/removed and aid in testing.
* Since literal sources are the only bit that's important in this test, verify
that the literal sources in the actual result is equal to what we expected it
to be.
* fix: change format to print resource name
Use '%q' formatter instead of '%s' to print resource name
Co-authored-by: Varsha <varshaprasad96@gmail.com>
* fix: add changes from code review
* Unexport constant that is used only in the scope of a single function.
* Add extra validation to ensure format is correct with one single '=' per key-value
pair.
* Add extra set of tests to validate format.
* Update test case to match new printed format in the error message.
* fix: rollback sort for edit add/set configmap
* chore: rename test package and unexport functions
Rename the test package from set_test back to set and unexport functions that do
not need to be exported anymore for testing purposes.
* feat: handle empty and default namespace as equal
Handle the empty and the default namespaces as equal. Add tests to validate this
scenario.
---------
Co-authored-by: Varsha <varshaprasad96@gmail.com>
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.
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)
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>
* change: components apply after all generator and transformer applied
* fix name for a test case
* add comment about when the components will be executed
* components are applied before transformer
* api: Add new types for customizeable resource ordering
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
* plugins: Implement SortOrderTransformer plugin
Implement the SortOrderTransformer plugin. This plugin allows the user
to customize the order that kustomize will output resources in.
The API for the plugin is the following:
sortOptions:
order: legacy | fifo
legacySortOptions:
orderFirst:
- {GVK}
orderLast:
- {GVK}
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
* plugins: Add boilerplate and generate code for new SortOrderTransformer
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
* build: Add option to denote if the reorder flag was set by the user
We want to take different actions if the reorder flag was set by the
user or filled by the default value. Thus, we propagate this information
from build to the krusty options.
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>
* api/krusty: Ensure sort ordering works with CLI flag and kustomization
Sort order can be defined in two places:
- (new) kustomization file
- (old) CLI flag
We want the kustomization file to take precedence over the CLI flag.
Eventually, we may want to move away from having a CLI flag altogether:
https://github.com/kubernetes-sigs/kustomize/issues/3947
Case 1: Sort order set in kustomization file AND in CLI flag.
Print a warning and let the kustomization file take precedence.
Case 2: Sort order set in CLI flag only or not at all.
Follow the CLI flag (defaults to legacy) and reorder at the end.
Case 3: Sort order set in kustomization file only.
Simply build the kustomization.
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>
* krusty: Add e2e test for SortOrderTransformer
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
* plugins: Purge LegacyOrderTransformer
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>
* Update go.work.sum
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>
* review: Make review changes
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
Signed-off-by: Yannis Zarkadas <yanniszark@gmail.com>