You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should at lease see how difficult this would be.
so running
kustomize fix
would, say:
copying the kustomization and everything it referred to to a tmp dir
running the build and saving the output to the tmp dir
then (vars specific):
scanning all resources for embedded $VAR placeholders,
computing the target address for a replacement entry (where the $VAR was found),
replacing $VAR with some non-dollar, placeholder value that's legal (could be applied to the cluster)
but perhaps unusual (e.g. the literal string 'placeholder', or the number 99999)
writing the modified resource files and kustomization files back to the tmp dir
running build again to compare the new result to the old result
if no change, copy everything back over the top of the real resources
else report error and don't copy
delete the tmp dir
kustomize fix does not do the copy and compare now, but it should have done so from the start, so part of this work fixes something that should already be there (and that could be peeled off into a different issue done b4fore this one)
The text was updated successfully, but these errors were encountered:
monopole
changed the title
Modify fix command to replace use of vars with replacements
Modify fix command to replace vars with replacementsApr 28, 2021
Currently working on this and commenting to reflect discussion:
Rather than copying the directory, we will have this behind a flag (e.g. kustomize edit fix --vars), and it should output a diff between the previous and new output of kustomize build. In a git repository the changes will be easy to undo if the output is different.
We should at lease see how difficult this would be.
so running
would, say:
build
and saving the output to the tmp dirvars
specific):$VAR
placeholders,$VAR
was found),$VAR
with some non-dollar, placeholder value that's legal (could be applied to the cluster)but perhaps unusual (e.g. the literal string 'placeholder', or the number 99999)
build
again to compare the new result to the old resultkustomize fix
does not do the copy and compare now, but it should have done so from the start, so part of this work fixes something that should already be there (and that could be peeled off into a different issue done b4fore this one)The text was updated successfully, but these errors were encountered: