-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
convert vars to replacements #3926
convert vars to replacements #3926
Conversation
Skipping CI for Draft Pull Request. |
/test all |
362dedb
to
421f4ff
Compare
421f4ff
to
17e56e5
Compare
f55cc7f
to
9e6e1bc
Compare
fc96cbb
to
a9ca134
Compare
a9ca134
to
7d8661d
Compare
@monopole would appreciate some initial feedback on this, thanks! |
7d8661d
to
eb0c3d5
Compare
eb0c3d5
to
46a0144
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Just an ask to move some code around
api/types/kustomization.go
Outdated
@@ -263,3 +578,21 @@ func (k *Kustomization) Unmarshal(y []byte) error { | |||
*k = nk | |||
return nil | |||
} | |||
|
|||
func stringInSlice(elem string, slice []string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api/internal/utils.StringSliceContains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't be able to use this after moving the code to kustomize/kustomize/commands/edit/fix
because it's an internal package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, true
api/types/kustomization.go
Outdated
return false | ||
} | ||
|
||
func indexOf(varName string, slice []string) int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api/internal/utils.StringSliceIndex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
46a0144
to
81a755d
Compare
81a755d
to
f121e74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: monopole, natasha41575 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
addresses #3849
Would appreciate any suggestions for tests. I also was struggling to think of a good way to output the diff. It seems like a bit much to output the entire old build output and the new build output.
Sample output:
If there is a difference in the output of
kustomize build
before and after the change:ALLOW_MODULE_SPAN