Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/convert resources to resource generator merge master #2

Open
wants to merge 194 commits into
base: chore/convert_resources_to_ResourceGenerator
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
d37c0eb
fix(examples): move examples from patchesStrategicMerge to patches
danistrebel Jun 9, 2023
234ab80
chore(docs): fix grammar error in comment
crenshaw-dev Oct 23, 2023
7154635
Add a comment
crenshaw-dev Oct 24, 2023
5c7f8b8
perf: improve applyOrdering by avoid call to GetByCurrentId
chlunde Mar 7, 2023
fefa21f
Add conditional doc check in go workflow
sarab97 Nov 11, 2023
7b1eaf1
feat: localize absolute paths
typeid Nov 26, 2023
e3031f3
Add build --load-restrictor completion
sylr Oct 28, 2023
82bd395
Add missing error handling for --load-restrictor completion
sylr Nov 21, 2023
cd88610
Fix version tag management
chansuke Nov 23, 2023
872968c
fix: show CronJob properties
Crystalix007 Oct 17, 2023
d56e1d0
fix some comments
cuishuang Jan 5, 2024
3f921e1
add testcase that yield malformed yaml errors
charles-chenzz Dec 26, 2023
f3fedac
Add generator kustomization references (#5447)
ncapps Jan 10, 2024
ab519fd
Feature/dependency pinning and update automation (#5451)
antoooks Jan 16, 2024
4e93959
build(deps): bump joelanford/go-apidiff from 0.7.0 to 0.8.2
dependabot[bot] Jan 22, 2024
40ce15c
Merge pull request #5514 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Jan 23, 2024
4adb7f9
update owners file
natasha41575 Jan 25, 2024
dd49bd4
Merge pull request #5518 from natasha41575/updateowners
k8s-ci-robot Jan 25, 2024
abdcae8
Merge pull request #5463 from chansuke/feat/show-version
k8s-ci-robot Jan 26, 2024
a85dfd4
fix edit set image to parse both tag and digest
blackjid Jul 5, 2023
6982666
Merge pull request #5234 from blackjid/bug_fix_set_image_digest_and_tag
k8s-ci-robot Jan 26, 2024
26165a8
Add buildMetadata task and ref (#5511)
ncapps Jan 26, 2024
4675bec
add license for api/pkg/util/image/go
koba1t Jan 29, 2024
7e392f9
Merge pull request #5521 from koba1t/add_license_for_api/pkg/util/ima…
k8s-ci-robot Jan 29, 2024
d768fc3
replace mergo with kyaml/yaml/merge2
krzysiekg Oct 5, 2023
bf286dc
wrap errors and add comments
krzysiekg Jan 23, 2024
d73f0fd
add test for values merge replace
krzysiekg Jan 28, 2024
b1b61ad
Merge pull request #5044 from krzysiekg/fix-empty-map-merge
k8s-ci-robot Jan 31, 2024
add367b
Fix running docs site with docker (#5512)
ncapps Jan 31, 2024
31b852c
Merge pull request #5411 from sylr/complete-load-restrictor
k8s-ci-robot Feb 1, 2024
d223b9d
Removed a typo in documentation
Phillipdk Feb 5, 2024
3bd9ea8
chore: pin dev deps in the dev container
karlkfi Feb 5, 2024
cf01ceb
Merge pull request #5529 from karlkfi/karl-pin-site-deps
k8s-ci-robot Feb 7, 2024
27a8ff9
feat: edit set secret
stormqueen1990 Dec 18, 2023
23fbdd2
chore: fix spacing in added description
stormqueen1990 Jan 16, 2024
fd09a6e
chore: changes from code review
stormqueen1990 Jan 28, 2024
ca8d629
chore: update help to include bit about default namespace
stormqueen1990 Jan 30, 2024
6c1fea7
chore: add failure test case for empty generator
stormqueen1990 Jan 30, 2024
14c091a
fix: remove excessive quoting from error messages
stormqueen1990 Jan 30, 2024
3bb9a6d
fix: update long description as per code review request
stormqueen1990 Feb 7, 2024
b154361
Merge pull request #5467 from stormqueen1990/feat/edit-set-secret
k8s-ci-robot Feb 8, 2024
dc7ebef
chore: add hack/latest_version.sh
karlkfi Feb 8, 2024
537c4fa
Merge pull request #5438 from sarab97/act-skip-cond
k8s-ci-robot Feb 13, 2024
f8f4203
Merge pull request #5528 from Phillipdk/patch-1
k8s-ci-robot Feb 14, 2024
91ccf00
Merge pull request #5533 from karlkfi/karl-version
k8s-ci-robot Feb 14, 2024
9546529
Include plugin `stderr` with wrapped error
dhaiducek Feb 13, 2024
bcf100f
Use canonical json-patch v4 import
skitt Feb 16, 2024
f80650e
fix: improve accumulation failure message
ephesused Feb 16, 2024
f93b0ea
build(deps): bump actions/checkout from 3 to 4
dependabot[bot] Feb 19, 2024
1fa02e7
Merge pull request #5546 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Feb 19, 2024
96c6bba
build(deps): bump dorny/paths-filter from 2 to 3
dependabot[bot] Feb 19, 2024
800e12b
Merge pull request #5539 from dhaiducek/plugin-errmsg
k8s-ci-robot Feb 20, 2024
17eab51
Skip KUSTOMIZE_PLUGIN_CONFIG_* env variables when too large
andreaskaris Jan 10, 2024
3e69c2e
Merge pull request #5510 from andreaskaris/kustomize-env-var-max-length
k8s-ci-robot Feb 21, 2024
3771586
use Strict unmarshal when read TransformerConfig
koba1t Feb 21, 2024
e25f99e
Fix broken example
colinodell Feb 21, 2024
9e68399
Merge pull request #5550 from koba1t/use_StrictUnmarshal_for_read_Tra…
k8s-ci-robot Feb 22, 2024
6088692
Fix incorrect command name
colinodell Feb 23, 2024
9d66eb1
Add import statements to help users get up-and-running faster
colinodell Feb 23, 2024
facabde
Fix other command reference
colinodell Feb 23, 2024
6ffcc08
Merge pull request #5201 from danistrebel/fix/examples-patches
k8s-ci-robot Feb 25, 2024
d332945
Add kustomization and transformer references (#5523)
ncapps Feb 26, 2024
db2240c
Merge pull request #5541 from skitt/canonical-json-patch
k8s-ci-robot Feb 27, 2024
28ef9da
Merge pull request #5545 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Feb 27, 2024
33caee5
Allow importing kustomize API's without relying on `plugins` (#5525)
tigrato Feb 27, 2024
2252fd9
Fix lint violations
colinodell Mar 5, 2024
cc410bc
Update the example to match what kustomize fn expects
colinodell Mar 5, 2024
74ba2fb
Merge pull request #5387 from Crystalix007/master
k8s-ci-robot Mar 6, 2024
1170431
Merge pull request #5551 from colinodell/patch-1
k8s-ci-robot Mar 6, 2024
62eca85
test: add test for issue 5440
ephesused Mar 8, 2024
4da880d
Merge remote-tracking branch 'origin/master' into issue5540
ephesused Mar 8, 2024
8aafbac
Fix null YAML values being replaced by `"null"`
matthewhughes934 Jan 28, 2024
14a9a98
test: correct lint issues
ephesused Mar 11, 2024
da3985c
Merge pull request #5519 from matthewhughes934/fix-null-strings-after…
k8s-ci-robot Mar 12, 2024
d35edbf
update dependencies google.golang.org/[email protected]
koba1t Mar 14, 2024
e9fc57a
Merge pull request #5615 from koba1t/update_dependencies_google.golan…
k8s-ci-robot Mar 14, 2024
4dbc0d2
chore: Update to Go v1.21
karlkfi Mar 5, 2024
1eccd8f
Merge pull request #5555 from karlkfi/karl-go-121
k8s-ci-robot Mar 20, 2024
72f0a3c
remove deprecated 'golang.org/x/exp/slices' dependencies
koba1t Mar 14, 2024
a6ea3e2
Merge pull request #5567 from koba1t/remove_exp_slices_dependencies
k8s-ci-robot Mar 20, 2024
434a55a
Disable abandoned/archived linters
karlkfi Mar 20, 2024
4386868
Use require for Error and NoError
karlkfi Mar 20, 2024
22ce9c0
Merge pull request #5620 from karlkfi/karl-fix-lint
k8s-ci-robot Mar 21, 2024
d514df3
Merge pull request #5621 from karlkfi/karl-require-assert
k8s-ci-robot Mar 21, 2024
9db92fd
Use a local test server instead of example.com
karlkfi Mar 21, 2024
50dc813
Add buildMetadata task and ref (#5511)
ncapps Jan 26, 2024
931f924
add helper script for releasing
antoooks Mar 24, 2024
a7de0cc
edit printout
antoooks Mar 26, 2024
fbc102d
add change counter
antoooks Mar 26, 2024
846d3c0
fix logic
antoooks Mar 26, 2024
d7e60b8
Merge pull request #5624 from karlkfi/karl-example-500
k8s-ci-robot Mar 27, 2024
91b92b5
remove klog/v1 dependencies due to that is in the unwanted dependenci…
koba1t Mar 27, 2024
a6149b1
Merge pull request #5627 from koba1t/remove_klog/v1_dependencies
k8s-ci-robot Mar 27, 2024
3d840a6
revert untouched files
antoooks Mar 27, 2024
f63e919
revert untouched file
antoooks Mar 27, 2024
8fef99f
Merge pull request #5542 from ephesused/issue5540
k8s-ci-robot Mar 27, 2024
6145a4b
add favicons for kustomize site
jakezhu9 Mar 28, 2024
63329d1
fix logic and add license
antoooks Mar 29, 2024
ed2ca23
Pin tool versions with hack/go.mod (#5622)
karlkfi Apr 2, 2024
eabf2d4
build(deps): bump github.com/microcosm-cc/bluemonday in /hack
dependabot[bot] Apr 2, 2024
8d21d43
build(deps): bump github.com/go-git/go-git/v5 in /hack
dependabot[bot] Apr 2, 2024
b3d1df2
Fix name in a configMapRef missing hash #5047 (#5236)
jonathanlking Apr 2, 2024
2c68a4d
Update site/Dockerfile to use pinned hugo version
karlkfi Apr 2, 2024
a6bbbe8
Fix gorepomod make test
karlkfi Apr 3, 2024
f068142
Merge pull request #5629 from jakezhu9/favicons
k8s-ci-robot Apr 3, 2024
c0b3801
Merge pull request #5636 from karlkfi/karl-site-pin-version
k8s-ci-robot Apr 4, 2024
f1599f6
Merge pull request #5633 from kubernetes-sigs/dependabot/go_modules/h…
k8s-ci-robot Apr 4, 2024
d5f3c4f
Merge pull request #5635 from kubernetes-sigs/dependabot/go_modules/h…
k8s-ci-robot Apr 4, 2024
562cbc1
build(deps): bump github.com/cli/cli from 0.6.0 to 1.2.1 in /hack
dependabot[bot] Apr 4, 2024
fd06780
build(deps): bump github.com/cloudflare/circl in /hack
dependabot[bot] Apr 4, 2024
8f2d243
Merge pull request #5634 from kubernetes-sigs/dependabot/go_modules/h…
k8s-ci-robot Apr 4, 2024
398aa36
Merge pull request #5638 from kubernetes-sigs/dependabot/go_modules/h…
k8s-ci-robot Apr 4, 2024
a9bfabc
Merge pull request #5637 from karlkfi/karl-fix-generate
k8s-ci-robot Apr 4, 2024
10c292f
Update kyaml to v0.17.0
koba1t Apr 4, 2024
cd954ce
Merge pull request #5639 from koba1t/pinToKyaml
k8s-ci-robot Apr 4, 2024
a9f7a04
Update cmd/config to v0.14.0
koba1t Apr 4, 2024
1b44976
Merge pull request #5640 from koba1t/pinToCmdConfig
k8s-ci-robot Apr 4, 2024
e862612
Update api to v0.17.0
koba1t Apr 4, 2024
31706fd
Merge pull request #5641 from koba1t/pinToApi
k8s-ci-robot Apr 4, 2024
08d0593
unpin api
koba1t Apr 4, 2024
2b00d88
Merge pull request #5643 from koba1t/unpinEverything
k8s-ci-robot Apr 4, 2024
277da9e
fix version subcommand is not working after release build
koba1t Apr 4, 2024
42873c8
Merge pull request #5644 from koba1t/fix/version_subcommand_is_broken
k8s-ci-robot Apr 4, 2024
e20e438
Update api to v0.17.1
koba1t Apr 4, 2024
536c1c0
Merge pull request #5645 from koba1t/pinToApi
k8s-ci-robot Apr 4, 2024
fb9f45e
Back to development mode; unpin the modules
koba1t Apr 4, 2024
116b307
Merge pull request #5646 from koba1t/unpinEverything
k8s-ci-robot Apr 4, 2024
82ee768
Merge pull request #5079 from chlunde/perf-1
k8s-ci-robot Apr 6, 2024
ed09399
fix: return error instead of log.Fatalf() (#5625)
chansuke Apr 18, 2024
bcb1a36
refactor: string in slice part of stdlib now
emirot Apr 20, 2024
5d127e4
chore(deps): bump dependencies of kustomize + sync go workspace
stormqueen1990 Apr 22, 2024
7f99ceb
Merge pull request #5672 from stormqueen1990/chore/bump-deps
k8s-ci-robot Apr 23, 2024
2e6171a
Merge pull request #5671 from emirot/refactor/string_inSlice
k8s-ci-robot Apr 23, 2024
25c7e17
add pr rules, fix script
antoooks Apr 24, 2024
671de16
feat: support labels key in transformer configuration (#5556)
stormqueen1990 Apr 25, 2024
72d95b5
chore: restore version for github.com/asaskevich/govalidator
koba1t Apr 25, 2024
a68f407
Merge pull request #5680 from koba1t/chore/restore_version_for_govali…
k8s-ci-robot Apr 25, 2024
0e64959
chore: remove unused function
emirot Apr 26, 2024
a83f102
fix: include label in templates when adding by cli
kozjan Apr 26, 2024
b1a9bff
Update CONTRIBUTING.md
antoooks Apr 28, 2024
e676d05
Merge pull request #5500 from charles-chenzz/kust-target-tc
k8s-ci-robot Apr 29, 2024
0d7d830
Merge pull request #5681 from emirot/remove-string-in-slice
k8s-ci-robot Apr 29, 2024
e7a1549
fix: use `fmt.Errorf` instead of non-existing `errors.New` (#5651)
tigrato Apr 30, 2024
49a645f
Merge pull request #5294 from typeid/localize_absolute_paths
k8s-ci-robot Apr 30, 2024
f983846
refactor: function in stdlib now
emirot May 3, 2024
e244b83
Merge pull request #5688 from emirot/refactor/indexOf
k8s-ci-robot May 6, 2024
6a829fe
Pin kustomize image in cockroachdb example
karlkfi May 6, 2024
b679598
Add --no-verify flag configs along with kustomize build when kustomiz…
sanaasy Feb 13, 2024
3065eb3
fix(namereference): add configuration for new admission API
stormqueen1990 May 20, 2024
77354d7
chore: add deprecation comment to commonLabels
stormqueen1990 May 20, 2024
7424956
Update kyaml to v0.17.1
koba1t May 22, 2024
da14e76
Merge pull request #5702 from koba1t/pinToKyaml
k8s-ci-robot May 22, 2024
f6ad718
Update cmd/config to v0.14.1
koba1t May 22, 2024
9cc25a5
Merge pull request #5703 from koba1t/pinToCmdConfig
k8s-ci-robot May 22, 2024
a34ac31
Update api to v0.17.2
koba1t May 22, 2024
f309dfc
Merge pull request #5704 from koba1t/pinToApi
k8s-ci-robot May 22, 2024
226d56b
Back to development mode; unpin the modules
koba1t May 22, 2024
ce80dc9
Merge pull request #5705 from koba1t/unpinEverything
k8s-ci-robot May 22, 2024
88c89f4
fix: always show accumulation errors (#5693)
colinodell May 25, 2024
cb432b0
Merge pull request #5699 from stormqueen1990/chore/deprecation-common…
k8s-ci-robot May 27, 2024
8db4c4b
Fix lint error message adn reduce build error message to a string con…
sanaasy Jun 4, 2024
92e862c
Merge pull request #5544 from sanaasy/sanaasy/add-no-verify-flag
k8s-ci-robot Jun 5, 2024
16a7ce2
Fix sortOptions removal when running edit command (#5689)
oli-f Jun 5, 2024
cba3688
add validation and test case
kozjan Apr 29, 2024
8566628
Merge pull request #5698 from stormqueen1990/fix/validation-name-refe…
k8s-ci-robot Jun 8, 2024
48d79c7
Merge pull request #5691 from karlkfi/karl-cockroachdb-pin-version
k8s-ci-robot Jun 12, 2024
bef46a1
fix lint error in kustomizationfile_test.go
koba1t Jun 17, 2024
692b40e
Merge pull request #5718 from koba1t/chore/fix_lint_error_in_kustomiz…
k8s-ci-robot Jun 17, 2024
44a99b7
build(deps-dev): bump braces from 3.0.2 to 3.0.3 in /site
dependabot[bot] Jun 17, 2024
9ab7762
build(deps): bump github.com/Azure/azure-sdk-for-go/sdk/azidentity
dependabot[bot] Jun 17, 2024
804f69b
Merge pull request #5719 from kubernetes-sigs/dependabot/npm_and_yarn…
k8s-ci-robot Jun 18, 2024
b02d02a
Merge pull request #5715 from kubernetes-sigs/dependabot/go_modules/h…
k8s-ci-robot Jun 18, 2024
e3a7615
Merge pull request #5506 from cloud-native-team/master
k8s-ci-robot Jun 18, 2024
dfb3064
build(deps): bump golang.org/x/image from 0.13.0 to 0.18.0 in /hack
dependabot[bot] Jun 26, 2024
5cfd3ab
Merge pull request #5725 from kubernetes-sigs/dependabot/go_modules/h…
k8s-ci-robot Jun 27, 2024
c1de030
Merge pull request #5413 from crenshaw-dev/patch-1
k8s-ci-robot Jun 30, 2024
735ad0b
Merge pull request #5682 from kozjan/add-label-include-templates
k8s-ci-robot Jul 10, 2024
7cbaf78
fix:kustomize cfg grep with no arguments causes panic (#5707)
deszhou Jul 10, 2024
1a41303
Merge pull request #5628 from antoooks/release-helper-script
k8s-ci-robot Jul 16, 2024
8eacab0
Update kyaml to v0.17.2
koba1t Jul 19, 2024
4e52632
Merge pull request #5734 from koba1t/pinToKyaml
k8s-ci-robot Jul 19, 2024
36d78f6
Update cmd/config to v0.14.2
koba1t Jul 19, 2024
ddeb572
Merge pull request #5735 from koba1t/pinToCmdConfig
k8s-ci-robot Jul 19, 2024
bd8b8a4
Update api to v0.17.3
koba1t Jul 19, 2024
d4248b1
Merge pull request #5736 from koba1t/pinToApi
varshaprasad96 Jul 19, 2024
f660160
Back to development mode; unpin the modules
koba1t Jul 19, 2024
2aaa42f
Merge pull request #5737 from koba1t/unpinEverything
k8s-ci-robot Jul 19, 2024
cc9dd34
docs: update patchMultipleObject example to filter with labelSelector…
johnzheng1975 Jul 23, 2024
05339da
Remove misleading documentation about config generation
VannTen Jun 13, 2024
27d508f
Merge pull request #5716 from VannTen/cleanup/wrong_example_config_gen
k8s-ci-robot Aug 29, 2024
b7cdd91
Sort built-in Namespace kind before CRDs with the same name (#5458)
danielwilsonkainos Sep 3, 2024
751d70b
Merge branch 'master' into chore/convert_resources_to_ResourceGenerator
LittleChimera Sep 7, 2024
92483cc
pass kt to transformers too
LittleChimera Sep 8, 2024
4cb6dad
Merge branch 'chore/convert_resources_to_ResourceGenerator' into chor…
LittleChimera Sep 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.github
docs
examples
hack
site
travis
*.md
2 changes: 1 addition & 1 deletion .github/workflows/apidiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
go-version-file: go.work
- name: Execute go-apidiff
uses: joelanford/go-apidiff@v0.7.0
uses: joelanford/go-apidiff@v0.8.2
with:
compare-imports: true
print-compatible: true
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,25 @@ permissions:
contents: read

jobs:
conditional-changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
doc: ${{ steps.filter.outputs.doc }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
doc:
- 'site/**'

lint:
name: Lint
needs: conditional-changes
if: needs.conditional-changes.outputs.doc == 'false'
runs-on: [ubuntu-latest]
steps:
- name: Check out code into the Go module directory
Expand All @@ -30,6 +47,8 @@ jobs:

test-linux:
name: Test Linux
needs: conditional-changes
if: needs.conditional-changes.outputs.doc == 'false'
runs-on: [ubuntu-latest]
steps:
- name: Check out code into the Go module directory
Expand All @@ -46,6 +65,8 @@ jobs:

test-macos:
name: Test MacOS
needs: conditional-changes
if: needs.conditional-changes.outputs.doc == 'false'
runs-on: [macos-latest]
steps:
- name: Check out code into the Go module directory
Expand All @@ -62,6 +83,8 @@ jobs:

test-windows:
name: Test Windows
needs: conditional-changes
if: needs.conditional-changes.outputs.doc == 'false'
runs-on: [windows-latest]
steps:
- name: Check out code into the Go module directory
Expand Down
6 changes: 5 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

run:
deadline: 5m
go: '1.20'
go: '1.21'

linters:
enable-all: true
Expand Down Expand Up @@ -35,6 +35,10 @@ linters:
- maintidx
- nosnakecase
- testpackage # it's better to keep tests in the same package for now because kustomize does open box testing
- structcheck # abandoned by author
- varcheck # abandoned by author
- maligned # abandoned by author
- interfacer # archived by author

linters-settings:
dupl:
Expand Down
27 changes: 26 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,39 @@ cd kustomize
git push origin myfeature
```

### Pull Request Rules

We are using [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) as the main guideline of making PR. This guideline serves to help contributor and maintainer to classify their changes, thus providing better insight on type of release will be covered on each Kustomize release cycle.

1. Please add these keywords on your PR titles accordingly

| Keyword | Description | Example |
| ------------- | ------------- | ------------- |
| fix | Patching or fixing bugs or improvements introduction from previous release. This type of change will mark a `PATCH` release. | fix: fix null value when generating yaml |
| feat | New features. This change will mark a `MINOR` release. | feat: new transformer and generator for ACME API CRD. |
| chore | Minor improvement outside main code base | chore: add exclusion for transformer test. |
| ci | CI/CD related changes (e.g. github workflow, scripts, CI steps). | ci: remove blocking tests |
| docs | Changes related to documentation. | docs: add rules documentation for PR. |


2. Add `BREAKING CHANGE:` on your commit message as footer to signify breaking changes. This will help maintainers identify `MAJOR` releases.

Example:

```
feat: change YAML parser from `yaml/v1` to `yaml/v2`

BREAKING CHANGE: parse() function now works with 2 arguments.
```

### Create a Pull Request

1. Visit your fork at `https://github.com/<user>/kustomize`
2. Click the **Compare & Pull Request** button next to your `myfeature` branch.
3. Check out the pull request [process](https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md) for more details and advice.

If you ran `git push` in the previous step, GitHub will return a useful link to create a Pull Request.


### Build Kustomize
The [Kustomize Architecture] document describes the respository organization and the kustomize build process.
```bash
Expand Down
34 changes: 14 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Makefile for kustomize CLI and API.

LATEST_RELEASE=v5.3.0
LATEST_RELEASE=v5.4.3

SHELL := /usr/bin/env bash
GOOS = $(shell go env GOOS)
Expand Down Expand Up @@ -56,26 +56,24 @@ uninstall-local-tools:

# Build from local source.
$(MYGOBIN)/gorepomod:
cd cmd/gorepomod; \
go install .
cd cmd/gorepomod && go install .

# Build from local source.
$(MYGOBIN)/k8scopy:
cd cmd/k8scopy; \
go install .
cd cmd/k8scopy && go install .

# Build from local source.
$(MYGOBIN)/pluginator:
cd cmd/pluginator; \
go install .
cd cmd/pluginator && go install .


# --- Build targets ---

# Build from local source.
$(MYGOBIN)/kustomize: build-kustomize-api
cd kustomize; \
go install -ldflags "-X sigs.k8s.io/kustomize/api/provenance.buildDate=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')" \
cd kustomize && go install -ldflags \
"-X sigs.k8s.io/kustomize/api/provenance.buildDate=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ') \
-X sigs.k8s.io/kustomize/api/provenance.version=$(shell git describe --tags --always --dirty)" \
.

kustomize: $(MYGOBIN)/kustomize
Expand All @@ -84,11 +82,11 @@ kustomize: $(MYGOBIN)/kustomize
# plugin-to-api compatibility checks.
.PHONY: build-kustomize-api
build-kustomize-api: $(MYGOBIN)/goimports $(builtinplugins)
cd api; $(MAKE) build
cd api && $(MAKE) build

.PHONY: generate-kustomize-api
generate-kustomize-api:
cd api; $(MAKE) generate
cd api && $(MAKE) generate


# --- Verification targets ---
Expand Down Expand Up @@ -130,12 +128,8 @@ lint: $(MYGOBIN)/golangci-lint $(MYGOBIN)/goimports $(builtinplugins)
./hack/for-each-module.sh "make lint"

.PHONY: apidiff
apidiff: go-apidiff ## Run the go-apidiff to verify any API differences compared with origin/master
$(GOBIN)/go-apidiff master --compare-imports --print-compatible --repo-path=.

.PHONY: go-apidiff
go-apidiff:
go install github.com/joelanford/[email protected]
apidiff: $(MYGOBIN)/go-apidiff ## Run the go-apidiff to verify any API differences compared with origin/master
go-apidiff master --compare-imports --print-compatible --repo-path=.

.PHONY: test-unit-all
test-unit-all: \
Expand All @@ -145,14 +139,14 @@ test-unit-all: \
# This target is used by our Github Actions CI to run unit tests for all non-plugin modules in multiple GOOS environments.
.PHONY: test-unit-non-plugin
test-unit-non-plugin:
./hack/for-each-module.sh "make test" "./plugin/*" 19
./hack/for-each-module.sh "make test" "./plugin/*" 20

.PHONY: build-non-plugin-all
build-non-plugin-all:
./hack/for-each-module.sh "make build" "./plugin/*" 19
./hack/for-each-module.sh "make build" "./plugin/*" 20

.PHONY: test-unit-kustomize-plugins
test-unit-kustomize-plugins:
test-unit-kustomize-plugins: build-kustomize-external-go-plugin
./hack/testUnitKustomizePlugins.sh

.PHONY: functions-examples-all
Expand Down
2 changes: 1 addition & 1 deletion Makefile-plugins.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ generate-kustomize-builtin-plugins: $(builtplugins)
echo "generating $${plugin} ..."; \
set -e; \
cd $${plugin}; \
go generate pluginator .; \
go generate .; \
done

# Check for diff by comparing current revision of generated plugins on HEAD and newly generated plugins on local branch,
Expand Down
85 changes: 40 additions & 45 deletions Makefile-tools.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Copyright 2022 The Kubernetes Authors.
# SPDX-License-Identifier: Apache-2.0

GOLANGCI_LINT_VERSION=v1.51.2

GOOS = $(shell go env GOOS)
GOARCH = $(shell go env GOARCH)
MYGOBIN = $(shell go env GOBIN)
ifeq ($(MYGOBIN),)
MYGOBIN = $(shell go env GOPATH)/bin
endif
export PATH := $(MYGOBIN):$(PATH)

REPO_ROOT=$(shell git rev-parse --show-toplevel)

# determines whether to run tests that only behave locally; can be overridden by override variable
export IS_LOCAL = false

Expand All @@ -18,8 +20,7 @@ install-out-of-tree-tools: \
$(MYGOBIN)/golangci-lint \
$(MYGOBIN)/helmV3 \
$(MYGOBIN)/mdrip \
$(MYGOBIN)/stringer \
$(MYGOBIN)/goimports
$(MYGOBIN)/stringer

.PHONY: uninstall-out-of-tree-tools
uninstall-out-of-tree-tools:
Expand All @@ -29,67 +30,61 @@ uninstall-out-of-tree-tools:
rm -f $(MYGOBIN)/mdrip
rm -f $(MYGOBIN)/stringer

.PHONY: $(MYGOBIN)/golangci-lint
$(MYGOBIN)/golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
cd $(REPO_ROOT)/hack && go install github.com/golangci/golangci-lint/cmd/golangci-lint

.PHONY: $(MYGOBIN)/mdrip
$(MYGOBIN)/mdrip:
go install github.com/monopole/mdrip@v1.0.2
cd $(REPO_ROOT)/hack && go install github.com/monopole/mdrip

.PHONY: $(MYGOBIN)/stringer
$(MYGOBIN)/stringer:
go install golang.org/x/tools/cmd/stringer@latest
cd $(REPO_ROOT)/hack && go install golang.org/x/tools/cmd/stringer

.PHONY: $(MYGOBIN)/goimports
$(MYGOBIN)/goimports:
go install golang.org/x/tools/cmd/goimports@latest
cd $(REPO_ROOT)/hack && go install golang.org/x/tools/cmd/goimports

.PHONY: $(MYGOBIN)/mdtogo
$(MYGOBIN)/mdtogo:
go install sigs.k8s.io/kustomize/cmd/mdtogo@latest
cd $(REPO_ROOT)/hack && go install sigs.k8s.io/kustomize/cmd/mdtogo

.PHONY: $(MYGOBIN)/addlicense
$(MYGOBIN)/addlicense:
go install github.com/google/addlicense@latest

$(MYGOBIN)/goreleaser:
go install github.com/goreleaser/[email protected] # https://github.com/kubernetes-sigs/kustomize/issues/4542
cd $(REPO_ROOT)/hack && go install github.com/google/addlicense

.PHONY: $(MYGOBIN)/kind
$(MYGOBIN)/kind:
( \
set -e; \
d=$(shell mktemp -d); cd $$d; \
wget -O ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(GOOS)-$(GOARCH); \
chmod +x ./kind; \
mv ./kind $(MYGOBIN); \
rm -rf $$d; \
)
cd $(REPO_ROOT)/hack && go install sigs.k8s.io/kind

# linux only.
.PHONY: $(MYGOBIN)/controller-gen
$(MYGOBIN)/controller-gen:
cd $(REPO_ROOT)/hack && go install sigs.k8s.io/controller-tools/cmd/controller-gen

.PHONY: $(MYGOBIN)/embedmd
$(MYGOBIN)/embedmd:
cd $(REPO_ROOT)/hack && go install github.com/campoy/embedmd

.PHONY: $(MYGOBIN)/go-bindata
$(MYGOBIN)/go-bindata:
cd $(REPO_ROOT)/hack && go install github.com/go-bindata/go-bindata/v3/go-bindata

.PHONY: $(MYGOBIN)/go-apidiff
$(MYGOBIN)/go-apidiff:
cd $(REPO_ROOT)/hack && go install github.com/joelanford/go-apidiff

.PHONY: $(MYGOBIN)/gh
$(MYGOBIN)/gh:
( \
set -e; \
d=$(shell mktemp -d); cd $$d; \
tgzFile=gh_1.0.0_$(GOOS)_$(GOARCH).tar.gz; \
wget https://github.com/cli/cli/releases/download/v1.0.0/$$tgzFile; \
tar -xvzf $$tgzFile; \
mv gh_1.0.0_$(GOOS)_$(GOARCH)/bin/gh $(MYGOBIN)/gh; \
rm -rf $$d \
)
cd $(REPO_ROOT)/hack && go install github.com/cli/cli/cmd/gh

# linux only.
# This is for testing an example plugin that
# uses kubeval for validation.
# Don't want to add a hard dependence in go.mod file
# to github.com/instrumenta/kubeval.
# Instead, download the binary.
.PHONY: $(MYGOBIN)/kubeval
$(MYGOBIN)/kubeval:
( \
set -e; \
d=$(shell mktemp -d); cd $$d; \
wget https://github.com/instrumenta/kubeval/releases/latest/download/kubeval-$(GOOS)-$(GOARCH).tar.gz; \
tar xf kubeval-$(GOOS)-$(GOARCH).tar.gz; \
mv kubeval $(MYGOBIN); \
rm -rf $$d; \
)
cd $(REPO_ROOT)/hack && go install github.com/instrumenta/kubeval

# Helm V3 differs from helm V2; downloading it to provide coverage for the
# chart inflator plugin under helm v3.
.PHONY: $(MYGOBIN)/helmV3
$(MYGOBIN)/helmV3:
( \
set -e; \
Expand Down
Loading