kptdev / kpt Goto Github PK
View Code? Open in Web Editor NEWAutomate Kubernetes Configuration Editing
Home Page: https://kpt.dev
License: Apache License 2.0
Automate Kubernetes Configuration Editing
Home Page: https://kpt.dev
License: Apache License 2.0
to reproduce:
kpt pkg get [email protected]:GoogleContainerTools/kpt.git/package-examples/[email protected] helloworld
kpt cfg set helloworld replicas 3
git add . && git commit -m 'fetched helloworld'
kpt pkg diff [email protected]
This should show the replicas diff AND the labels change. It only shows the replicas diff.
If you update the package to v0.2.0, then it will change the labels, but this isn't shown in the diff.
Example Set 1:
image
(as data on ConfigMap input)Example Set 2:
Either in:
https://github.com/GoogleContainerTools/kpt/blob/master/docs/fn/README.md
or one of the child commands, it'd be good to have a link to KPT Functions Catalog:
https://github.com/GoogleContainerTools/kpt-functions-catalog
Trying to deploy the sample to a test GKE cluster failed with:
Failed to pull image "gcr.io/kpt-dev/helloworld-gke:0.1.0": rpc error: code = Unknown desc = Error response from daemon: pull access denied for gcr.io/kpt-dev/helloworld-gke, repository does not exist or may require 'docker login'
Do the images need to be made public?
in docs/fn/README.md:
[kpt-functions-sdk]
[kustomize/kyaml]
Defer explaining CRD support until the basics are clear.
npm init
should install the Kubernetes 1.17 types by default without the need for a cluster. generating from a cluster should be opt-in
orgs will probably want to explicitly choose the types that are used, rather than have them generated ad-hoc per user.
Support Cat, Grep, Tree Commands
There is a bug where the yaml libraries decode
old: resource
---
# Copyright
new: resource
as
old: resource
# Copyright
---
new: resource
To work around this, the ByteWriter
replaces ---
with \n---\n
, which fixes the issue so that the decoded properly recognizes the resource / comment boundaries.
Follow up on this to see if it is an issue in the underlying libraries, or just how we use them.
The guide links to a set of examples, but its unclear which ones are good examples to start with. Also just show me the example next to the interface so I can compare them.
Spending some time in the docs and playing with some of it, what I feel is missing the most is a good walkthrough that takes the user through an entire scenario command by command.
As it stands, there is a lot of great information, but you have to go to the doc for each command one by one and try to figure out how it all fits together.
The walkthrough doesn't have to cover everything, but could include e.g.:
pkg
svr
cfg set
A nice screencast following the same walkthrough would be nice as well.
Add help topics for various tutorials
Right now, it's just a link to some binary, and you're on your own. Some people like more guidance. e.g. on my Mac, there were a bunch of extra step after clicking the link:
kpt
Those may seem trivial, but I think it will lose some readers.
Doc has this example:
$ kpt pkg get https://github.com/GoogleContainerTools/\
kpt.git/package-examples/[email protected] helloworld
But pasting it as is fails because it ends up with an extra space in the middle of the url:
Error: accepts 2 arg(s), received 3
Usage:
kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] LOCAL_DEST_DIRECTORY [flags]
Similar to how we generate .md docs from the built-in command help, we should generate a nicer docs page. Consider using: https://mmistakes.github.io/minimal-mistakes/
https://github.com/GoogleContainerTools/kpt/blob/master/docs/fn/run.md
Caveats
section is very long since it's explaining multiple concepts. It's probably worth creating subsection for eachmetadata.annotations.[config.kubernetes.io/function]
. Otherwise, it's hard to read.Config Functions
-> KPT Functions
?functions
dir is in fact a special dir recognized by kpt).Need to be able to go get kpt.dev
and go get lib.kpt.dev
-- requires configuring the domain to respond with the correct go headers
See: https://golang.org/cmd/go/#hdr-Remote_import_paths
Also see:
https://github.com/GoogleCloudPlatform/govanityurls
kpt:
kustomize:
insert implies update and create, but there is no update, only create and replace
Possibly using GitHub pages.
Sample has:
# Fetch all resources in the cluster and wait up to 5 minutes for all of them to become Current
kubectl get all --all-namespaces -o yaml | resource status fetch
Maybe resource status fetch
is an obsolete name for kpt svr status fetch
?
Allow the GVK -> image mapping to be pulled from the Kptfile for Reconcile
parse :
as separator
kpt reconcile
it should kill the containerskpt reconcile
should timeoutI thought it would be mostly similar to kubectl apply
, but I got an error that didn't make sense to me:
$ kpt svr apply .
error: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/Users/davidebbo/tmp/tmp/helloworld'
The doc doesn't mention needing a kustomization
file, so I'm not sure what I did wrong.
Generate documentation for Kptfile, Filters, etc. Use the go-struct comments to generate both .md docs and built-in kpt help api Kptfile
docs.
source: Hydrate ACM repo
vet: Run validations rules
sink: Write configs into ACM repo format
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.