-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple kubectl plugin for plan functionality
We would like to modularize kpt into composable functionality. Start with creating a kubectl plugin that can hold "plan" functionality.
- Loading branch information
Showing
20 changed files
with
1,126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# kubectl-plan | ||
|
||
kubectl-plan is an experimental kubectl plugin that dry-runs | ||
apply operations and shows the changes in an easy to read format. | ||
|
||
It is still under development and highly experimental, it should | ||
not be treated as stable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"os" | ||
|
||
"github.com/GoogleContainerTools/kpt/plugins/pkg/cmd/plan" | ||
) | ||
|
||
func main() { | ||
if err := Run(context.Background()); err != nil { | ||
fmt.Fprintf(os.Stderr, "%v\n", err) | ||
os.Exit(1) | ||
} | ||
} | ||
|
||
func Run(ctx context.Context) error { | ||
root := plan.NewCommand() | ||
return root.ExecuteContext(ctx) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
module github.com/GoogleContainerTools/kpt/plugins | ||
|
||
go 1.21.3 | ||
|
||
require ( | ||
github.com/google/go-cmp v0.5.9 | ||
github.com/spf13/cobra v1.8.0 | ||
k8s.io/apimachinery v0.28.4 | ||
k8s.io/client-go v0.28.4 | ||
k8s.io/klog v1.0.0 | ||
k8s.io/klog/v2 v2.100.1 | ||
k8s.io/kubectl v0.28.4 | ||
oras.land/oras-go v1.2.4 | ||
sigs.k8s.io/kubebuilder-declarative-pattern v0.13.0 | ||
sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver v0.0.0-20231030230424-f6a5c89244f2 | ||
sigs.k8s.io/kustomize/kyaml v0.15.0 | ||
) | ||
|
||
require ( | ||
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect | ||
github.com/MakeNowJust/heredoc v1.0.0 // indirect | ||
github.com/Microsoft/hcsshim v0.11.0 // indirect | ||
github.com/chai2010/gettext-go v1.0.2 // indirect | ||
github.com/containerd/containerd v1.7.6 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/emicklei/go-restful/v3 v3.10.1 // indirect | ||
github.com/evanphx/json-patch v4.12.0+incompatible // indirect | ||
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect | ||
github.com/go-errors/errors v1.4.2 // indirect | ||
github.com/go-logr/logr v1.2.4 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/btree v1.0.1 // indirect | ||
github.com/google/gnostic-models v0.6.8 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect | ||
github.com/google/uuid v1.3.0 // indirect | ||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect | ||
github.com/imdario/mergo v0.3.13 // indirect | ||
github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/klauspost/compress v1.16.0 // indirect | ||
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mitchellh/go-wordwrap v1.0.1 // indirect | ||
github.com/moby/spdystream v0.2.0 // indirect | ||
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/opencontainers/go-digest v1.0.0 // indirect | ||
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect | ||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/sirupsen/logrus v1.9.3 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/xlab/treeprint v1.2.0 // indirect | ||
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect | ||
golang.org/x/net v0.17.0 // indirect | ||
golang.org/x/oauth2 v0.8.0 // indirect | ||
golang.org/x/sync v0.3.0 // indirect | ||
golang.org/x/sys v0.13.0 // indirect | ||
golang.org/x/term v0.13.0 // indirect | ||
golang.org/x/text v0.13.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect | ||
google.golang.org/grpc v1.56.3 // indirect | ||
google.golang.org/protobuf v1.31.0 // indirect | ||
gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/api v0.28.4 // indirect | ||
k8s.io/cli-runtime v0.28.4 // indirect | ||
k8s.io/component-base v0.28.4 // indirect | ||
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect | ||
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect | ||
sigs.k8s.io/controller-runtime v0.13.0 // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/kustomize/api v0.15.0 // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect | ||
sigs.k8s.io/yaml v1.3.0 // indirect | ||
) |
Oops, something went wrong.