diff --git a/CODEOWNERS b/CODEOWNERS index f71cd58e56..f3d1f4b030 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,5 +1,5 @@ # Docs need to have a single approver to maintain consistency. -/site @droot @frankfarzan @phanimarupaka @mengqiy +/site @droot @frankfarzan @phanimarupaka @mengqiy @yuwenma @natasha41575 # These packages are referenced in docs. /package-examples/nginx/ @droot @mortent @phanimarupaka @mengqiy /package-examples/wordpress/ @droot @mortent @phanimarupaka @mengqiy diff --git a/Formula/kpt.rb b/Formula/kpt.rb index 0de3e08023..241744dd8c 100644 --- a/Formula/kpt.rb +++ b/Formula/kpt.rb @@ -15,8 +15,8 @@ class Kpt < Formula desc "Toolkit to manage,and apply Kubernetes Resource config data files" homepage "https://googlecontainertools.github.io/kpt" - url "https://github.com/GoogleContainerTools/kpt/archive/v1.0.0-beta.7.tar.gz" - sha256 "e31e7ee63006150f730ed8a08e9063a2fb2faf9e617353e3649ef893bdf7c156" + url "https://github.com/GoogleContainerTools/kpt/archive/v1.0.0-beta.13.tar.gz" + sha256 "d98a95f1de38fc8c7dee861ec249874ea3ddf03f5a28ae7fc4a0364d3578667b" depends_on "go" => :build diff --git a/LICENSE b/LICENSE index 9441df3dcb..d645695673 100644 --- a/LICENSE +++ b/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Google LLC + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -199,4 +199,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/MAINTAINERS b/MAINTAINERS index bf11c915fb..656138ddce 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2,4 +2,6 @@ Mortent Torkildsen Sunil Arora Frank Farzan Phani Teja Marupaka -Mengqi Yu \ No newline at end of file +Mengqi Yu +Yuwen Ma +Natasha Sarkar \ No newline at end of file diff --git a/docs/design-docs/01-live-invenstory-to-rg.md b/docs/design-docs/01-live-invenstory-to-rg.md index ce2e50f86f..b300cc7cb7 100644 --- a/docs/design-docs/01-live-invenstory-to-rg.md +++ b/docs/design-docs/01-live-invenstory-to-rg.md @@ -72,7 +72,7 @@ resoucegroup.yaml ```yaml apiVersion: kpt.dev/v1alpha1 kind: ResourceGroup -metadata +metadata: name: namespace: labels: diff --git a/internal/cmdapply/cmdapply.go b/internal/cmdapply/cmdapply.go index de0aedebc7..a5391fdc41 100644 --- a/internal/cmdapply/cmdapply.go +++ b/internal/cmdapply/cmdapply.go @@ -108,6 +108,7 @@ type Runner struct { pruneTimeout time.Duration inventoryPolicyString string dryRun bool + rgFile string printStatusEvents bool inventoryPolicy inventory.InventoryPolicy @@ -166,7 +167,7 @@ func (r *Runner) runE(c *cobra.Command, args []string) error { } } - objs, inv, err := live.Load(r.factory, path, c.InOrStdin()) + objs, inv, err := live.Load(r.factory, path, r.rgFile, c.InOrStdin()) if err != nil { return err } diff --git a/internal/cmddestroy/cmddestroy.go b/internal/cmddestroy/cmddestroy.go index 5d71c70758..7ddbddf677 100644 --- a/internal/cmddestroy/cmddestroy.go +++ b/internal/cmddestroy/cmddestroy.go @@ -83,6 +83,7 @@ type Runner struct { output string inventoryPolicyString string dryRun bool + rgFile string printStatusEvents bool inventoryPolicy inventory.InventoryPolicy @@ -128,7 +129,7 @@ func (r *Runner) runE(c *cobra.Command, args []string) error { } } - _, inv, err := live.Load(r.factory, path, c.InOrStdin()) + _, inv, err := live.Load(r.factory, path, r.rgFile, c.InOrStdin()) if err != nil { return err } diff --git a/internal/cmdliveinit/cmdliveinit.go b/internal/cmdliveinit/cmdliveinit.go index a313dad390..75b61779f3 100644 --- a/internal/cmdliveinit/cmdliveinit.go +++ b/internal/cmdliveinit/cmdliveinit.go @@ -6,8 +6,11 @@ package cmdliveinit import ( "context" "crypto/sha1" + goerrors "errors" "fmt" + "io/ioutil" "os" + "path/filepath" "strconv" "strings" "time" @@ -16,9 +19,11 @@ import ( "github.com/GoogleContainerTools/kpt/internal/errors" "github.com/GoogleContainerTools/kpt/internal/pkg" "github.com/GoogleContainerTools/kpt/internal/printer" + "github.com/GoogleContainerTools/kpt/internal/types" "github.com/GoogleContainerTools/kpt/internal/util/attribution" "github.com/GoogleContainerTools/kpt/internal/util/pathutil" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" "github.com/spf13/cobra" "k8s.io/cli-runtime/pkg/genericclioptions" @@ -26,6 +31,7 @@ import ( "sigs.k8s.io/cli-utils/pkg/common" "sigs.k8s.io/cli-utils/pkg/config" "sigs.k8s.io/kustomize/kyaml/filesys" + "sigs.k8s.io/kustomize/kyaml/yaml" ) const defaultInventoryName = "inventory" @@ -38,6 +44,24 @@ func (i *InvExistsError) Error() string { return "inventory information already set for package" } +// InvInRGExistsError defines new error when the inventory +// values have already been set on the ResourceGroup file and we will warn +// the user to migrate rather than init. This is part of kpt live STDIN work. +type InvInRGExistsError struct{} + +func (i *InvInRGExistsError) Error() string { + return "inventory information already set for package" +} + +// InvInKfExistsError defines new error when the inventory +// values have already been set on the Kptfile and we will warn +// the user to migrate rather than init. This is part of kpt live STDIN work. +type InvInKfExistsError struct{} + +func (i *InvInKfExistsError) Error() string { + return "inventory information already set within Kptfile for package" +} + func NewRunner(ctx context.Context, factory k8scmdutil.Factory, ioStreams genericclioptions.IOStreams) *Runner { r := &Runner{ @@ -76,6 +100,7 @@ type Runner struct { Force bool // Set inventory values even if already set in Kptfile Name string // Inventory object name namespace string // Inventory object namespace + RGFile string // resourcegroup object filepath InventoryID string // Inventory object unique identifier label Quiet bool // Output message during initialization } @@ -112,6 +137,7 @@ func (r *Runner) runE(_ *cobra.Command, args []string) error { Quiet: r.Quiet, Name: r.Name, InventoryID: r.InventoryID, + RGFileName: r.RGFile, Force: r.Force, }).Run(r.ctx) if err != nil { @@ -129,12 +155,22 @@ type ConfigureInventoryInfo struct { Name string InventoryID string + RGFileName string Force bool } // Run updates the inventory info in the package given by the Path. func (c *ConfigureInventoryInfo) Run(ctx context.Context) error { + // Use ResourceGroup file for inventory logic if the resourcegroup file + // is set directly. For this feature gate, the resourcegroup must be directly set + // through our tests since we are not exposing this through the command surface as a + // flag, currently. When we promote this, the resourcegroup filename can be empty and + // the default filename value will be inferred/used. + if c.RGFileName != "" { + return c.runLiveInitWithRGFile(ctx) + } + const op errors.Op = "cmdliveinit.Run" pr := printer.FromContextOrDie(ctx) @@ -189,6 +225,119 @@ func (c *ConfigureInventoryInfo) Run(ctx context.Context) error { return nil } +// func runLiveInitWithRGFile is a modified version of ConfigureInventoryInfo.Run that stores the +// package inventory information in a separate resourcegroup file. The logic for this is branched into +// a separate function to enable feature gating. +func (c *ConfigureInventoryInfo) runLiveInitWithRGFile(ctx context.Context) error { + const op errors.Op = "cmdliveinit.runLiveInitWithRGFile" + pr := printer.FromContextOrDie(ctx) + + namespace, err := config.FindNamespace(c.Factory.ToRawKubeConfigLoader(), c.Pkg.UniquePath.String()) + if err != nil { + return errors.E(op, c.Pkg.UniquePath, err) + } + namespace = strings.TrimSpace(namespace) + if !c.Quiet { + pr.Printf("initializing ResourceGroup inventory info (namespace: %s)...", namespace) + } + + // Autogenerate the name if it is not provided through the flag. + if c.Name == "" { + randomSuffix := common.RandomStr() + c.Name = fmt.Sprintf("%s-%s", defaultInventoryName, randomSuffix) + } + + // Finally, create a ResourceGroup containing the inventory information. + err = createRGFile(c.Pkg, &kptfilev1.Inventory{ + Namespace: namespace, + Name: c.Name, + InventoryID: c.InventoryID, + }, c.RGFileName, c.Force) + if !c.Quiet { + if err == nil { + pr.Printf("success\n") + } else { + pr.Printf("failed\n") + } + } + if err != nil { + return errors.E(op, c.Pkg.UniquePath, err) + } + // add metrics annotation to package resources to track the usage as the resources + // will be applied using kpt live group + at := attribution.Attributor{PackagePaths: []string{c.Pkg.UniquePath.String()}, CmdGroup: "live"} + at.Process() + return nil +} + +// createRGFile fills in the inventory object values into the resourcegroup object and writes to file storage. +func createRGFile(p *pkg.Pkg, inv *kptfilev1.Inventory, filename string, force bool) error { + const op errors.Op = "cmdliveinit.createRGFile" + // Read the resourcegroup object io io.dir + rg, err := p.ReadRGFile(filename) + if err != nil && !goerrors.Is(err, os.ErrNotExist) { + return errors.E(op, p.UniquePath, err) + } + + // Read the Kptfile to ensure that inventory information is not in Kptfile either. + kf, err := p.Kptfile() + if err != nil { + return errors.E(op, p.UniquePath, err) + } + // Validate the inventory values don't exist in Kptfile. + isEmpty := kptfileInventoryEmpty(kf.Inventory) + if !isEmpty && !force { + return errors.E(op, p.UniquePath, &InvInKfExistsError{}) + } + // Set the Kptfile inventory to be nil if we force write to resourcegroup instead. + kf.Inventory = nil + + // Validate the inventory values don't already exist in Resourcegroup. + if rg != nil && !force { + return errors.E(op, p.UniquePath, &InvExistsError{}) + } + // Initialize new resourcegroup object, as rg should have been nil. + rg = &rgfilev1alpha1.ResourceGroup{ResourceMeta: rgfilev1alpha1.DefaultMeta} + // // Finally, set the inventory parameters in the ResourceGroup object and write it. + rg.Name = inv.Name + rg.Namespace = inv.Namespace + if inv.InventoryID != "" { + rg.Labels = map[string]string{rgfilev1alpha1.RGInventoryIDLabel: inv.InventoryID} + } + if err := writeRGFile(p.UniquePath.String(), rg, filename); err != nil { + return errors.E(op, p.UniquePath, err) + } + + // Rewrite Kptfile without inventory existing Kptfile contains inventory info. This + // is required when a user appends the force flag. + if !isEmpty { + if err := kptfileutil.WriteFile(p.UniquePath.String(), kf); err != nil { + return errors.E(op, p.UniquePath, err) + } + } + + return nil +} + +// writeRGFile writes a ResourceGroup inventory to local disk. +func writeRGFile(dir string, rg *rgfilev1alpha1.ResourceGroup, filename string) error { + const op errors.Op = "cmdliveinit.writeRGFile" + b, err := yaml.MarshalWithOptions(rg, &yaml.EncoderOptions{SeqIndent: yaml.WideSequenceStyle}) + if err != nil { + return err + } + if _, err := os.Stat(filepath.Join(dir, filename)); err != nil && !goerrors.Is(err, os.ErrNotExist) { + return errors.E(op, errors.IO, types.UniquePath(dir), err) + } + + // fyi: perm is ignored if the file already exists + err = ioutil.WriteFile(filepath.Join(dir, filename), b, 0600) + if err != nil { + return errors.E(op, errors.IO, types.UniquePath(dir), err) + } + return nil +} + // Run fills in the inventory object values into the Kptfile. func updateKptfile(p *pkg.Pkg, inv *kptfilev1.Inventory, force bool) error { const op errors.Op = "cmdliveinit.updateKptfile" diff --git a/internal/cmdliveinit/cmdliveinit_test.go b/internal/cmdliveinit/cmdliveinit_test.go index 043ed1172d..c909e04d87 100644 --- a/internal/cmdliveinit/cmdliveinit_test.go +++ b/internal/cmdliveinit/cmdliveinit_test.go @@ -14,6 +14,7 @@ import ( "github.com/GoogleContainerTools/kpt/internal/printer/fake" "github.com/GoogleContainerTools/kpt/internal/testutil" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "github.com/stretchr/testify/assert" "k8s.io/cli-runtime/pkg/genericclioptions" cmdtesting "k8s.io/kubectl/pkg/cmd/testing" @@ -59,6 +60,14 @@ inventory: var testTime = time.Unix(5555555, 66666666) +var resourceGroupInventory = ` +apiVersion: kpt.dev/v1alpha1 +kind: ResourceGroup +metadata: + name: foo + namespace: test-namespace +` + func TestCmd_generateID(t *testing.T) { testCases := map[string]struct { namespace string @@ -131,6 +140,8 @@ func TestCmd_Run_NoKptfile(t *testing.T) { func TestCmd_Run(t *testing.T) { testCases := map[string]struct { kptfile string + resourcegroup string + rgfilename string name string namespace string inventoryID string @@ -162,15 +173,47 @@ func TestCmd_Run(t *testing.T) { InventoryID: "my-inv-id", }, }, + "Provided values are used with custom resourcegroup filename": { + kptfile: kptFile, + rgfilename: "custom-rg.yaml", + name: "my-pkg", + namespace: "my-ns", + inventoryID: "my-inv-id", + expectedInventory: kptfilev1.Inventory{ + Namespace: "my-ns", + Name: "my-pkg", + InventoryID: "my-inv-id", + }, + }, "Kptfile with inventory already set is error": { kptfile: kptFileWithInventory, name: inventoryName, namespace: inventoryNamespace, inventoryID: inventoryID, force: false, + expectedErrorMsg: "inventory information already set", + }, + "ResourceGroup with inventory already set is error": { + kptfile: kptFile, + resourcegroup: resourceGroupInventory, + rgfilename: "resourcegroup.yaml", + name: inventoryName, + namespace: inventoryNamespace, + inventoryID: inventoryID, + force: false, expectedErrorMsg: "inventory information already set for package", }, - "The force flag allows changing inventory information even if already set": { + "ResourceGroup with inventory and Kptfile with inventory already set is error": { + kptfile: kptFileWithInventory, + resourcegroup: resourceGroupInventory, + rgfilename: "resourcegroup.yaml", + name: inventoryName, + namespace: inventoryNamespace, + inventoryID: inventoryID, + force: false, + expectedErrorMsg: "inventory information already set", + }, + "The force flag allows changing inventory information even if already set in Kptfile": { kptfile: kptFileWithInventory, name: inventoryName, namespace: inventoryNamespace, @@ -182,6 +225,20 @@ func TestCmd_Run(t *testing.T) { InventoryID: inventoryID, }, }, + "The force flag allows changing inventory information even if already set in ResourceGroup": { + kptfile: kptFile, + resourcegroup: resourceGroupInventory, + rgfilename: "resourcegroup.yaml", + name: inventoryName, + namespace: inventoryNamespace, + inventoryID: inventoryID, + force: true, + expectedInventory: kptfilev1.Inventory{ + Namespace: inventoryNamespace, + Name: inventoryName, + InventoryID: inventoryID, + }, + }, } for tn, tc := range testCases { @@ -199,11 +256,21 @@ func TestCmd_Run(t *testing.T) { t.FailNow() } + // Create ResourceGroup file if testing the STDIN feature. + if tc.resourcegroup != "" && tc.rgfilename != "" { + err := ioutil.WriteFile(filepath.Join(w.WorkspaceDirectory, tc.rgfilename), + []byte(tc.resourcegroup), 0600) + if !assert.NoError(t, err) { + t.FailNow() + } + } + revert := testutil.Chdir(t, w.WorkspaceDirectory) defer revert() runner := NewRunner(fake.CtxWithDefaultPrinter(), tf, ioStreams) runner.namespace = tc.namespace + runner.RGFile = tc.rgfilename args := []string{ "--name", tc.name, "--inventory-id", tc.inventoryID, @@ -224,17 +291,39 @@ func TestCmd_Run(t *testing.T) { return } - // Otherwise, validate the kptfile values + // Otherwise, validate the kptfile values and/or resourcegroup values. + var actualInv kptfilev1.Inventory assert.NoError(t, err) kf, err := pkg.ReadKptfile(filesys.FileSystemOrOnDisk{}, w.WorkspaceDirectory) assert.NoError(t, err) - if !assert.NotNil(t, kf.Inventory) { - t.FailNow() + + switch tc.rgfilename { + case "": + if !assert.NotNil(t, kf.Inventory) { + t.FailNow() + } + actualInv = *kf.Inventory + default: + // Check resourcegroup file if testing the STDIN feature. + rg, err := pkg.ReadRGFile(w.WorkspaceDirectory, tc.rgfilename) + assert.NoError(t, err) + if !assert.NotNil(t, rg) { + t.FailNow() + } + + // Convert resourcegroup inventory back to Kptfile structure so we can share assertion + // logic for Kptfile inventory and ResourceGroup inventory structure. + actualInv = kptfilev1.Inventory{ + Name: rg.Name, + Namespace: rg.Namespace, + InventoryID: rg.Labels[rgfilev1alpha1.RGInventoryIDLabel], + } } - actualInv := *kf.Inventory + expectedInv := tc.expectedInventory assertInventoryName(t, expectedInv.Name, actualInv.Name) assert.Equal(t, expectedInv.Namespace, actualInv.Namespace) + if tc.expectAutoGenID { assertGenInvID(t, actualInv.Name, actualInv.Namespace, actualInv.InventoryID) } else { diff --git a/internal/cmdmigrate/migratecmd.go b/internal/cmdmigrate/migratecmd.go index 1005f32e3e..23a44310af 100644 --- a/internal/cmdmigrate/migratecmd.go +++ b/internal/cmdmigrate/migratecmd.go @@ -6,17 +6,21 @@ package cmdmigrate import ( "bytes" "context" - "errors" + goerrors "errors" "fmt" "io" "io/ioutil" "os" + "path/filepath" "github.com/GoogleContainerTools/kpt/internal/cmdliveinit" "github.com/GoogleContainerTools/kpt/internal/docs/generated/livedocs" + "github.com/GoogleContainerTools/kpt/internal/errors" "github.com/GoogleContainerTools/kpt/internal/pkg" + "github.com/GoogleContainerTools/kpt/internal/types" "github.com/GoogleContainerTools/kpt/internal/util/argutil" "github.com/GoogleContainerTools/kpt/internal/util/pathutil" + "github.com/GoogleContainerTools/kpt/pkg/kptfile/kptfileutil" "github.com/GoogleContainerTools/kpt/pkg/live" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -41,10 +45,12 @@ type MigrateRunner struct { dir string dryRun bool name string + rgFile string force bool rgInvClientFunc func(util.Factory) (inventory.InventoryClient, error) cmInvClientFunc func(util.Factory) (inventory.InventoryClient, error) cmLoader manifestreader.ManifestLoader + cmNotMigrated bool // flag to determine if migration from ConfigMap has occurred } // NewRunner returns a pointer to an initial MigrateRunner structure. @@ -98,6 +104,15 @@ func NewCommand(ctx context.Context, f util.Factory, cmLoader manifestreader.Man // Run executes the migration from the ConfigMap based inventory to the ResourceGroup // based inventory. func (mr *MigrateRunner) Run(reader io.Reader, args []string) error { + // Use ResourceGroup file for inventory logic if the resourcegroup file + // is set directly. For this feature gate, the resourcegroup must be directly set + // through our tests since we are not exposing this through the command surface as a + // flag, currently. When we promote this, the resourcegroup filename can be empty and + // the default filename value will be inferred/used. + if mr.rgFile != "" { + return mr.runLiveMigrateWithRGFile(reader, args) + } + // Validate the number of arguments. if len(args) > 1 { return fmt.Errorf("too many arguments; migrate requires one directory argument (or stdin)") @@ -292,7 +307,7 @@ func (mr *MigrateRunner) migrateObjs(rgInvClient inventory.InventoryClient, } } - _, inv, err := live.Load(mr.factory, path, reader) + _, inv, err := live.Load(mr.factory, path, mr.rgFile, reader) if err != nil { return err } @@ -390,3 +405,176 @@ func rgInvClient(factory util.Factory) (inventory.InventoryClient, error) { func cmInvClient(factory util.Factory) (inventory.InventoryClient, error) { return inventory.NewInventoryClient(factory, inventory.WrapInventoryObj, inventory.InvInfoToConfigMap) } + +// func runLiveMigrateWithRGFile is a modified version of MigrateRunner.Run that stores the +// package inventory information in a separate resourcegroup file. The logic for this is branched into +// a separate function to enable feature gating. +func (mr *MigrateRunner) runLiveMigrateWithRGFile(reader io.Reader, args []string) error { + // Validate the number of arguments. + if len(args) > 1 { + return fmt.Errorf("too many arguments; migrate requires one directory argument (or stdin)") + } + // Validate argument is a directory. + if len(args) == 1 { + var err error + mr.dir, err = config.NormalizeDir(args[0]) + if err != nil { + return err + } + } + // Store the stdin bytes if necessary so they can be used twice. + var stdinBytes []byte + var err error + if len(args) == 0 { + stdinBytes, err = ioutil.ReadAll(reader) + if err != nil { + return err + } + if len(stdinBytes) == 0 { + return fmt.Errorf("no arguments means stdin has data; missing bytes on stdin") + } + } + + // Apply the ResourceGroup CRD to the cluster, ignoring if it already exists. + if err := mr.applyCRD(); err != nil { + return err + } + + // Check if we need to migrate from ConfigMap to ResourceGroup. + if err := mr.migrateCMToRG(stdinBytes, args); err != nil { + return err + } + + // Migrate from Kptfile instead. + if mr.cmNotMigrated { + return mr.migrateKptfileToRG(args) + } + + return nil +} + +// migrateKptfileToRG extracts inventory information from a package's Kptfile +// into an external resourcegroup file. +func (mr *MigrateRunner) migrateKptfileToRG(args []string) error { + const op errors.Op = "migratecmd.migrateKptfileToRG" + klog.V(4).Infoln("attempting to migrate from Kptfile inventory") + fmt.Fprint(mr.ioStreams.Out, " reading existing Kptfile...") + if !mr.dryRun { + dir := args[0] + p, err := pkg.New(filesys.FileSystemOrOnDisk{}, dir) + if err != nil { + return err + } + kf, err := p.Kptfile() + if err != nil { + return err + } + + if _, err := kptfileutil.ValidateInventory(kf.Inventory); err != nil { + // Invalid Kptfile. + return err + } + + // Make sure resourcegroup file does not exist. + _, rgFileErr := os.Stat(filepath.Join(dir, mr.rgFile)) + switch { + case rgFileErr == nil: + return errors.E(op, errors.IO, types.UniquePath(dir), "the resourcegroup file already exists and inventory information cannot be migrated") + case err != nil && !goerrors.Is(err, os.ErrNotExist): + return errors.E(op, errors.IO, types.UniquePath(dir), err) + } + + err = (&cmdliveinit.ConfigureInventoryInfo{ + Pkg: p, + Factory: mr.factory, + Quiet: true, + Name: kf.Inventory.Name, + InventoryID: kf.Inventory.InventoryID, + RGFileName: mr.rgFile, + Force: true, + }).Run(mr.ctx) + + if err != nil { + return err + } + } + fmt.Fprint(mr.ioStreams.Out, "success\n") + return nil +} + +// migrateCMToRG migrates from ConfigMap to resourcegroup object. +func (mr *MigrateRunner) migrateCMToRG(stdinBytes []byte, args []string) error { + // Create the inventory clients for reading inventories based on RG and + // ConfigMap. + rgInvClient, err := mr.rgInvClientFunc(mr.factory) + if err != nil { + return err + } + cmInvClient, err := mr.cmInvClientFunc(mr.factory) + if err != nil { + return err + } + // Retrieve the current ConfigMap inventory objects. + cmInvObj, err := mr.retrieveConfigMapInv(bytes.NewReader(stdinBytes), args) + if err != nil { + if _, ok := err.(inventory.NoInventoryObjError); ok { + // No ConfigMap inventory means the migration has already run before. + klog.V(4).Infoln("swallowing no ConfigMap inventory error") + mr.cmNotMigrated = true + return nil + } + klog.V(4).Infof("error retrieving ConfigMap inventory object: %s", err) + return err + } + cmInventoryID := cmInvObj.ID() + klog.V(4).Infof("previous inventoryID: %s", cmInventoryID) + // Create ResourceGroup object file locallly (e.g. namespace, name, id). + if err := mr.createRGfile(mr.ctx, args, cmInventoryID); err != nil { + return err + } + cmObjs, err := mr.retrieveInvObjs(cmInvClient, cmInvObj) + if err != nil { + return err + } + if len(cmObjs) > 0 { + // Migrate the ConfigMap inventory objects to a ResourceGroup custom resource. + if err = mr.migrateObjs(rgInvClient, cmObjs, bytes.NewReader(stdinBytes), args); err != nil { + return err + } + // Delete the old ConfigMap inventory object. + if err = mr.deleteConfigMapInv(cmInvClient, cmInvObj); err != nil { + return err + } + } + return mr.deleteConfigMapFile() +} + +// createRGfile writes the inventory information into the resourcegroup object. +func (mr *MigrateRunner) createRGfile(ctx context.Context, args []string, prevID string) error { + fmt.Fprint(mr.ioStreams.Out, " creating ResourceGroup object file...") + if !mr.dryRun { + p, err := pkg.New(filesys.FileSystemOrOnDisk{}, args[0]) + if err != nil { + return err + } + err = (&cmdliveinit.ConfigureInventoryInfo{ + Pkg: p, + Factory: mr.factory, + Quiet: true, + InventoryID: prevID, + RGFileName: mr.rgFile, + Force: mr.force, + }).Run(ctx) + + if err != nil { + var invExistsError *cmdliveinit.InvExistsError + if errors.As(err, &invExistsError) { + fmt.Fprint(mr.ioStreams.Out, "values already exist...") + } else { + return err + } + } + } + fmt.Fprint(mr.ioStreams.Out, "success\n") + return nil +} diff --git a/internal/cmdmigrate/migratecmd_test.go b/internal/cmdmigrate/migratecmd_test.go index 21fc03e09f..82b6c9ff9e 100644 --- a/internal/cmdmigrate/migratecmd_test.go +++ b/internal/cmdmigrate/migratecmd_test.go @@ -11,6 +11,7 @@ import ( "github.com/GoogleContainerTools/kpt/internal/pkg" "github.com/GoogleContainerTools/kpt/internal/printer/fake" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/cli-runtime/pkg/genericclioptions" @@ -178,6 +179,118 @@ func TestKptMigrate_updateKptfile(t *testing.T) { } } +func TestKptMigrate_migrateKptfileToRG(t *testing.T) { + testCases := map[string]struct { + kptfile string + rgFilename string + resourcegroup string + dryRun bool + isError bool + }{ + "Missing Kptfile is an error": { + kptfile: "", + rgFilename: "resourcegroup.yaml", + dryRun: false, + isError: true, + }, + "Kptfile with existing inventory will create ResourceGroup": { + kptfile: kptFileWithInventory, + rgFilename: "resourcegroup.yaml", + dryRun: false, + isError: false, + }, + "ResopurceGroup file already exists will error": { + kptfile: kptFileWithInventory, + rgFilename: "resourcegroup.yaml", + resourcegroup: resourceGroupInventory, + dryRun: false, + isError: true, + }, + "Dry-run will not fill in inventory fields": { + kptfile: kptFile, + rgFilename: "resourcegroup.yaml", + dryRun: true, + isError: false, + }, + "Custom ResourceGroup file will be generated": { + kptfile: kptFileWithInventory, + rgFilename: "custom-rg.yaml", + dryRun: false, + isError: false, + }, + } + + for tn, tc := range testCases { + t.Run(tn, func(t *testing.T) { + // Set up fake test factory + tf := cmdtesting.NewTestFactory().WithNamespace(inventoryNamespace) + defer tf.Cleanup() + ioStreams, _, _, _ := genericclioptions.NewTestIOStreams() //nolint:dogsled + + // Set up temp directory with Ktpfile + dir, err := ioutil.TempDir("", "kpt-migrate-test") + assert.NoError(t, err) + p := filepath.Join(dir, "Kptfile") + err = ioutil.WriteFile(p, []byte(tc.kptfile), 0600) + assert.NoError(t, err) + + if tc.resourcegroup != "" { + p := filepath.Join(dir, tc.rgFilename) + err = ioutil.WriteFile(p, []byte(tc.resourcegroup), 0600) + assert.NoError(t, err) + } + + ctx := fake.CtxWithDefaultPrinter() + // Create MigrateRunner and call "updateKptfile" + cmLoader := manifestreader.NewManifestLoader(tf) + migrateRunner := NewRunner(ctx, tf, cmLoader, ioStreams) + migrateRunner.dryRun = tc.dryRun + migrateRunner.rgFile = tc.rgFilename + migrateRunner.cmInvClientFunc = func(factory util.Factory) (inventory.InventoryClient, error) { + return inventory.NewFakeInventoryClient([]object.ObjMetadata{}), nil + } + err = migrateRunner.migrateKptfileToRG([]string{dir}) + // Check if there should be an error + if tc.isError { + if err == nil { + t.Fatalf("expected error but received none") + } + return + } + assert.NoError(t, err) + kf, err := pkg.ReadKptfile(filesys.FileSystemOrOnDisk{}, dir) + if !assert.NoError(t, err) { + t.FailNow() + } + + rg, err := pkg.ReadRGFile(dir, migrateRunner.rgFile) + if !tc.dryRun && !assert.NoError(t, err) { + t.FailNow() + } + + // Ensure the Kptfile does not contain inventory information. + if !assert.Nil(t, kf.Inventory) { + t.Errorf("inventory information should not be set in Kptfile") + } + + if !tc.dryRun { + if rg == nil { + t.Fatalf("unable to read ResourceGroup file") + } + assert.Equal(t, inventoryNamespace, rg.ObjectMeta.Namespace) + if len(rg.ObjectMeta.Name) == 0 { + t.Errorf("inventory name not set in Kptfile") + } + if rg.ObjectMeta.Labels[rgfilev1alpha1.RGInventoryIDLabel] != testInventoryID { + t.Errorf("inventory id not set correctly in ResourceGroup: %s", rg.ObjectMeta.Labels[rgfilev1alpha1.RGInventoryIDLabel]) + } + } else if rg != nil { + t.Errorf("inventory shouldn't be set during dryrun") + } + }) + } +} + func TestKptMigrate_retrieveConfigMapInv(t *testing.T) { testCases := map[string]struct { configMap string @@ -298,6 +411,16 @@ func TestKptMigrate_migrateObjs(t *testing.T) { }, isError: false, }, + "Kptfile does not have inventory is valid": { + invObj: kptFile, + objs: []object.ObjMetadata{}, + isError: false, + }, + "One migrate object is valid with inventory in Kptfile": { + invObj: kptFileWithInventory, + objs: []object.ObjMetadata{object.UnstructuredToObjMetadata(pod1)}, + isError: false, + }, } for tn, tc := range testCases { @@ -376,3 +499,13 @@ upstreamLock: ` var inventoryNamespace = "test-namespace" + +var resourceGroupInventory = ` +apiVersion: kpt.dev/v1alpha1 +kind: ResourceGroup +metadata: + name: foo + namespace: test-namespace + labels: + cli-utils.sigs.k8s.io/inventory-id: SSSSSSSSSS-RRRRR +` diff --git a/internal/errors/resolver/live.go b/internal/errors/resolver/live.go index d01c6dbddd..3e9ad18c93 100644 --- a/internal/errors/resolver/live.go +++ b/internal/errors/resolver/live.go @@ -60,6 +60,16 @@ Error: The ResourceGroup CRD was not found in the cluster. Please install it eit //nolint:lll invInfoAlreadyExistsMsg = ` Error: Inventory information has already been added to the package Kptfile. Changing it after a package has been applied to the cluster can lead to undesired results. Use the --force flag to suppress this error. +` + + //nolint:lll + invInfoInRGAlreadyExistsMsg = ` +Error: Inventory information has already been added to the package ResourceGroup object. Changing it after a package has been applied to the cluster can lead to undesired results. Use the --force flag to suppress this error. +` + + //nolint:lll + invInfoInKfAlreadyExistsMsg = ` +Error: Inventory information has already been added to the package Kptfile object. Please consider migrating to a standalone resourcegroup object using the 'kpt live migrate' command. ` multipleInvInfoMsg = ` @@ -136,6 +146,24 @@ func (*liveErrorResolver) Resolve(err error) (ResolvedResult, bool) { }, true } + var invInfoInRGAlreadyExistsError *cmdliveinit.InvInRGExistsError + if errors.As(err, &invInfoInRGAlreadyExistsError) { + return ResolvedResult{ + Message: ExecuteTemplate(invInfoInRGAlreadyExistsMsg, map[string]interface{}{ + "err": *invInfoInRGAlreadyExistsError, + }), + }, true + } + + var invInKfExistsError *cmdliveinit.InvInKfExistsError + if errors.As(err, &invInKfExistsError) { + return ResolvedResult{ + Message: ExecuteTemplate(invInfoInKfAlreadyExistsMsg, map[string]interface{}{ + "err": *invInKfExistsError, + }), + }, true + } + var multipleInvInfoError *live.MultipleInventoryInfoError if errors.As(err, &multipleInvInfoError) { return ResolvedResult{ diff --git a/internal/pkg/pkg.go b/internal/pkg/pkg.go index de785e58b0..aa759915b4 100644 --- a/internal/pkg/pkg.go +++ b/internal/pkg/pkg.go @@ -29,6 +29,7 @@ import ( "github.com/GoogleContainerTools/kpt/internal/util/git" "github.com/GoogleContainerTools/kpt/internal/util/pathutil" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/kubectl/pkg/util/slice" "sigs.k8s.io/kustomize/kyaml/filesys" @@ -101,6 +102,21 @@ func (e *UnknownKptfileResourceError) Error() string { return fmt.Sprintf("unknown resource type %q found in Kptfile", e.GVK.String()) } +// RGError is an implementation of the error interface that is returned whenever +// kpt encounters errors reading a resourcegroup object file. +type RGError struct { + Path types.UniquePath + Err error +} + +func (rg *RGError) Error() string { + return fmt.Sprintf("error reading ResourceGroup file at %q: %s", rg.Path.String(), rg.Err.Error()) +} + +func (rg *RGError) Unwrap() error { + return rg.Err +} + // Pkg represents a kpt package with a one-to-one mapping to a directory on the local filesystem. type Pkg struct { // fsys represents the FileSystem of the package, it may or may not be FileSystem on disk @@ -124,6 +140,9 @@ type Pkg struct { // A package can contain zero or one Kptfile meta resource. // A nil value represents an implicit package. kptfile *kptfilev1.KptFile + + // A package can contain zero or one ResourceGroup object. + rgFile *rgfilev1alpha1.ResourceGroup } // New returns a pkg given an absolute OS-defined path. @@ -687,3 +706,55 @@ func SetPkgPathAnnotation(rn *yaml.RNode, pkgPath types.UniquePath) error { func RemovePkgPathAnnotation(rn *yaml.RNode) error { return rn.PipeE(yaml.ClearAnnotation(pkgPathAnnotation)) } + +// ReadRGFile returns the resourcegroup object by lazy loading it from the filesytem. +func (p *Pkg) ReadRGFile(filename string) (*rgfilev1alpha1.ResourceGroup, error) { + if p.rgFile == nil { + rg, err := ReadRGFile(p.UniquePath.String(), filename) + if err != nil { + return nil, err + } + p.rgFile = rg + } + return p.rgFile, nil +} + +// TODO(rquitales): Consolidate both Kptfile and ResourceGroup file reading functions to use +// shared logic/function. + +// ReadRGFile reads the KptFile in the given pkg. +func ReadRGFile(path, filename string) (*rgfilev1alpha1.ResourceGroup, error) { + f, err := os.Open(filepath.Join(path, filename)) + if err != nil { + return nil, &RGError{ + Path: types.UniquePath(path), + Err: err, + } + } + defer f.Close() + + rg, err := DecodeRGFile(f) + if err != nil { + return nil, &RGError{ + Path: types.UniquePath(path), + Err: err, + } + } + return rg, nil +} + +// DecodeRGFile converts a string reader into structured a ResourceGroup object. +func DecodeRGFile(in io.Reader) (*rgfilev1alpha1.ResourceGroup, error) { + rg := &rgfilev1alpha1.ResourceGroup{} + c, err := io.ReadAll(in) + if err != nil { + return rg, err + } + + d := yaml.NewDecoder(bytes.NewBuffer(c)) + d.KnownFields(true) + if err := d.Decode(rg); err != nil { + return rg, err + } + return rg, nil +} diff --git a/internal/testutil/pkgbuilder/builder.go b/internal/testutil/pkgbuilder/builder.go index 4e1bfabe3e..5c9bd112da 100644 --- a/internal/testutil/pkgbuilder/builder.go +++ b/internal/testutil/pkgbuilder/builder.go @@ -26,6 +26,7 @@ import ( "text/template" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "github.com/stretchr/testify/assert" "sigs.k8s.io/kustomize/kyaml/yaml" ) @@ -92,6 +93,8 @@ var ( type pkg struct { Kptfile *Kptfile + RGFile *RGFile + resources []resourceInfoWithMutators files map[string]string @@ -99,6 +102,12 @@ type pkg struct { subPkgs []*SubPkg } +// WithRGFile configures the current package to have a resourcegroup file. +func (rp *RootPkg) WithRGFile(rg *RGFile) *RootPkg { + rp.pkg.RGFile = rg + return rp +} + // withKptfile configures the current package to have a Kptfile. Only // zero or one Kptfiles are accepted. func (p *pkg) withKptfile(kf ...*Kptfile) { @@ -300,6 +309,22 @@ func (sp *SubPkg) WithSubPackages(ps ...*SubPkg) *SubPkg { return sp } +// RGFile represents a minimal resourcegroup. +type RGFile struct { + Name, Namespace, ID string +} + +func NewRGFile() *RGFile { + return &RGFile{} +} + +func (rg *RGFile) WithInventory(inv Inventory) *RGFile { + rg.Name = inv.Name + rg.Namespace = inv.Namespace + rg.ID = inv.ID + return rg +} + // Kptfile represents the Kptfile of a package. type Kptfile struct { Upstream *Upstream @@ -476,6 +501,16 @@ func buildPkg(pkgPath string, pkg *pkg, pkgName string, reposInfo ReposInfo) err } } + if pkg.RGFile != nil { + content := buildRGFile(pkg) + + err := ioutil.WriteFile(filepath.Join(pkgPath, rgfilev1alpha1.RGFileName), + []byte(content), 0600) + if err != nil { + return err + } + } + for _, ri := range pkg.resources { m := ri.resourceInfo.manifest r := yaml.MustParse(m) @@ -510,6 +545,23 @@ func buildPkg(pkgPath string, pkg *pkg, pkgName string, reposInfo ReposInfo) err return nil } +// buildRGFile creates a ResourceGroup inventory file. +func buildRGFile(pkg *pkg) string { + tmp := rgfilev1alpha1.ResourceGroup{ResourceMeta: rgfilev1alpha1.DefaultMeta} + tmp.ObjectMeta.Name = pkg.RGFile.Name + tmp.ObjectMeta.Namespace = pkg.RGFile.Namespace + if pkg.RGFile.ID != "" { + tmp.ObjectMeta.Labels = map[string]string{rgfilev1alpha1.RGInventoryIDLabel: pkg.RGFile.ID} + } + + b, err := yaml.MarshalWithOptions(tmp, &yaml.EncoderOptions{SeqIndent: yaml.WideSequenceStyle}) + if err != nil { + panic(err) + } + + return string(b) +} + // TODO: Consider using the Kptfile struct for this instead of a template. var kptfileTemplate = `apiVersion: kpt.dev/v1 kind: Kptfile diff --git a/pkg/api/kptfile/v1/types.go b/pkg/api/kptfile/v1/types.go index 9d483bc305..f4cd5db0a0 100644 --- a/pkg/api/kptfile/v1/types.go +++ b/pkg/api/kptfile/v1/types.go @@ -326,3 +326,10 @@ type Inventory struct { Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty" json:"annotations,omitempty"` } + +func (i Inventory) IsValid() bool { + // Name and Namespace are required inventory fields, so we check these 2 fields. + // InventoryID is an optional field since we only store it locally if the user + // specifies one. + return i.Name != "" && i.Namespace != "" +} diff --git a/pkg/api/resourcegroup/v1alpha1/types.go b/pkg/api/resourcegroup/v1alpha1/types.go new file mode 100644 index 0000000000..0d9741ffdd --- /dev/null +++ b/pkg/api/resourcegroup/v1alpha1/types.go @@ -0,0 +1,47 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package defines ResourceGroup schema. +// Version: v1alpha1 +// swagger:meta +package v1alpha1 + +import ( + "sigs.k8s.io/cli-utils/pkg/common" + "sigs.k8s.io/kustomize/kyaml/yaml" +) + +const ( + RGFileName = "resourcegroup.yaml" + RGFileKind = "ResourceGroup" + RGFileGroup = "kpt.dev" + RGFileVersion = "v1alpha1" + RGFileAPIVersion = RGFileGroup + "/" + RGFileVersion + // RGInventoryIDLabel is the label name used for storing an inventory ID. + RGInventoryIDLabel = common.InventoryLabel +) + +// DefaultMeta is the ResourceMeta for ResourceGroup instances. +var DefaultMeta = yaml.ResourceMeta{ + TypeMeta: yaml.TypeMeta{ + APIVersion: RGFileAPIVersion, + Kind: RGFileKind, + }, +} + +// ResourceGroup contains the inventory information about a package managed with kpt. +// swagger:model resourcegroup +type ResourceGroup struct { + yaml.ResourceMeta `yaml:",inline" json:",inline"` +} diff --git a/pkg/live/load.go b/pkg/live/load.go index dd6cd4647a..a3665be8ef 100644 --- a/pkg/live/load.go +++ b/pkg/live/load.go @@ -25,6 +25,7 @@ import ( "github.com/GoogleContainerTools/kpt/internal/util/pathutil" "github.com/GoogleContainerTools/kpt/internal/util/strings" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/kubectl/pkg/cmd/util" "sigs.k8s.io/cli-utils/pkg/common" @@ -51,7 +52,15 @@ func (e *InventoryInfoValidationError) Error() string { type MultipleInventoryInfoError struct{} func (e *MultipleInventoryInfoError) Error() string { - return "multiple Kptfiles contains inventory information" + return "multiple inventory information found in package" +} + +// NoInvInfoError is the error returned if there are no inventory information +// provided in either a stream or locally. +type NoInvInfoError struct{} + +func (e *NoInvInfoError) Error() string { + return "no inventory information was provided within the stream or package" } // Load reads resources either from disk or from an input stream. It filters @@ -60,26 +69,58 @@ func (e *MultipleInventoryInfoError) Error() string { // for inventory information inside Kptfile resources. // It returns the resources in unstructured format and the inventory information. // If no inventory information is found, that is not considered an error here. -func Load(f util.Factory, path string, stdIn io.Reader) ([]*unstructured.Unstructured, kptfilev1.Inventory, error) { +func Load(f util.Factory, path, rgfile string, stdIn io.Reader) ([]*unstructured.Unstructured, kptfilev1.Inventory, error) { if path == "-" { - return loadFromStream(f, stdIn) + return loadFromStream(f, stdIn, rgfile) } - return loadFromDisk(f, path) + return loadFromDisk(f, path, rgfile) } // loadFromStream reads resources from the provided reader and returns the // filtered resources and any inventory information found in Kptfile resources. // If there is more than one Kptfile in the stream with inventory information, that // is considered an error. -func loadFromStream(f util.Factory, r io.Reader) ([]*unstructured.Unstructured, kptfilev1.Inventory, error) { +func loadFromStream(f util.Factory, r io.Reader, rgfile string) ([]*unstructured.Unstructured, kptfilev1.Inventory, error) { var stdInBuf bytes.Buffer tee := io.TeeReader(r, &stdInBuf) + // Check if stream contains inventory info. invInfo, err := readInvInfoFromStream(tee) if err != nil { return nil, kptfilev1.Inventory{}, err } + // Check resourcegroup file for inventory information if file is specified. + if rgfile != "" { + cwd, err := os.Getwd() + if err != nil { + return nil, kptfilev1.Inventory{}, err + } + + diskInv, err := readInvInfoFromDisk(cwd, rgfile) + if err != nil { + return nil, kptfilev1.Inventory{}, err + } + + if diskInv.IsValid() && invInfo.IsValid() { + return nil, kptfilev1.Inventory{}, &MultipleInventoryInfoError{} + } + + if !diskInv.IsValid() && !invInfo.IsValid() { + return nil, kptfilev1.Inventory{}, &NoInvInfoError{} + } + + if diskInv.IsValid() { + invInfo = diskInv + } + + } + + // Stream does not contain a valid inventory and no local inventory does not exist, or is not valid. + if !invInfo.IsValid() { + return nil, kptfilev1.Inventory{}, &NoInvInfoError{} + } + ro, err := toReaderOptions(f) if err != nil { return nil, kptfilev1.Inventory{}, err @@ -98,6 +139,7 @@ func loadFromStream(f util.Factory, r io.Reader) ([]*unstructured.Unstructured, func readInvInfoFromStream(in io.Reader) (kptfilev1.Inventory, error) { invFilter := &InventoryFilter{} + rgFilter := &RGFilter{} if err := (&kio.Pipeline{ Inputs: []kio.Reader{ &kio.ByteReader{ @@ -107,18 +149,31 @@ func readInvInfoFromStream(in io.Reader) (kptfilev1.Inventory, error) { }, Filters: []kio.Filter{ kio.FilterAll(invFilter), + kio.FilterAll(rgFilter), }, }).Execute(); err != nil { return kptfilev1.Inventory{}, err } - if len(invFilter.Inventories) > 1 { + if len(invFilter.Inventories) > 1 || + len(rgFilter.Inventories) > 1 || + (len(invFilter.Inventories) > 0 && len(rgFilter.Inventories) > 0) { return kptfilev1.Inventory{}, &MultipleInventoryInfoError{} } if len(invFilter.Inventories) == 1 { return *invFilter.Inventories[0], nil } + + if len(rgFilter.Inventories) == 1 { + invID := rgFilter.Inventories[0].Labels[rgfilev1alpha1.RGInventoryIDLabel] + return kptfilev1.Inventory{ + Name: rgFilter.Inventories[0].Name, + Namespace: rgFilter.Inventories[0].Namespace, + InventoryID: invID, + }, nil + } + return kptfilev1.Inventory{}, nil } @@ -126,8 +181,8 @@ func readInvInfoFromStream(in io.Reader) (kptfilev1.Inventory, error) { // It returns the filtered resources and any inventory information found in // Kptfile resources. // Only the Kptfile in the root directory will be checked for inventory information. -func loadFromDisk(f util.Factory, path string) ([]*unstructured.Unstructured, kptfilev1.Inventory, error) { - invInfo, err := readInvInfoFromDisk(path) +func loadFromDisk(f util.Factory, path, rgfile string) ([]*unstructured.Unstructured, kptfilev1.Inventory, error) { + invInfo, err := readInvInfoFromDisk(path, rgfile) if err != nil { return nil, kptfilev1.Inventory{}, err } @@ -148,7 +203,7 @@ func loadFromDisk(f util.Factory, path string) ([]*unstructured.Unstructured, kp return objs, invInfo, nil } -func readInvInfoFromDisk(path string) (kptfilev1.Inventory, error) { +func readInvInfoFromDisk(path, rgfile string) (kptfilev1.Inventory, error) { absPath, _, err := pathutil.ResolveAbsAndRelPaths(path) if err != nil { return kptfilev1.Inventory{}, err @@ -158,12 +213,45 @@ func readInvInfoFromDisk(path string) (kptfilev1.Inventory, error) { return kptfilev1.Inventory{}, err } + // Read Kptfile for inventory. We ignore errors if no local Kptfile as that could + // be provided via STDIN. kf, err := p.Kptfile() - if err != nil && errors.Is(err, os.ErrNotExist) { - return kptfilev1.Inventory{}, nil + if rgfile == "" { + if err != nil && errors.Is(err, os.ErrNotExist) { + return kptfilev1.Inventory{}, nil + } + if err != nil { + return kptfilev1.Inventory{}, err + } } - if err != nil { - return kptfilev1.Inventory{}, err + + // Check if resourcegroup exists and use inventory info from there if provided. + if rgfile != "" { + rg, err := p.ReadRGFile(rgfile) + if err != nil && !errors.Is(err, os.ErrNotExist) { + return kptfilev1.Inventory{}, nil + } + + // Ensure we only have at most 1 instance of an inventory. + if kf != nil { + if kf.Inventory == nil && rg == nil { + return kptfilev1.Inventory{}, nil + } + + if kf.Inventory != nil && rg != nil { + return kptfilev1.Inventory{}, &MultipleInventoryInfoError{} + } + + if kf.Inventory != nil { + return *kf.Inventory, nil + } + } + + return kptfilev1.Inventory{ + Name: rg.ObjectMeta.Name, + Namespace: rg.ObjectMeta.Namespace, + InventoryID: rg.ObjectMeta.Labels[rgfilev1alpha1.RGInventoryIDLabel], + }, nil } if kf.Inventory == nil { @@ -199,6 +287,30 @@ func (i *InventoryFilter) Filter(object *yaml.RNode) (*yaml.RNode, error) { return object, nil } +// RGFilter is an implementation of the yaml.Filter interface +// that extracts inventory information from resourcegroup objects. +type RGFilter struct { + Inventories []*rgfilev1alpha1.ResourceGroup +} + +func (r *RGFilter) Filter(object *yaml.RNode) (*yaml.RNode, error) { + if object.GetApiVersion() != rgfilev1alpha1.RGFileAPIVersion || + object.GetKind() != rgfilev1alpha1.RGFileKind { + return object, nil + } + + s, err := object.String() + if err != nil { + return object, err + } + rg, err := pkg.DecodeRGFile(bytes.NewBufferString(s)) + if err != nil { + return nil, err + } + r.Inventories = append(r.Inventories, rg) + return object, nil +} + // toReaderOptions returns the readerOptions for a factory. func toReaderOptions(f util.Factory) (manifestreader.ReaderOptions, error) { namespace, enforceNamespace, err := f.ToRawKubeConfigLoader().Namespace() @@ -245,14 +357,6 @@ func validateInventory(inventory kptfilev1.Inventory) error { Reason: "\"inventory.namespace\" must not be empty", }) } - if inventory.InventoryID == "" { - violations = append(violations, errors.Violation{ - Field: "inventoryID", - Value: inventory.InventoryID, - Type: errors.Missing, - Reason: "\"inventory.inventoryID\" must not be empty", - }) - } if len(violations) > 0 { return &InventoryInfoValidationError{ ValidationError: errors.ValidationError{ diff --git a/pkg/live/load_test.go b/pkg/live/load_test.go index 4562d10a08..f57be37f28 100644 --- a/pkg/live/load_test.go +++ b/pkg/live/load_test.go @@ -17,11 +17,15 @@ package live import ( "bytes" "os" + "path/filepath" "sort" + "strings" "testing" + "github.com/GoogleContainerTools/kpt/internal/testutil" "github.com/GoogleContainerTools/kpt/internal/testutil/pkgbuilder" kptfile "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/runtime/schema" cmdtesting "k8s.io/kubectl/pkg/cmd/testing" @@ -37,6 +41,7 @@ func TestLoad_LocalDisk(t *testing.T) { expectedObjs object.ObjMetadataSet expectedInv kptfile.Inventory expectedErrMsg string + rgFile string }{ "no Kptfile in root package": { pkg: pkgbuilder.NewRootPkg(). @@ -160,6 +165,24 @@ func TestLoad_LocalDisk(t *testing.T) { InventoryID: "foo-bar", }, }, + "Inventory information taken from resourcegroup": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(), + ).WithRGFile(pkgbuilder.NewRGFile().WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar"}, + )), + namespace: "foo", + expectedObjs: []object.ObjMetadata{}, + expectedInv: kptfile.Inventory{ + Name: "foo", + Namespace: "bar", + InventoryID: "foo-bar", + }, + rgFile: "resourcegroup.yaml", + }, } for tn, tc := range testCases { @@ -173,7 +196,7 @@ func TestLoad_LocalDisk(t *testing.T) { }() var buf bytes.Buffer - objs, inv, err := Load(tf, dir, &buf) + objs, inv, err := Load(tf, dir, tc.rgFile, &buf) if tc.expectedErrMsg != "" { if !assert.Error(t, err) { @@ -202,27 +225,27 @@ func TestLoad_StdIn(t *testing.T) { expectedObjs object.ObjMetadataSet expectedInv kptfile.Inventory expectedErrMsg string + rgFile string + rgInStream bool }{ - "no Kptfile among the resources": { + "no inventory among the resources": { pkg: pkgbuilder.NewRootPkg(). WithKptfile( pkgbuilder.NewKptfile(), ). WithFile("deployment.yaml", deploymentA), - namespace: "foo", - expectedObjs: []object.ObjMetadata{ - { - GroupKind: schema.GroupKind{ - Group: "apps", - Kind: "Deployment", - }, - Name: "test-deployment", - Namespace: "foo", - }, - }, + expectedErrMsg: "no inventory information was provided within the stream", }, "missing namespace for namespace scoped resources are defaulted": { pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(). + WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }), + ). WithFile("cm.yaml", configMap), namespace: "foo", expectedObjs: []object.ObjMetadata{ @@ -234,6 +257,11 @@ func TestLoad_StdIn(t *testing.T) { Namespace: "foo", }, }, + expectedInv: kptfile.Inventory{ + Name: "foo", + Namespace: "bar", + InventoryID: "foo-bar", + }, }, "inventory info is taken from the Kptfile": { pkg: pkgbuilder.NewRootPkg(). @@ -297,7 +325,128 @@ func TestLoad_StdIn(t *testing.T) { ), ), namespace: "foo", - expectedErrMsg: "multiple Kptfiles contains inventory information", + expectedErrMsg: "multiple inventory information found in package", + }, + "Multiple inventories, stdin and local resourcegroup, is an error": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(). + WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }), + ). + WithRGFile(pkgbuilder.NewRGFile().WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }, + )), + expectedErrMsg: "multiple inventory information found in package", + rgFile: rgfilev1alpha1.RGFileName, + }, + "Inventory using local resourcegroup file": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(), + ). + WithFile("cm.yaml", configMap). + WithRGFile(pkgbuilder.NewRGFile().WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }, + )), + namespace: "foo", + expectedInv: kptfile.Inventory{ + Name: "foo", + Namespace: "bar", + InventoryID: "foo-bar", + }, + expectedObjs: []object.ObjMetadata{ + { + GroupKind: schema.GroupKind{ + Kind: "ConfigMap", + }, + Name: "cm", + Namespace: "foo", + }, + }, + rgFile: rgfilev1alpha1.RGFileName, + }, + "Inventory using STDIN resourcegroup file": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(), + ). + WithFile("cm.yaml", configMap). + WithRGFile(pkgbuilder.NewRGFile().WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }, + )), + namespace: "foo", + expectedInv: kptfile.Inventory{ + Name: "foo", + Namespace: "bar", + InventoryID: "foo-bar", + }, + expectedObjs: []object.ObjMetadata{ + { + GroupKind: schema.GroupKind{ + Kind: "ConfigMap", + }, + Name: "cm", + Namespace: "foo", + }, + }, + rgInStream: true, + }, + "Multiple inventories using STDIN resourcegroup and Kptfile is error": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(). + WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }), + ). + WithFile("cm.yaml", configMap). + WithRGFile(pkgbuilder.NewRGFile().WithInventory(pkgbuilder.Inventory{ + Name: "foo", + Namespace: "bar", + ID: "foo-bar", + }, + )), + expectedErrMsg: "multiple inventory information found in package", + rgInStream: true, + }, + "Non-valid inventory using STDIN Kptfile is error": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(). + WithInventory(pkgbuilder.Inventory{ + Name: "foo", + }), + ). + WithFile("cm.yaml", configMap), + expectedErrMsg: "no inventory information was provided within the stream", + }, + "Non-valid inventory in resourcegroup is error": { + pkg: pkgbuilder.NewRootPkg(). + WithKptfile( + pkgbuilder.NewKptfile(), + ). + WithFile("cm.yaml", configMap). + WithRGFile(pkgbuilder.NewRGFile().WithInventory(pkgbuilder.Inventory{ + Name: "foo", + }, + )), + expectedErrMsg: "no inventory information was provided within the stream or package", + rgFile: rgfilev1alpha1.RGFileName, }, } @@ -311,6 +460,9 @@ func TestLoad_StdIn(t *testing.T) { _ = os.RemoveAll(dir) }() + revert := testutil.Chdir(t, dir) + defer revert() + var buf bytes.Buffer err := (&kio.Pipeline{ Inputs: []kio.Reader{ @@ -320,6 +472,14 @@ func TestLoad_StdIn(t *testing.T) { MatchFilesGlob: append([]string{kptfile.KptFileName}, kio.DefaultMatch...), IncludeSubpackages: true, WrapBareSeqNode: true, + FileSkipFunc: func(rp string) bool { + // No skipping if we don't have a resourcegroup file, or we stream it in STDIN. + if tc.rgFile == "" || tc.rgInStream { + return false + } + + return strings.Contains(rp, tc.rgFile) + }, }, }, Outputs: []kio.Writer{ @@ -332,7 +492,15 @@ func TestLoad_StdIn(t *testing.T) { t.FailNow() } - objs, inv, err := Load(tf, "-", &buf) + if tc.rgFile != "" { + os.Remove(filepath.Join(dir, kptfile.KptFileName)) + } + + if tc.rgInStream { + os.Remove(filepath.Join(dir, tc.rgFile)) + } + + objs, inv, err := Load(tf, "-", tc.rgFile, &buf) if tc.expectedErrMsg != "" { if !assert.Error(t, err) { @@ -376,12 +544,12 @@ func TestValidateInventory(t *testing.T) { expectErr: true, expectedErrorFields: []string{"name"}, }, - "inventory without id or namespace doesn't validate": { + "inventory namespace doesn't validate": { inventory: kptfile.Inventory{ Name: "foo", }, expectErr: true, - expectedErrorFields: []string{"namespace", "inventoryID"}, + expectedErrorFields: []string{"namespace"}, }, } diff --git a/pkg/live/rgpath.go b/pkg/live/rgpath.go index e850bfade7..7e2c9576b0 100644 --- a/pkg/live/rgpath.go +++ b/pkg/live/rgpath.go @@ -8,6 +8,7 @@ import ( "github.com/GoogleContainerTools/kpt/internal/pkg" "github.com/GoogleContainerTools/kpt/internal/util/pathutil" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/cli-utils/pkg/manifestreader" "sigs.k8s.io/kustomize/kyaml/filesys" @@ -70,6 +71,13 @@ func (r *ResourceGroupPathManifestReader) Read() ([]*unstructured.Unstructured, if err != nil { return objs, err } + + // Skip if current file is a ResourceGroup resource. We do not want to apply/delete any ResourceGroup CRs when we + // run any `kpt live` commands on a package. Instead, we have specific logic in place for handling ResourceGroups in + // the live cluster. + if u.GetKind() == rgfilev1alpha1.RGFileKind && u.GetAPIVersion() == rgfilev1alpha1.DefaultMeta.APIVersion { + continue + } objs = append(objs, u) } diff --git a/pkg/live/rgstream.go b/pkg/live/rgstream.go index 2ea2596618..4dafb60d89 100644 --- a/pkg/live/rgstream.go +++ b/pkg/live/rgstream.go @@ -8,6 +8,7 @@ import ( "io" kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1" + rgfilev1alpha1 "github.com/GoogleContainerTools/kpt/pkg/api/resourcegroup/v1alpha1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/cli-utils/pkg/manifestreader" @@ -23,6 +24,10 @@ var ( Group: kptfilev1.KptFileGroup, Kind: kptfilev1.KptFileKind, }, + { + Group: rgfilev1alpha1.RGFileGroup, + Kind: rgfilev1alpha1.RGFileKind, + }, } ) diff --git a/pkg/status/configconnector.go b/pkg/status/configconnector.go index e01895f87b..068661fd1d 100644 --- a/pkg/status/configconnector.go +++ b/pkg/status/configconnector.go @@ -20,6 +20,7 @@ import ( "strings" v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" @@ -58,6 +59,9 @@ func (c *ConfigConnectorStatusReader) ReadStatus(ctx context.Context, reader eng u.SetGroupVersionKind(gvk) err = reader.Get(ctx, key, &u) if err != nil { + if errors.IsNotFound(err) { + return newResourceStatus(id, status.NotFoundStatus, &u, "Resource not found") + } return newUnknownResourceStatus(id, nil, err) } diff --git a/pkg/status/configconnector_test.go b/pkg/status/configconnector_test.go index e1ef6a6ee3..1bccd4ae76 100644 --- a/pkg/status/configconnector_test.go +++ b/pkg/status/configconnector_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/cli-utils/pkg/kstatus/polling/testutil" "sigs.k8s.io/cli-utils/pkg/kstatus/status" @@ -67,6 +68,7 @@ func TestReadStatus(t *testing.T) { resource string gvk schema.GroupVersionKind expectedStatus status.Status + deleted bool }{ "Resource with deletionTimestap is Terminating": { resource: ` @@ -131,6 +133,22 @@ status: }, expectedStatus: status.FailedStatus, }, + + "Resource has been deleted": { + resource: ` +apiVersion: storage.cnrm.cloud.google.com/v1beta1 +kind: StorageBucket +metadata: + name: fake-bucket +`, + gvk: schema.GroupVersionKind{ + Group: "storage.cnrm.cloud.google.com", + Version: "v1beta1", + Kind: "StorageBucket", + }, + expectedStatus: status.NotFoundStatus, + deleted: true, + }, } for tn, tc := range testCases { @@ -140,6 +158,12 @@ status: fakeClusterReader := &fakeClusterReader{ getResource: obj, } + // Return not found error if we want the resource to be deleted. + if tc.deleted { + fakeClusterReader.getResource = nil + fakeClusterReader.getErr = errors.NewNotFound(schema.GroupResource{Group: tc.gvk.Group, Resource: tc.gvk.Kind}, "fake-name") + } + fakeMapper := fakemapper.NewFakeRESTMapper(tc.gvk) statusReader := &ConfigConnectorStatusReader{ Mapper: fakeMapper, diff --git a/pkg/test/runner/runner.go b/pkg/test/runner/runner.go index e9d3a27bb0..5bccd10bdf 100644 --- a/pkg/test/runner/runner.go +++ b/pkg/test/runner/runner.go @@ -73,9 +73,11 @@ func NewRunner(t *testing.T, testCase TestCase, c string) (*Runner, error) { } kptBin, err := getKptBin() if err != nil { - return nil, fmt.Errorf("failed to find kpt binary: %w", err) + t.Logf("failed to find kpt binary: %v", err) + } + if kptBin != "" { + t.Logf("Using kpt binary: %s", kptBin) } - t.Logf("Using kpt binary: %s", kptBin) return &Runner{ pkgName: filepath.Base(testCase.Path), testCase: testCase, diff --git a/porch/apiserver/go.mod b/porch/apiserver/go.mod index 6f163cbbf4..efaba5c5a2 100644 --- a/porch/apiserver/go.mod +++ b/porch/apiserver/go.mod @@ -43,9 +43,11 @@ replace ( require ( cloud.google.com/go v0.99.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/GoogleContainerTools/kpt v0.0.0-00010101000000-000000000000 // indirect github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/apply-setters v0.2.0 // indirect github.com/GoogleContainerTools/kpt/porch/func v0.0.0-00010101000000-000000000000 // indirect + github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect github.com/Microsoft/go-winio v0.5.1 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f // indirect @@ -66,6 +68,7 @@ require ( github.com/emicklei/go-restful v2.9.5+incompatible // indirect github.com/emirpasic/gods v1.12.0 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect github.com/felixge/httpsnoop v1.0.1 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-errors/errors v1.4.2 // indirect @@ -78,12 +81,14 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/btree v1.0.1 // indirect github.com/google/go-cmp v0.5.7 // indirect github.com/google/go-containerregistry v0.8.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/google/uuid v1.3.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/imdario/mergo v0.3.12 // indirect @@ -93,9 +98,13 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.1.0 // indirect github.com/klauspost/compress v1.13.6 // indirect + github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // 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 @@ -103,12 +112,14 @@ require ( github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 // indirect github.com/otiai10/copy v1.7.0 // indirect + github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.11.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.28.0 // indirect github.com/prometheus/procfs v0.6.0 // indirect + github.com/russross/blackfriday v1.5.2 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/stretchr/testify v1.7.0 // indirect @@ -124,6 +135,7 @@ require ( go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect go.opentelemetry.io/otel/trace v0.20.0 // indirect go.opentelemetry.io/proto/otlp v0.7.0 // indirect + go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect @@ -143,8 +155,10 @@ require ( gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/cli-runtime v0.23.3 // indirect k8s.io/kubectl v0.22.2 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27 // indirect + sigs.k8s.io/cli-utils v0.27.0 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect sigs.k8s.io/kustomize/api v0.11.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect diff --git a/porch/apiserver/go.sum b/porch/apiserver/go.sum index 7a576c1a69..2ef8f94830 100644 --- a/porch/apiserver/go.sum +++ b/porch/apiserver/go.sum @@ -52,6 +52,7 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -72,6 +73,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/apply-setters v0.2.0 h1:GhM9JLR+vW4/jPuL7bGVAEUsIIp5xhJKhm17wSyQZLY= github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/apply-setters v0.2.0/go.mod h1:D+1CuvT4BecI7ZokGUVPdjnhT+z0z1/9NB6HGH4cTSI= +github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -294,6 +296,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= @@ -332,6 +335,7 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= @@ -349,10 +353,12 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -405,6 +411,7 @@ github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA= github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= @@ -421,6 +428,7 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -538,6 +546,7 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -603,6 +612,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -649,6 +659,7 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= @@ -692,6 +703,7 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -701,12 +713,14 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -729,6 +743,7 @@ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= @@ -740,6 +755,7 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= @@ -747,6 +763,8 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -788,6 +806,7 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f h1:WyCn68lTiytVSkk7W1K9nBiSGTSRlUOdyTnSjwrIlok= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -842,6 +861,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -898,6 +918,7 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spyzhov/ajson v0.4.2/go.mod h1:63V+CGM6f1Bu/p4nLIN8885ojBdt88TbLoSFzyqMuVA= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -1018,6 +1039,7 @@ go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52l go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1145,6 +1167,7 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1262,6 +1285,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1284,6 +1308,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1371,6 +1396,7 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -1387,6 +1413,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1608,6 +1635,7 @@ k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= k8s.io/api v0.23.3 h1:KNrME8KHGr12Ozjf8ytOewKzZh6hl/hHUZeHddT3a38= k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= +k8s.io/apiextensions-apiserver v0.22.2/go.mod h1:2E0Ve/isxNl7tWLSUDgi6+cmwHi5fQRdwGVCxbC+KFA= k8s.io/apiextensions-apiserver v0.23.3 h1:JvPJA7hSEAqMRteveq4aj9semilAZYcJv+9HHFWfUdM= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= @@ -1618,9 +1646,12 @@ k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hr k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/apiserver v0.22.2/go.mod h1:vrpMmbyjWrgdyOvZTSpsusQq5iigKNWv9o9KlDAbBHI= k8s.io/apiserver v0.23.3 h1:gWY1DmA0AdAGR/H+Q/1FtyGkFq8xqSaZOw7oLopmO8k= k8s.io/apiserver v0.23.3/go.mod h1:3HhsTmC+Pn+Jctw+Ow0LHA4dQ4oXrQ4XJDzrVDG64T4= k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= +k8s.io/cli-runtime v0.23.3 h1:aJiediw+uUbxkfO6BNulcAMTUoU9Om43g3R7rIkYqcw= +k8s.io/cli-runtime v0.23.3/go.mod h1:yA00O5pDqnjkBh8fkuugBbfIfjB1nOpz+aYLotbnOfc= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= @@ -1647,6 +1678,7 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.10.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1663,6 +1695,7 @@ k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1671,20 +1704,27 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27 h1:KQOkVzXrLNb0EP6W0FD6u3CCPAwgXFYwZitbj7K0P0Y= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= +sigs.k8s.io/cli-utils v0.27.0 h1:BxI7lPNn0fBZa5g4UwR+ShJyL4CCxELA6tLHbr2YrpU= +sigs.k8s.io/cli-utils v0.27.0/go.mod h1:8ll2fyx+bzjbwmwUnKBQU+2LDbMDsxy44DiDZ+drALg= +sigs.k8s.io/controller-runtime v0.10.1/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY= sigs.k8s.io/controller-runtime v0.11.0 h1:DqO+c8mywcZLFJWILq4iktoECTyn30Bkj0CwgqMpZWQ= sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= +sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= sigs.k8s.io/kustomize/api v0.11.1 h1:/Vutu+gAqVo8skw1xCZrsZD39SN4Adg+z7FrSTw9pds= sigs.k8s.io/kustomize/api v0.11.1/go.mod h1:GZuhith5YcqxIDe0GnRJNx5xxPTjlwaLTt/e+ChUtJA= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= sigs.k8s.io/kustomize/kyaml v0.10.21/go.mod h1:TYWhGwW9vjoRh3rWqBwB/ZOXyEGRVWe7Ggc3+KZIO+c= sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= +sigs.k8s.io/kustomize/kyaml v0.12.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= +sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= sigs.k8s.io/kustomize/kyaml v0.13.3 h1:tNNQIC+8cc+aXFTVg+RtQAOsjwUdYBZRAgYOVI3RBc4= sigs.k8s.io/kustomize/kyaml v0.13.3/go.mod h1:/ya3Gk4diiQzlE4mBh7wykyLRFZNvqlbh+JnwQ9Vhrc= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/porch/engine/go.mod b/porch/engine/go.mod index cdb29d678c..6081b1859b 100644 --- a/porch/engine/go.mod +++ b/porch/engine/go.mod @@ -17,17 +17,10 @@ require ( sigs.k8s.io/kustomize/kyaml v0.13.3 ) -replace ( - github.com/GoogleContainerTools/kpt => ../../ - github.com/GoogleContainerTools/kpt/porch/api => ../api - github.com/GoogleContainerTools/kpt/porch/controllers => ../controllers - github.com/GoogleContainerTools/kpt/porch/func => ../func - github.com/GoogleContainerTools/kpt/porch/kpt => ../kpt - github.com/GoogleContainerTools/kpt/porch/repository => ../repository -) - require ( cloud.google.com/go v0.99.0 // indirect + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd // indirect github.com/Microsoft/go-winio v0.5.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect @@ -40,6 +33,8 @@ require ( github.com/docker/docker v20.10.12+incompatible // indirect github.com/docker/docker-credential-helpers v0.6.4 // indirect github.com/emirpasic/gods v1.12.0 // 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-git/gcfg v1.5.0 // indirect github.com/go-logr/logr v1.2.1 // indirect @@ -48,9 +43,13 @@ require ( github.com/go-openapi/swag v0.19.14 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/btree v1.0.1 // indirect github.com/google/go-containerregistry v0.8.0 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect github.com/imdario/mergo v0.3.12 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect @@ -58,16 +57,23 @@ require ( github.com/json-iterator/go v1.1.12 // indirect github.com/kevinburke/ssh_config v1.1.0 // indirect github.com/klauspost/compress v1.13.6 // indirect + github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mailru/easyjson v0.7.6 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 // 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/onsi/ginkgo v1.16.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 // indirect github.com/otiai10/copy v1.7.0 // indirect + github.com/peterbourgon/diskv v2.0.1+incompatible // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday v1.5.2 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/cobra v1.3.0 // indirect @@ -79,13 +85,16 @@ require ( go.opentelemetry.io/otel v0.20.0 // indirect go.opentelemetry.io/otel/metric v0.20.0 // indirect go.opentelemetry.io/otel/trace v0.20.0 // indirect + go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect golang.org/x/mod v0.5.1 // indirect golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect google.golang.org/protobuf v1.27.1 // indirect @@ -93,12 +102,26 @@ require ( gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + k8s.io/api v0.23.3 // indirect k8s.io/apimachinery v0.23.3 // indirect + k8s.io/cli-runtime v0.23.3 // indirect + k8s.io/client-go v0.23.3 // indirect + k8s.io/component-base v0.23.3 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect k8s.io/kubectl v0.22.2 // indirect k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 // indirect + sigs.k8s.io/cli-utils v0.27.0 // indirect sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect sigs.k8s.io/kustomize/api v0.11.1 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace ( + github.com/GoogleContainerTools/kpt => ../../ + github.com/GoogleContainerTools/kpt/porch/api => ../api + github.com/GoogleContainerTools/kpt/porch/controllers => ../controllers + github.com/GoogleContainerTools/kpt/porch/func => ../func + github.com/GoogleContainerTools/kpt/porch/kpt => ../kpt + github.com/GoogleContainerTools/kpt/porch/repository => ../repository +) diff --git a/porch/engine/go.sum b/porch/engine/go.sum index e5c5c86863..7e2cae6e00 100644 --- a/porch/engine/go.sum +++ b/porch/engine/go.sum @@ -52,6 +52,7 @@ dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7 github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= @@ -71,6 +72,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/apply-setters v0.2.0 h1:GhM9JLR+vW4/jPuL7bGVAEUsIIp5xhJKhm17wSyQZLY= github.com/GoogleContainerTools/kpt-functions-catalog/functions/go/apply-setters v0.2.0/go.mod h1:D+1CuvT4BecI7ZokGUVPdjnhT+z0z1/9NB6HGH4cTSI= +github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd h1:sjQovDkwrZp8u+gxLtPgKGjk5hCxuy2hrRejBTA9xFU= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -94,6 +96,7 @@ github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01 github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ProtonMail/go-crypto v0.0.0-20220113124808-70ae35bab23f h1:J2FzIrXN82q5uyUraeJpLIm7U6PffRwje2ORho5yIik= @@ -125,6 +128,7 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -145,6 +149,8 @@ github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3k github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= +github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -173,6 +179,9 @@ github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= +github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= +github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= @@ -279,6 +288,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= @@ -316,6 +326,7 @@ github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -332,9 +343,12 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -347,11 +361,13 @@ github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoD github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= +github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= @@ -383,6 +399,8 @@ github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.1 h1:DX7uPQ4WgAWfoh+NGGlbJQswnYIVvz0SRlLS3rPZQDA= github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v0.4.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= +github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= @@ -397,6 +415,7 @@ github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -449,6 +468,7 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -494,6 +514,8 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -509,9 +531,11 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7 github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 h1:pdN6V1QBWetyv/0+wjACpqVH+eVULgEjkurDLq3goeM= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= @@ -570,6 +594,7 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -615,6 +640,7 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= @@ -657,6 +683,7 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= @@ -666,12 +693,14 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210610120745-9d4ed1856297 h1:yH0SvLzcbZxcJXho2yh7CqdENGMQe73Cw3woZBpPli0= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -692,6 +721,8 @@ github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= @@ -703,12 +734,18 @@ github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -735,6 +772,7 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U= github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= @@ -748,6 +786,7 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f h1:WyCn68lTiytVSkk7W1K9nBiSGTSRlUOdyTnSjwrIlok= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -782,6 +821,7 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -797,6 +837,7 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -823,6 +864,7 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -850,6 +892,7 @@ github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/y github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spyzhov/ajson v0.4.2/go.mod h1:63V+CGM6f1Bu/p4nLIN8885ojBdt88TbLoSFzyqMuVA= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -872,6 +915,7 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -904,6 +948,7 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= @@ -911,6 +956,7 @@ github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -918,6 +964,10 @@ go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3 go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= +go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= +go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -927,6 +977,7 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= @@ -941,14 +992,17 @@ go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4 go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 h1:+FNtrFTmVw0YZGpBGX56XDee331t6JAXeK2bcyhLOOc= go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1051,6 +1105,7 @@ golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -1059,8 +1114,11 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1166,6 +1224,7 @@ golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1173,6 +1232,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1193,7 +1253,9 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1208,6 +1270,7 @@ golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXR golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= +golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1224,6 +1287,7 @@ golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac h1:7zkz7BUtwNFFqcowJ+RIgu2MaV/MapERkDIy+mwPyjs= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1246,6 +1310,7 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1278,6 +1343,7 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -1286,12 +1352,14 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1358,6 +1426,7 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1475,6 +1544,7 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -1508,6 +1578,9 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.2/go.mod h1:y3ydYpLJAaDI+BbSe2xmGcqxiWHmWjkEeIbiwHvnPR8= +k8s.io/api v0.23.3 h1:KNrME8KHGr12Ozjf8ytOewKzZh6hl/hHUZeHddT3a38= +k8s.io/api v0.23.3/go.mod h1:w258XdGyvCmnBj/vGzQMj6kzdufJZVUwEM1U2fRJwSQ= +k8s.io/apiextensions-apiserver v0.22.2/go.mod h1:2E0Ve/isxNl7tWLSUDgi6+cmwHi5fQRdwGVCxbC+KFA= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= @@ -1517,16 +1590,23 @@ k8s.io/apimachinery v0.23.3/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hr k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/apiserver v0.22.2/go.mod h1:vrpMmbyjWrgdyOvZTSpsusQq5iigKNWv9o9KlDAbBHI= k8s.io/cli-runtime v0.22.2/go.mod h1:tkm2YeORFpbgQHEK/igqttvPTRIHFRz5kATlw53zlMI= +k8s.io/cli-runtime v0.23.3 h1:aJiediw+uUbxkfO6BNulcAMTUoU9Om43g3R7rIkYqcw= +k8s.io/cli-runtime v0.23.3/go.mod h1:yA00O5pDqnjkBh8fkuugBbfIfjB1nOpz+aYLotbnOfc= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.22.2/go.mod h1:sAlhrkVDf50ZHx6z4K0S40wISNTarf1r800F+RlCF6U= +k8s.io/client-go v0.23.3 h1:23QYUmCQ/W6hW78xIwm3XqZrrKZM+LWDqW2zfo+szJs= +k8s.io/client-go v0.23.3/go.mod h1:47oMd+YvAOqZM7pcQ6neJtBiFH7alOyfunYN48VsmwE= k8s.io/code-generator v0.22.2/go.mod h1:eV77Y09IopzeXOJzndrDyCI88UBok2h6WxAlBwpxa+o= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.22.2/go.mod h1:5Br2QhI9OTe79p+TzPe9JKNQYvEKbq9rTJDWllunGug= +k8s.io/component-base v0.23.3 h1:q+epprVdylgecijVGVdf4MbizEL2feW4ssd7cdo6LVY= +k8s.io/component-base v0.23.3/go.mod h1:1Smc4C60rWG7d3HjSYpIwEbySQ3YWg0uzH5a2AtaTLg= k8s.io/component-helpers v0.22.2/go.mod h1:+N61JAR9aKYSWbnLA88YcFr9K/6ISYvRNybX7QW7Rs8= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -1539,6 +1619,7 @@ k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.10.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.40.1 h1:P4RRucWk/lFOlDdkAr3mc7iWFkgKrZY9qZMAgek06S4= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1553,6 +1634,7 @@ k8s.io/metrics v0.22.2/go.mod h1:GUcsBtpsqQD1tKFS/2wCKu4ZBowwRncLOJH1rgWs3uw= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= @@ -1561,16 +1643,23 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/cli-utils v0.27.0 h1:BxI7lPNn0fBZa5g4UwR+ShJyL4CCxELA6tLHbr2YrpU= +sigs.k8s.io/cli-utils v0.27.0/go.mod h1:8ll2fyx+bzjbwmwUnKBQU+2LDbMDsxy44DiDZ+drALg= +sigs.k8s.io/controller-runtime v0.10.1/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/kustomize/api v0.8.11/go.mod h1:a77Ls36JdfCWojpUqR6m60pdGY1AYFix4AH83nJtY1g= +sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= sigs.k8s.io/kustomize/api v0.11.1 h1:/Vutu+gAqVo8skw1xCZrsZD39SN4Adg+z7FrSTw9pds= sigs.k8s.io/kustomize/api v0.11.1/go.mod h1:GZuhith5YcqxIDe0GnRJNx5xxPTjlwaLTt/e+ChUtJA= sigs.k8s.io/kustomize/cmd/config v0.9.13/go.mod h1:7547FLF8W/lTaDf0BDqFTbZxM9zqwEJqCKN9sSR0xSs= sigs.k8s.io/kustomize/kustomize/v4 v4.2.0/go.mod h1:MOkR6fmhwG7hEDRXBYELTi5GSFcLwfqwzTRHW3kv5go= sigs.k8s.io/kustomize/kyaml v0.10.21/go.mod h1:TYWhGwW9vjoRh3rWqBwB/ZOXyEGRVWe7Ggc3+KZIO+c= sigs.k8s.io/kustomize/kyaml v0.11.0/go.mod h1:GNMwjim4Ypgp/MueD3zXHLRJEjz7RvtPae0AwlvEMFM= +sigs.k8s.io/kustomize/kyaml v0.12.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= +sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= sigs.k8s.io/kustomize/kyaml v0.13.3 h1:tNNQIC+8cc+aXFTVg+RtQAOsjwUdYBZRAgYOVI3RBc4= sigs.k8s.io/kustomize/kyaml v0.13.3/go.mod h1:/ya3Gk4diiQzlE4mBh7wykyLRFZNvqlbh+JnwQ9Vhrc= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= diff --git a/scripts/create-licenses.sh b/scripts/create-licenses.sh index 3ec8304577..cc5d7f76d1 100755 --- a/scripts/create-licenses.sh +++ b/scripts/create-licenses.sh @@ -168,7 +168,7 @@ V2_LICENSE_DIR="vendor/github.com/cpuguy83/go-md2man" mv ${V2_LICENSE_DIR}/v2/LICENSE ${V2_LICENSE_DIR} # Loop through every vendored package -mozilla_repos="" +mozilla_repos=() for PACKAGE in $(go list -mod=mod -m -json all | jq -r .Path | sort -f); do if [[ -e "staging/src/${PACKAGE}" ]]; then # echo "$PACKAGE is a staging package, skipping" > /dev/stderr @@ -224,7 +224,7 @@ __EOF__ license=$(cat "${file}") if [[ "$license" == *"Mozilla"* ]] then - mozilla_repos+=" ${DEPS_DIR}/${PACKAGE}" + mozilla_repos+=("${DEPS_DIR}/${PACKAGE}") fi cat ${file} @@ -237,8 +237,12 @@ done >> ${TMP_LICENSE_FILE} cat ${TMP_LICENSE_FILE} > ${VENDOR_LICENSE_FILE} +# initialize zip file to ensure existence (downstream builds depend on libs.zip) +README="${KUBE_ROOT}/scripts/docs/create-licenses/README.md" +zip -q "${ZIP_FILENAME}" "${README}" + # Create a package of Mozilla repository source code (only go code). -[ -n "$mozilla_repos" ] && zip -qr $ZIP_FILENAME $mozilla_repos -i '*.go' +[ ${#mozilla_repos[@]} != 0 ] && zip -qur "${ZIP_FILENAME}" "${mozilla_repos[@]}" -i '*.go' # Cleanup vendor directory rm -rf vendor diff --git a/scripts/docs/create-licenses/README.md b/scripts/docs/create-licenses/README.md new file mode 100644 index 0000000000..f967e93089 --- /dev/null +++ b/scripts/docs/create-licenses/README.md @@ -0,0 +1,5 @@ +# create-licenses + +This file is intended to be included with the `libs.zip` file that is +distributed with each `kpt` release. The `libs.zip` file contains a packaging of +source files necessary to satisfy the Mozilla license. diff --git a/scripts/generate_site_sidebar/sidebar_template.md.tmpl b/scripts/generate_site_sidebar/sidebar_template.md.tmpl index 344febf67d..89cd5e9791 100644 --- a/scripts/generate_site_sidebar/sidebar_template.md.tmpl +++ b/scripts/generate_site_sidebar/sidebar_template.md.tmpl @@ -2,6 +2,10 @@ - [Book](book/) {{bookLayout}} - [Reference](reference/) + - [Annotations](reference/annotations/) + - [apply-time mutation](reference/annotations/apply-time-mutation/) + - [depends-on](reference/annotations/depends-on/) + - [local-config](reference/annotations/local-config/) - [CLI](reference/cli/) - [pkg](reference/cli/pkg/) - [diff](reference/cli/pkg/diff/) @@ -26,6 +30,7 @@ - [FunctionResultList](reference/schema/function-result-list/) - [ResourceList](reference/schema/resource-list/) - [CRD Status Convention](reference/schema/crd-status-convention/) + - [Config Connector Status Convention](reference/schema/config-connector-status-convention/) - [Functions Catalog](https://catalog.kpt.dev/ ":target=_self") - [Curated](https://catalog.kpt.dev/ ":target=_self") - [Contrib](https://catalog.kpt.dev/contrib/ ":target=_self") diff --git a/site/book/06-deploying-packages/00.md b/site/book/06-deploying-packages/00.md index 81a6ad94f2..eada6587da 100644 --- a/site/book/06-deploying-packages/00.md +++ b/site/book/06-deploying-packages/00.md @@ -1,4 +1,4 @@ -In the last chapter of this book, we are going to cover how you deploy a kpt +In this chapter of this book, we are going to cover how you deploy a kpt package to a Kubernetes cluster and how the cluster state is managed as the package evolves over time. @@ -56,14 +56,15 @@ number of pods have been created and become available. For core kubernetes types, reconcile status is computed using hardcoded rules. For CRDs, the status computation is based on recommended [convention for status fields] that needs to be followed by custom resource publishers. If CRDs follow -these conventions, `live apply` will be able to correctly compute status. +these conventions, `live apply` will be able to correctly compute status. `kpt` also +has special rules for computing status for [Config Connector resources]. -Once you know the reconcile status of a single resource, then you really want to -answer the following question: - -- Did all the resources in the local package reconcile successfully? - -This is referred to as _aggregated status_. +Usually multiple resources are being applied together, and we want to know +when all of those resources have been successfully reconciled. `live apply` computes +the aggregate status and will wait until either they are all reconciled, the timeout +expires, or all the remaining unreconciled resources have reached a state where they +are unlikely to successfully reconcile. An example of the latter for `Deployment` +resources is when the progress deadline is exceeded. ## Dependency ordering @@ -76,3 +77,4 @@ any resources that depend on it are applied. [convention for status fields]: /reference/schema/crd-status-convention/ +[Config Connector resources]: /reference/schema/config-connector-status-convention/ diff --git a/site/book/07-effective-customizations/00.md b/site/book/07-effective-customizations/00.md new file mode 100644 index 0000000000..3c699224db --- /dev/null +++ b/site/book/07-effective-customizations/00.md @@ -0,0 +1,19 @@ +Kubernetes configuration packages and customizations go hand in hand, all the +packaging tools enable package customization, since every package needs to be adapted to each specific use. In this chapter we cover effective +customizations techniques that kpt rendering and packaging enables. We show how +providing customization through parameters has some [pitfalls] and recommend +alternatives where the contents of the package are not hidden behind a facade. +Some of these alternatives are only possible because kpt has made an investment +into bulk editing with [KRM functions] and upstream merging. + +### Prerequisites + +Before reading this chapter you should familiarize yourself with [chapter 4] +which talks about using functions as well as [updating a package page] in +[chapter 3]. + +[chapter 4]: /book/04-using-functions/ +[chapter 3]: /book/03-packages/ +[pitfalls]: https://github.com/kubernetes/design-proposals-archive/blob/main/architecture/declarative-application-management.md#parameterization-pitfalls +[KRM functions]: https://github.com/kubernetes-sigs/kustomize/blob/master/cmd/config/docs/api-conventions/functions-spec.md +[updating a package page]: /book/03-packages/05-updating-a-package.md \ No newline at end of file diff --git a/site/book/07-effective-customizations/01-single-value-replacement.md b/site/book/07-effective-customizations/01-single-value-replacement.md new file mode 100644 index 0000000000..1239d5697a --- /dev/null +++ b/site/book/07-effective-customizations/01-single-value-replacement.md @@ -0,0 +1,137 @@ +## Scenario + +I have a single value replacement in my package. I don’t want package consumers +to look through all the yaml files to find the value I want them to set. It +seems easier to just create a parameter for this value and have the user look +at Kptfile for inputs. + +Example storage bucket: + +```yaml +apiVersion: storage.cnrm.cloud.google.com/v1beta1 +kind: StorageBucket +metadata: + name: my-bucket # kpt-set: ${project-id}-${name} + namespace: ns-test # kpt-set: ${namespace} + annotations: + cnrm.cloud.google.com/force-destroy: "false" + cnrm.cloud.google.com/project-id: my-project # kpt-set: ${project-id} +spec: + storageClass: standard # kpt-set: ${storage-class} + uniformBucketLevelAccess: true + versioning: + enabled: false +``` + +The corresponding Kptfile: + +```yaml +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: bucket +info: + description: A Google Cloud Storage bucket +pipeline: + mutators: + - image: gcr.io/kpt-fn/apply-setters:v0.2 + configMap: + name: todo-bucket-name + namespace: todo-namespace + project-id: todo-project-id + storage-class: standard +``` + + +## Problems + +1. With package popularity the single values inevitably expand to provide a +facade to a large portion of the data. That defeats the purpose of minimizing +the cognitive load. With this small example almost half of the StorageBucket configuration is now covered with parameters. +1. Some values like resource names are used as references so setting them in +one place needs to trigger updates in all the places where they are referenced. +1. If additional resources that have similar values are added to the package +new string replacements need to be added. In this case everything will need +to also be marked up with project ID and namespace. +1. If a package is used as a sub-package the string replacement parameters need +to be surfaced to the parent package and if the parent package already expects +some values to be set and the parameters do not exist, the sub-package needs to +be updated. + +## Solutions: + +1. kpt allows the user to edit a particular value directly in the configuration +data and will handle upstream merge. When [editing the yaml] directly the +consumers are not confined to the parameters that the package author has +provided. [kpt pkg update] merges the local edits made by consumer with the +changes in the upstream package made by publisher. In this case `storageClass` +can be set directly by the user. +1. Attributes like resource names which are often updated by consumers to add +prefix or suffix (e.g. *-dev, *-stage, *-prod, na1-*, eu1-*) are best handled +by the [ensure-name-substring] function that will handle dependency updates as +well as capture all the resources in the package. +1. Instead of setting a particular value on a resource a bulk operation can be +applied to all the resources that fit a particular interface. This can be done +by a custom function or by [set-namespace], [search-and-replace] , [set-labels] +and [set-annotations] functions. + +New bucket configuration: + +```yaml +apiVersion: storage.cnrm.cloud.google.com/v1beta1 +kind: StorageBucket +metadata: + name: bucket + annotations: + cnrm.cloud.google.com/force-destroy: "false" +spec: + storageClass: standard + uniformBucketLevelAccess: true + versioning: + enabled: false +``` + +The suggested customizations are now in the Kptfile: + +```yaml +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: bucket +info: + description: A Google Cloud Storage bucket +pipeline: + mutators: + - image: gcr.io/kpt-fn/set-namespace:v0.2.0 + configMap: + namespace: example-ns + - image: gcr.io/kpt-fn/ensure-name-substring:v0.1.1 + configMap: + prepend: project111- + - image: gcr.io/kpt-fn/set-annotations:v0.1.4 + configMap: + cnrm.cloud.google.com/project-id: project111 +``` + +The resource configuration YAML doesn't need to be marked up with where the +namespace value needs to go. The [set-namespace] function is smart enough to +find all the appropriate resources that need the namespace. + +We have put in the starter name `bucket` and have an [ensure-name-substring] +that shows the package consumer that the project ID prefix is what we suggest. +However if they have a different naming convention they can alter the name +prefix or suffix on all the resources in the pacakge. + +Since we are trying to set the annotation to the project ID we can use the +[set-annotations] function one time and the annotation are going to be set on +all the resources in the package. If we add additional resources or whole +sub packages we will get the consistent annotations across all resources +without having to find all the places where annotations can go. + +[editing the yaml]: /book/03-packages/03-editing-a-package +[kpt pkg update]: /book/03-packages/05-updating-a-package +[ensure-name-substring]: https://catalog.kpt.dev/ensure-name-substring/v0.1/ +[search-and-replace]: https://catalog.kpt.dev/search-replace/v0.2/ +[set-labels]: https://catalog.kpt.dev/set-labels/v0.1/ +[set-annotations]: https://catalog.kpt.dev/set-annotations/v0.1/ +[set-namespace]: https://catalog.kpt.dev/set-namespace/v0.2/ \ No newline at end of file diff --git a/site/book/07-effective-customizations/02-limiting-package-changes.md b/site/book/07-effective-customizations/02-limiting-package-changes.md new file mode 100644 index 0000000000..c7aa4bb0e3 --- /dev/null +++ b/site/book/07-effective-customizations/02-limiting-package-changes.md @@ -0,0 +1,113 @@ +## Scenario: + +I’d like to limit what my package consumers can do with my package and it feels +safer to just provide a string replacement in one place so they know not to +alter the configuration outside of the few places that I designated as OK +places to change. + +Example deployment: +```yaml +apiVersion: apps/v1 +kind: Deployment +metadata: # kpt-merge: /nginx-deploy + name: nginx-deploy +spec: + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: backend + image: nginx:1.16.1 # kpt-set: nginx:${tag} +``` + +kpt configuration that uses a setter: +```yaml +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: dont-change-much +pipeline: + mutators: + - image: gcr.io/kpt-fn/apply-setters:v0.2.0 + configMap: + tag: 1.21 +``` + +## Problems: + +1. The limitation by parameters does not guarantee that consumers are in fact +going to limit their changes to the parameters. A popular pattern is using +kustomize to change output of other tools no matter what parameters had. In +this particular case I am able to fork or patch this package and add: + +```yaml +securityContext: + runAsNonRoot: false +``` + +2. String replacements rarely describe the intent of the package author. +When additional resources are added I need additional places where parameters +need to be applied. I can easily add other containers to this deployment and +the package author's rules are not clear and not easily validated. + +## Solutions: + +1. General ways to describe policy already exist. kpt has a [gatekeeper] +function that allows the author to describe intended limitations for a class +of resources or the entire package giving the consumer the freedom to customize +and get an error or a warning when the policy is violated. + +In the sample provided by the function we see how to provide a policy that will +clearly describe the intent using rego: + +```yaml +apiVersion: templates.gatekeeper.sh/v1 +kind: ConstraintTemplate +metadata: # kpt-merge: /disallowroot + name: disallowroot +spec: + crd: + spec: + names: + kind: DisallowRoot + targets: + - target: admission.k8s.gatekeeper.sh + rego: |- + package disallowroot + violation[{"msg": msg}] { + not input.review.object.spec.template.spec.securityContext.runAsNonRoot + msg := "Containers must not run as root" + } +--- +apiVersion: constraints.gatekeeper.sh/v1beta1 +kind: DisallowRoot +metadata: # kpt-merge: /disallowroot + name: disallowroot +spec: + match: + kinds: + - apiGroups: + - 'apps' + kinds: + - Deployment +``` + +The Kptfile can enforce that resources comply with this policy every time +`kpt fn render` is used: + +```yaml +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: gatekeeper-disallow-root-user +pipeline: + validators: + - image: gcr.io/kpt-fn/gatekeeper:v0.2 +``` + +[gatekeeper]: https://catalog.kpt.dev/gatekeeper/v0.2/ diff --git a/site/book/07-effective-customizations/03-generation.md b/site/book/07-effective-customizations/03-generation.md new file mode 100644 index 0000000000..2e56329942 --- /dev/null +++ b/site/book/07-effective-customizations/03-generation.md @@ -0,0 +1,29 @@ +## Scenario: + +When using template languages I am able to provide conditional statements based +on parameter values. This allows me to ask the user for a little bit of +information and generate a lot of boilerplate configuration. Some template +languages like [Jinja] are very robust and feature rich. + +## Problems: + +1. Increased usage and additional edge cases make a template a piece of code +that required tets and debugging. +1. The interplay between different conditionals and loops is interleaved in the template making it hard to understand what exactly is configuration and what is +the logic that alters the configuration. The consumer is left with one choice +supply different parameter values, execute the template rendering code and see +what happens. +1. Templates are generally monolithic, when a change is introduced the package consumers need to either pay the cost of updating or the new consumers pay the +cost of having to decipher more optional parameters. + +## Solutions: + +1. When the generated configuration is simple consider just using a sub-package +and running customizations using [single value replacement] techniques. +1. When a complex configuration needs to be generated the package author can +create a generator function using turing complete languages and debugging tools. Example of such a function is [folder generation]. The output of the function +is plain old KRM. + +[folder generation]: https://catalog.kpt.dev/generate-folders/v0.1/ +[Jinja]: https://palletsprojects.com/p/jinja/ +[single value replacement]: /book/07-effective-customizations/01-single-value-replacement.md \ No newline at end of file diff --git a/site/book/README.md b/site/book/README.md index a77e3880d3..005dd90c80 100644 --- a/site/book/README.md +++ b/site/book/README.md @@ -13,6 +13,7 @@ This book is organized as follows: - [Chapter 4] covers how to use kpt functions to automate configuration changes. - [Chapter 5] guides you through developing custom functions. - [Chapter 6] covers how to deploy a package to a Kubernetes cluster. +- [Chapter 7] covers effective customizations techniques. Let's get started! @@ -22,3 +23,4 @@ Let's get started! [chapter 4]: /book/04-using-functions/ [chapter 5]: /book/05-developing-functions/ [chapter 6]: /book/06-deploying-packages/ +[chapter 7]: /book/07-effective-customizations/ diff --git a/site/installation/README.md b/site/installation/README.md index 671f6d1eca..37be11f761 100644 --- a/site/installation/README.md +++ b/site/installation/README.md @@ -32,41 +32,23 @@ $ kpt version kpt provides auto-completion support for several of the common shells. To see the options for enabling shell auto-completion: ```shell -kpt completion -h +$ kpt completion -h ``` ### Prerequisites -`kpt` depends on `bash-completion` in order to support auto-completion for the -bash shell. If you are using bash as your shell, you will need to install -`bash-completion` in order to use kpt's auto-completion feature. -`bash-completion` is provided by many package managers -(see [here][bash-completion]). +Previous installations of kpt completion may have added the following line to +the shell's config file (e.g. `.bashrc`, `.zshrc`, etc.): +```shell +complete -C kpt +``` +This line needs to be removed for kpt's completion implementation to function +properly. ### Enable kpt auto-completion The kpt completion script for a shell can be generated with the commands -`kpt completion bash`, `kpt completion zsh`, etc. Sourcing the completion script -in your shell enables auto-completion. - -#### Enable auto-completion for your current shell -bash: -```shell -source <(kpt completion bash) -``` -zsh: -```shell -source <(kpt completion zsh) -``` -etc. -#### Enable kpt completion for all your shell sessions -bash: -```shell -echo 'source <(kpt completion bash)' >> ~/.bashrc -``` -zsh: -```shell -echo 'source <(kpt completion zsh)' >> ~/.zshrc -``` -etc. +`kpt completion bash`, `kpt completion zsh`, etc. +For instructions on how to enable the script for the given shell, see the help +page with the commands `kpt completion bash -h`, `kpt completion zsh -h`, etc.