Kpt questions

54 views
Skip to first unread message

Warren Strange

unread,
Apr 13, 2020, 3:20:27 PM4/13/20
to kpt-users

Some Qs on Kpt if I may:

  • Kustomize: Is there any intent to merge in Kustomize functionality into Kpt? I have a hard time selling yet antother tool to my users, but if it replaced kustomize (the standalone kustomize, not the kubectl integrated one) it would be easier.
  • I tried to fiddle with kpt to see if it could perform editiing on a skaffold.yaml to replace buildArgs. I didn't have much luck. Is general editing of arbitrary yaml in scope (say a Skaffold file), or is Kpt squarely aimed at Kube yaml?   
  • What is the scope of resources included in a Kptfile? Does it traverse down the tree to any level, or is there some resource spec in Kptfile that controls this?

Thanks

Chris Sosa

unread,
Apr 13, 2020, 3:43:47 PM4/13/20
to Warren Strange, kpt-users
Hey Warren,

I'll take a quick stab at answering some of these questions but hope others can chime in.

On Mon, Apr 13, 2020 at 12:20 PM Warren Strange <warren....@gmail.com> wrote:

Some Qs on Kpt if I may:

  • Kustomize: Is there any intent to merge in Kustomize functionality into Kpt? I have a hard time selling yet antother tool to my users, but if it replaced kustomize (the standalone kustomize, not the kubectl integrated one) it would be easier.
This is a really good question. I absolutely agree that it would be super valuable to not have to learn a new tool. Kpt was modeled as being complementary to other tools including Kustomize but I agree that there's a lot of overlap with Kpt Fn as well as Kustomize plugins. We've been discussing with some of the Kustomize maintainers at ways to ideally bridge these two - so you could have portable configuration pipelines (meaning individual components / functions / generators/transformers) could be composed. Still think we're not there yet, but it's an active discussion.
 
  • I tried to fiddle with kpt to see if it could perform editiing on a skaffold.yaml to replace buildArgs. I didn't have much luck. Is general editing of arbitrary yaml in scope (say a Skaffold file), or is Kpt squarely aimed at Kube yaml?  
How did you try - what errors did you get? I'm assuming you're trying to put setters in the skaffold file? That kpt cfg can be used with?

  • What is the scope of resources included in a Kptfile? Does it traverse down the tree to any level, or is there some resource spec in Kptfile that controls this?
Kpt packages should be trees rather than flat directories. There's still some useability gaps with composite packages (nested kpt files) but I'll let others chime in here better.
 

Thanks

--
You received this message because you are subscribed to the Google Groups "kpt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kpt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kpt-users/e26c69ff-3cf7-4e91-b913-ab3ef632b92c%40googlegroups.com.

Phillip Wittrock

unread,
Apr 13, 2020, 6:13:39 PM4/13/20
to Warren Strange, Jeffrey Regan, kpt-users
  • Kustomize: Is there any intent to merge in Kustomize functionality into Kpt? I have a hard time selling yet antother tool to my users, but if it replaced kustomize (the standalone kustomize, not the kubectl integrated one) it would be easier.


Yes this is planned -- we are still considering what the integration would look like.  One option that has been discussed is to include the kustomize binary as a subcommand, and also have the `live` subcommands natively work against kustomize dirs.  A topic of discussion has been whether to integrate kustomize as a subcommand early and follow up with deeper integrations (to deliver incremental value), or to wait until kustomize can be uniformly integrated (for a more consistent experience).

  • I tried to fiddle with kpt to see if it could perform editiing on a skaffold.yaml to replace buildArgs. I didn't have much luck. Is general editing of arbitrary yaml in scope (say a Skaffold file), or is Kpt squarely aimed at Kube yaml? 
Yes this should work.  The following is an example of using kpt with a skaffold yaml.

$ kpt pkg get https://github.com/GoogleContainerTools/skaffold/examples/hot-reload/ hot-reload # get a skaffold package
$ kpt cfg create-setter hot-reload/ debug 1  --field DEBUG # create a setter in the package
$ kpt cfg set hot-reload/ debug 0 # change the skaffold package using the setter

Or

$ kpt cfg create-setter hot-reload/ debug 1 --field buildArgs.DEBUG
$ kpt cfg set hot-reload/ debug 0
 
  • What is the scope of resources included in a Kptfile? Does it traverse down the tree to any level, or is there some resource spec in Kptfile that controls this?
As Chris said the Kptfile is scoped to the directory that it resides in + subdirectories.   Scoping for nested kpt packages has limited support.

Warren Strange

unread,
Apr 13, 2020, 6:35:15 PM4/13/20
to kpt-users

Awesome - that example was just what I needed to get me started.



Thx!
 

$ kpt pkg get https://github.com/GoogleContainerTools/skaffold/examples/hot-reload/ hot-reload # get a skaffold package
$ kpt cfg create-setter hot-reload/ debug 1  --field DEBUG # create a setter in the package
$ kpt cfg set hot-reload/ debug 0 # change the skaffold package using the setter

Or

$ kpt cfg create-setter hot-reload/ debug 1 --field buildArgs.DEBUG
$ kpt cfg set hot-reload/ debug 0
 
  • What is the scope of resources included in a Kptfile? Does it traverse down the tree to any level, or is there some resource spec in Kptfile that controls this?
As Chris said the Kptfile is scoped to the directory that it resides in + subdirectories.   Scoping for nested kpt packages has limited support.
 

Thanks

--
You received this message because you are subscribed to the Google Groups "kpt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kpt-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages