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

[QUESTION] Future of the kustomize exec plugin given their upcoming deprecation? #34

Closed
jskrzypek opened this issue Jun 24, 2022 · 5 comments

Comments

@jskrzypek
Copy link
Contributor

The current Kustomize docs say that the previous/existing plugin methods (via --enable-alpha-plugins) are going to be deprecated:
Screen Shot 2022-06-24 at 3 24 02 PM

Clicking through the links to the kustomize plugins KEP PR and the KEP itself, it seems they intend the current plugin ecosystem to be replaced with KRM-style functions (which it that mentions kpt also uses).

@mgoltzsche Are you aware of these changes? Does the fact that khelm is also available as a kpt function mean that it is (in a way) already forward-compatible with the deprecation?

@jskrzypek
Copy link
Contributor Author

jskrzypek commented Jun 24, 2022

Reading up a little more on the state of things in kustomize-land, it looks like the latest version of kustomize should already support the container version of the kpt function usage you describe if you pass --enable-alpha-plugins

@jskrzypek
Copy link
Contributor Author

Hey I answered my question! Aside from the possibility of some QoL improvements to the API, this works with the new sort of invocation. I opened a PR with docs and an example: #35

@mgoltzsche
Copy link
Owner

mgoltzsche commented Jun 24, 2022

@jskrzypek I wasn't aware that kustomize exec plugins are deprectated already but it makes sense to me, given that kustomize also supports KRM functions now.
The KRM function support that I've implemented and tested with an older kpt version could also work with kustomize indeed - I just haven't tested that.
However the KRM function specification changed recently so that declarative function containers are not allowed to use the file system or network which is why the khelm kept function approach documented in the readme of this repo doesn't work anymore - I have to update the readme. As I understand this is to enforce gitops best practices and for security reasons.
Fortunately you can still use khelm as imperative function, e.g. to write a helm chart's output into a kustomization directory and commit the result, whenever you update the chart dependency. For instance like this. kustomize may provide a similar command.

@jskrzypek
Copy link
Contributor Author

So with modern kustomize at least (I think I tested on 4.5) you can get it to work with the --enable-alpha-plugins & --network flags to enable network access. I tested it with the example I provided in #35

@mgoltzsche
Copy link
Owner

mgoltzsche commented Jun 25, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants