Commit Graph

52 Commits

Author SHA1 Message Date
Mauren Berti
05fa95ea95 build(deps): bump github.com/go-viper/mapstructure/v2 from v2.3.0 to v2.4.0 2025-08-23 14:48:29 -04:00
koba1t
e68c754cce bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 in /cmd/gorepomod 2025-08-18 06:32:36 +09:00
koba1t
c8d3d5709e bump github.com/go-git/go-git/v5 from 5.11.0 to 5.13.0 2025-08-18 06:30:17 +09:00
yugo kobayashi
87d0629bd1 update go 1.24.6 (#5959)
* 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
2025-08-17 13:05:12 -07:00
Adoram Shoval
9043c223d4 feat: add PatchArgs API type to populate patch options
This commit converts the Options section of a patch into an object instead of map.
This allows better clarification of the available options.
2025-08-08 07:34:20 -04:00
Davanum Srinivas
a7703f685c Drop usage of forked copies of goyaml.v2 and goyaml.v3
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2025-06-25 13:13:52 -04:00
Mauren Berti
f03e31389d build(deps): bump golang.org/x/net from 0.28.0 to 0.33.0 in /hack
Bump the golang.org/x/net dependency and synchronize the workspace using
make workspace-sync
2025-01-15 15:17:23 -05:00
koba1t
8a51255ea1 Update cmd/config to v0.19.0 2025-01-14 23:42:16 +09:00
Sebastiaan van Stijn
2867f353c2 downgrade go-difflib and go-spew to tagged releases (#5830)
* 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>
2025-01-07 03:48:28 +01:00
Davanum Srinivas
84e6594e9b Update golangci/golangci-lint to v1.56.2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-12-14 19:28:39 -05:00
Davanum Srinivas
d32eacf034 Remove starlark support
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-09-23 16:52:05 -04:00
koba1t
b67ce5bb73 go work sync && ./hack/doGoMod.sh tidy 2024-09-15 01:43:03 +09:00
isarns
a1fd6efe5d feat: annotation to disable list conversion 2024-08-11 17:44:44 +03:00
koba1t
bef46a1a04 fix lint error in kustomizationfile_test.go 2024-06-18 06:33:57 +09:00
koba1t
72d95b5f41 chore: restore version for github.com/asaskevich/govalidator 2024-04-25 17:21:05 +09:00
Karl Isenberg
ed2ca23400 Pin tool versions with hack/go.mod (#5622)
* 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
2024-04-02 12:34:13 -07:00
koba1t
91b92b52c1 remove klog/v1 dependencies due to that is in the unwanted dependencies in k/k 2024-03-28 00:30:27 +09:00
Karl Isenberg
43868688d5 Use require for Error and NoError
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.
2024-03-20 13:19:18 -07:00
Karl Isenberg
4dbc0d22e1 chore: Update to Go v1.21
- 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
2024-03-15 11:47:44 -07:00
koba1t
d35edbf80d update dependencies google.golang.org/protobuf@v1.33.0 2024-03-14 17:27:48 +09:00
Kurnianto Trilaksono
ab519fdc13 Feature/dependency pinning and update automation (#5451)
* * 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
2024-01-16 22:34:56 +01:00
Mauren Berti
30893b0184 feat: edit set configmap (#5391)
* 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>
2023-11-17 19:14:53 +01:00
Ardika Bagus
b7b85b10fc chore: remove unnecessary code, and using testdata instead of inline
Signed-off-by: Ardika Bagus <me@ardikabs.com>
2023-11-02 06:23:50 +07:00
koba1t
af7c088053 fix failed tests for fn framework mount generator 2023-11-02 02:37:00 +09:00
Mauren Berti
a5a2db577f refactor: move reusable bits in preparation for edit set commands
* Move configmapSecretFlagsAndArgs.go to the internal/util folder so it can be
  reused by the edit set commands.
2023-10-21 16:55:37 -04:00
Jan-Otto Kröpke
d64ac13447 kustomize: Add support for OCI based helm repos (#5167)
* kustomize: Add support for OCI based helm repos

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* Update api/internal/builtins/HelmChartInflationGenerator.go

* Update plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go

* go fmt

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* s/expectedHelmExternalDns/expectedHelmExternalDNS

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* commit

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* commit with content

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>

* Apply suggestions from maintainer

* go work sync

* added test

---------

Signed-off-by: Jan-Otto Kröpke <joe@cloudeteer.de>
2023-10-17 21:24:00 +02:00
Kubernetes Prow Robot
af781bfa5e Merge pull request #5313 from bugoverdose/docs/api
Add API section to Reference Section
2023-09-22 22:56:55 -07:00
Kubernetes Prow Robot
1bd58bdc15 Merge pull request #5327 from stormqueen1990/feat/add-remove-configmap-command
feat: add remove configmap command
2023-09-20 14:32:01 -07:00
Jeong Jinwoo
e19ca5405a docs: setup API section with cli-experimental site 2023-09-14 12:40:54 +09:00
Kubernetes Prow Robot
56d37acc7d Merge pull request #5261 from varshaprasad96/refactor/image
[Refactor] Move image to internal
2023-09-13 10:22:12 -07:00
Mauren Berti
0571a2f15d Incorporate feedback from original PR
* Incorporate feedback left on original PR.
* Add more test cases.
* Minor refactoring and update to copyright notice.
2023-09-12 20:18:45 -04:00
Irvi Aini
4947a905fa refactor: Remove setters from kyaml
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.
2023-08-24 00:39:47 +08:00
Varsha Prasad Narsing
ca748faa3f [Refactor] Move image/ to internal
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)
2023-08-09 13:40:07 -04:00
Varsha Prasad Narsing
820f17c73b [Chore] Enable go-api-diff checker
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>
2023-07-12 13:55:07 -04:00
natasha41575
d7362ed22d pin to cmd/config 2023-06-19 11:07:36 -05:00
koba1t
d1647a51af fix e2econtainer test 2023-06-07 02:19:55 +09:00
koba1t
5b76aa9d2f update go 1.20 2023-06-06 22:39:06 +09:00
yugo kobayashi
0add0f95e2 change: components apply after all generators and transformers applied (#5170)
* 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
2023-06-02 10:26:54 -07:00
Jefftree
7c98e531f2 make test-go-mod 2023-05-31 19:54:13 +00:00
natasha41575
459d0198d9 pin to cmd/config v0.11.2 2023-05-05 14:49:36 -05:00
Katrina Verey
85d623bc86 Add a rich example of fn framework for abstraction 2023-04-13 16:57:50 -04:00
Katrina Verey
f901b4a5fd Remove leftover replace statements 2023-02-02 11:23:00 -05:00
Olivier Lemasle
aaf9d39975 Bump k8s.io/kube-openapi to remove archived dependency
Bump k8s.io/kube-openapi to remove archived dependency github.com/PuerkitoBio/urlesc
2023-01-13 20:50:59 +01:00
Cailyn
8ab4b8d167 remove direct dependency on github/pkg/errors (#4970) 2023-01-13 10:52:25 -08:00
Yannis Zarkadas
a502717460 Make ordering configurable (#4019)
* 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>
2022-12-02 13:59:53 -08:00
Katrina Verey
f8d1e778c7 Commit go.sum updates 2022-08-16 18:26:04 -04:00
yugo kobayashi
3229c810cc restore require sigs.k8s.io/kustomize/* in go.mod 2022-07-08 16:58:01 +00:00
yugo kobayashi
670cef4fd1 remove 'replace sigs.k8s.io/kustomize/*' and cleanup 2022-07-07 18:30:49 +00:00
koba1t
a6449aa03f try to fix e2econtainer test 2022-07-05 03:44:56 +09:00
koba1t
8c8a2125b7 update all go.mod to go1.18 2022-06-29 05:14:33 +09:00