Repository: GoogleContainerTools/kpt
Pull request #4016 (2023-08-03 01:10:00)

update kpt installation instructions and homebrew for kpt v1.0.0-beta.41
<!--  Thanks for sending a pull request!  Here are some tips for you:

In your PR, please ensure that you include the following information:
* a description of the change
* the motivation for the change
* what issue it fixes, if any, in GitHub syntax (e.g. Fixes #XYZ)

Both the description and motivation may reference other issues and PRs,
but should be mostly understandable without following the links (e.g. when
reading the git commit log).

If you are updating the documentation, please do it in separate PRs from
code changes and the commit message should start with `Docs:`.

**PLEASE REMOVE THIS COMMENT BLOCK BEFORE SUBMITTING THE PR** (the bits
between the arrows)

-->



Patch:
diff --git a/Formula/kpt.rb b/Formula/kpt.rb
index 62e02a60..ac43df22 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.38.tar.gz"
-  sha256 "db22d3f5356d690f5cb29e0583c9a170905fe2d6604f8d13ffab976579213040"
+  url "https://github.com/GoogleContainerTools/kpt/archive/v1.0.0-beta.41.tar.gz"
+  sha256 "b6b3c051f2ea298962fbbe2d4a9acbbfaac8197dd1c1cd081c51d8ed3755dbf7"
 
   depends_on "go" => :build
 
diff --git a/commands/alpha/rpkg/pull/command.go b/commands/alpha/rpkg/pull/command.go
index e022f80e..3fc75718 100644
--- a/commands/alpha/rpkg/pull/command.go
+++ b/commands/alpha/rpkg/pull/command.go
@@ -113,7 +113,7 @@ func (r *runner) runE(_ *cobra.Command, args []string) error {
 		return errors.E(op, err)
 	}
 
-	if err := util.AddResourceVersionAnnotation(&resources); err != nil {
+	if err := util.AddRevisionMetadata(&resources); err != nil {
 		return errors.E(op, err)
 	}
 
@@ -200,7 +200,7 @@ func createScheme() (*runtime.Scheme, error) {
 	return scheme, nil
 }
 
-var matchResourceContents = append(kio.MatchAll, kptfilev1.KptFileName)
+var matchResourceContents = append(kio.MatchAll, kptfilev1.KptFileName, kptfilev1.RevisionMetaDataFileName)
 
 func includeFile(path string) bool {
 	for _, m := range matchResourceContents {
diff --git a/commands/alpha/rpkg/push/command.go b/commands/alpha/rpkg/push/command.go
index e96f7132..13b32231 100644
--- a/commands/alpha/rpkg/push/command.go
+++ b/commands/alpha/rpkg/push/command.go
@@ -134,12 +134,12 @@ func (r *runner) runE(cmd *cobra.Command, args []string) error {
 		},
 	}
 
-	rv, err := util.GetResourceVersionAnnotation(&pkgResources)
+	rv, err := util.GetResourceVersion(&pkgResources)
 	if err != nil {
 		return errors.E(op, err)
 	}
 	pkgResources.ResourceVersion = rv
-	if err = util.RemoveResourceVersionAnnotation(&pkgResources); err != nil {
+	if err = util.RemoveRevisionMetadata(&pkgResources); err != nil {
 		return errors.E(op, err)
 	}
 
diff --git a/commands/alpha/rpkg/reject/command.go b/commands/alpha/rpkg/reject/command.go
index 8f7afdab..e9a035d8 100644
--- a/commands/alpha/rpkg/reject/command.go
+++ b/commands/alpha/rpkg/reject/command.go
@@ -123,7 +123,9 @@ func (r *runner) runE(_ *cobra.Command, args []string) error {
 				fmt.Fprintf(r.Command.OutOrStderr(), "%s no longer proposed for deletion\n", name)
 			}
 		default:
-			fmt.Fprintf(r.Command.ErrOrStderr(), "cannot reject %s with lifecycle '%s'\n", name, pr.Spec.Lifecycle)
+			msg := fmt.Sprintf("cannot reject %s with lifecycle '%s'", name, pr.Spec.Lifecycle)
+			messages = append(messages, msg)
+			fmt.Fprintln(r.Command.ErrOrStderr(), msg)
 		}
 	}
 
diff --git a/commands/alpha/rpkg/util/common.go b/commands/alpha/rpkg/util/common.go
index 7dafe979..5a2048ff 100644
--- a/commands/alpha/rpkg/util/common.go
+++ b/commands/alpha/rpkg/util/common.go
@@ -19,6 +19,7 @@ import (
 	"fmt"
 
 	fnsdk "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn"
+	kptfilev1 "github.com/GoogleContainerTools/kpt/pkg/api/kptfile/v1"
 	api "github.com/GoogleContainerTools/kpt/porch/api/porch/v1alpha1"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 )
@@ -67,43 +68,28 @@ func GetResourceFileKubeObject(prr *api.PackageRevisionResources, file, kind, na
 	return ko, nil
 }
 
-func GetResourceVersionAnnotation(prr *api.PackageRevisionResources) (string, error) {
-	ko, err := GetResourceFileKubeObject(prr, "Kptfile", "Kptfile", "")
-
+func GetResourceVersion(prr *api.PackageRevisionResources) (string, error) {
+	ko, err := GetResourceFileKubeObject(prr, kptfilev1.RevisionMetaDataFileName, kptfilev1.RevisionMetaDataKind, "")
 	if err != nil {
 		return "", err
 	}
-	annotations := ko.GetAnnotations()
-	rv, ok := annotations[ResourceVersionAnnotation]
-	if !ok {
-		rv = ""
-	}
+	rv, _, _ := ko.NestedString("metadata", "resourceVersion")
 	return rv, nil
 }
 
-func AddResourceVersionAnnotation(prr *api.PackageRevisionResources) error {
-	ko, err := GetResourceFileKubeObject(prr, "Kptfile", "Kptfile", "")
-	if err != nil {
-		return err
+func AddRevisionMetadata(prr *api.PackageRevisionResources) error {
+	kptMetaDataKo := fnsdk.NewEmptyKubeObject()
+	kptMetaDataKo.SetAPIVersion(prr.APIVersion)
+	kptMetaDataKo.SetKind(kptfilev1.RevisionMetaDataKind)
+	if err := kptMetaDataKo.SetNestedField(prr.GetObjectMeta(), "metadata"); err != nil {
+		return fmt.Errorf("cannot set metadata: %v", err)
 	}
-
-	ko.SetAnnotation(ResourceVersionAnnotation, prr.GetResourceVersion())
-	prr.Spec.Resources["Kptfile"] = ko.String()
+	prr.Spec.Resources[kptfilev1.RevisionMetaDataFileName] = kptMetaDataKo.String()
 
 	return nil
 }
 
-func RemoveResourceVersionAnnotation(prr *api.PackageRevisionResources) error {
-	ko, err := GetResourceFileKubeObject(prr, "Kptfile", "Kptfile", "")
-	if err != nil {
-		return err
-	}
-
-	_, err = ko.RemoveNestedField("metadata", "annotations", ResourceVersionAnnotation)
-	if err != nil {
-		return err
-	}
-	prr.Spec.Resources["Kptfile"] = ko.String()
-
+func RemoveRevisionMetadata(prr *api.PackageRevisionResources) error {
+	delete(prr.Spec.Resources, kptfilev1.RevisionMetaDataFileName)
 	return nil
 }
diff --git a/go.mod b/go.mod
index 11232b56..e8b8efe0 100644
--- a/go.mod
+++ b/go.mod
@@ -25,14 +25,14 @@ require (
 	golang.org/x/text v0.8.0
 	gopkg.in/yaml.v3 v3.0.1
 	gotest.tools v2.2.0+incompatible
-	k8s.io/api v0.26.0
-	k8s.io/apiextensions-apiserver v0.26.0
-	k8s.io/apimachinery v0.26.0
-	k8s.io/cli-runtime v0.26.0
-	k8s.io/client-go v0.26.0
-	k8s.io/component-base v0.26.0
+	k8s.io/api v0.26.7
+	k8s.io/apiextensions-apiserver v0.26.7
+	k8s.io/apimachinery v0.26.7
+	k8s.io/cli-runtime v0.26.7
+	k8s.io/client-go v0.26.7
+	k8s.io/component-base v0.26.7
 	k8s.io/klog/v2 v2.90.1
-	k8s.io/kubectl v0.26.0
+	k8s.io/kubectl v0.26.7
 	sigs.k8s.io/cli-utils v0.35.0
 	sigs.k8s.io/controller-runtime v0.14.1
 	sigs.k8s.io/kustomize/api v0.12.1
diff --git a/go.sum b/go.sum
index b43378e2..9f70cdf5 100644
--- a/go.sum
+++ b/go.sum
@@ -738,24 +738,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I=
-k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg=
-k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo=
-k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ=
-k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg=
-k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
-k8s.io/cli-runtime v0.26.0 h1:aQHa1SyUhpqxAw1fY21x2z2OS5RLtMJOCj7tN4oq8mw=
-k8s.io/cli-runtime v0.26.0/go.mod h1:o+4KmwHzO/UK0wepE1qpRk6l3o60/txUZ1fEXWGIKTY=
-k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8=
-k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg=
-k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs=
-k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8=
+k8s.io/api v0.26.7 h1:Lf4iEBEJb5OFNmawtBfSZV/UNi9riSJ0t1qdhyZqI40=
+k8s.io/api v0.26.7/go.mod h1:Vk9bMadzA49UHPmHB//lX7VRCQSXGoVwfLd3Sc1SSXI=
+k8s.io/apiextensions-apiserver v0.26.7 h1:L7ImW831auK1ZQBtNJPaG5qyrFxeISEBlgfZJfnaIPk=
+k8s.io/apiextensions-apiserver v0.26.7/go.mod h1:3DbZBfS3kO7/Jaj7qqzcBtPcKP0/KcklyAnk8zc+fs4=
+k8s.io/apimachinery v0.26.7 h1:590jSBwaSHCAFCqltaEogY/zybFlhGsnLteLpuF2wig=
+k8s.io/apimachinery v0.26.7/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0=
+k8s.io/cli-runtime v0.26.7 h1:ZhAV9RK9wzXUeMKVvtVVX8jnsJcxw6hcSAu4K3eQbEo=
+k8s.io/cli-runtime v0.26.7/go.mod h1:THp0KBlPxRk4SdpeoBmsuxJwNrwfpTT4+oDaNqhpv0c=
+k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E=
+k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo=
+k8s.io/component-base v0.26.7 h1:uqsOyZh0Zqoaup8tmHa491D/CvgFdGUs+X2H/inNUKM=
+k8s.io/component-base v0.26.7/go.mod h1:CZe1HTmX/DQdeBrb9XYOXzs96jXth8ZbFvhLMsoJLUg=
 k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
 k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc=
 k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0=
-k8s.io/kubectl v0.26.0 h1:xmrzoKR9CyNdzxBmXV7jW9Ln8WMrwRK6hGbbf69o4T0=
-k8s.io/kubectl v0.26.0/go.mod h1:eInP0b+U9XUJWSYeU9XZnTA+cVYuWyl3iYPGtru0qhQ=
+k8s.io/kubectl v0.26.7 h1:s24r6MjKDMW4sMOsuBLaNYQHlweTZeDC0BPkMiom8s0=
+k8s.io/kubectl v0.26.7/go.mod h1:4PGqS2bPQ5yGE0ZSQajzYdWKFUAi8HiuWBZQ2/iEFHg=
 k8s.io/utils v0.0.0-20230115233650-391b47cb4029 h1:L8zDtT4jrxj+TaQYD0k8KNlr556WaVQylDXswKmX+dE=
 k8s.io/utils v0.0.0-20230115233650-391b47cb4029/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
diff --git a/pkg/api/kptfile/v1/types.go b/pkg/api/kptfile/v1/types.go
index eed630e8..1f9659a8 100644
--- a/pkg/api/kptfile/v1/types.go
+++ b/pkg/api/kptfile/v1/types.go
@@ -29,6 +29,10 @@ import (
 const (
 	KptFileName = "Kptfile"
 
+	RevisionMetaDataFileName = ".KptRevisionMetadata"
+
+	RevisionMetaDataKind = "KptRevisionMetadata"
+
 	// Deprecated: prefer KptFileGVK
 	KptFileKind = "Kptfile"
 
diff --git a/porch/controllers/go.mod b/porch/controllers/go.mod
index 0664b0cb..3f6efcc7 100644
--- a/porch/controllers/go.mod
+++ b/porch/controllers/go.mod
@@ -25,9 +25,9 @@ require (
 	golang.org/x/oauth2 v0.6.0
 	google.golang.org/api v0.110.0
 	google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4
-	k8s.io/api v0.26.0
-	k8s.io/apimachinery v0.26.0
-	k8s.io/client-go v0.26.0
+	k8s.io/api v0.26.7
+	k8s.io/apimachinery v0.26.7
+	k8s.io/client-go v0.26.7
 	k8s.io/klog/v2 v2.90.1
 	k8s.io/utils v0.0.0-20230115233650-391b47cb4029
 	sigs.k8s.io/cli-utils v0.35.0
@@ -130,11 +130,11 @@ require (
 	gopkg.in/warnings.v0 v0.1.2 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
-	k8s.io/apiextensions-apiserver v0.26.0 // indirect
-	k8s.io/cli-runtime v0.26.0 // indirect
-	k8s.io/component-base v0.26.0 // indirect
+	k8s.io/apiextensions-apiserver v0.26.7 // indirect
+	k8s.io/cli-runtime v0.26.7 // indirect
+	k8s.io/component-base v0.26.7 // indirect
 	k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect
-	k8s.io/kubectl v0.26.0 // indirect
+	k8s.io/kubectl v0.26.7 // indirect
 	sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
 	sigs.k8s.io/kustomize/api v0.12.1 // indirect
 	sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
diff --git a/porch/controllers/go.sum b/porch/controllers/go.sum
index e7212395..7d493ba3 100644
--- a/porch/controllers/go.sum
+++ b/porch/controllers/go.sum
@@ -779,24 +779,24 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I=
-k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg=
-k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo=
-k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ=
-k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg=
-k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
-k8s.io/cli-runtime v0.26.0 h1:aQHa1SyUhpqxAw1fY21x2z2OS5RLtMJOCj7tN4oq8mw=
-k8s.io/cli-runtime v0.26.0/go.mod h1:o+4KmwHzO/UK0wepE1qpRk6l3o60/txUZ1fEXWGIKTY=
-k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8=
-k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg=
-k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs=
-k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8=
+k8s.io/api v0.26.7 h1:Lf4iEBEJb5OFNmawtBfSZV/UNi9riSJ0t1qdhyZqI40=
+k8s.io/api v0.26.7/go.mod h1:Vk9bMadzA49UHPmHB//lX7VRCQSXGoVwfLd3Sc1SSXI=
+k8s.io/apiextensions-apiserver v0.26.7 h1:L7ImW831auK1ZQBtNJPaG5qyrFxeISEBlgfZJfnaIPk=
+k8s.io/apiextensions-apiserver v0.26.7/go.mod h1:3DbZBfS3kO7/Jaj7qqzcBtPcKP0/KcklyAnk8zc+fs4=
+k8s.io/apimachinery v0.26.7 h1:590jSBwaSHCAFCqltaEogY/zybFlhGsnLteLpuF2wig=
+k8s.io/apimachinery v0.26.7/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0=
+k8s.io/cli-runtime v0.26.7 h1:ZhAV9RK9wzXUeMKVvtVVX8jnsJcxw6hcSAu4K3eQbEo=
+k8s.io/cli-runtime v0.26.7/go.mod h1:THp0KBlPxRk4SdpeoBmsuxJwNrwfpTT4+oDaNqhpv0c=
+k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E=
+k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo=
+k8s.io/component-base v0.26.7 h1:uqsOyZh0Zqoaup8tmHa491D/CvgFdGUs+X2H/inNUKM=
+k8s.io/component-base v0.26.7/go.mod h1:CZe1HTmX/DQdeBrb9XYOXzs96jXth8ZbFvhLMsoJLUg=
 k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
 k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc=
 k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0=
-k8s.io/kubectl v0.26.0 h1:xmrzoKR9CyNdzxBmXV7jW9Ln8WMrwRK6hGbbf69o4T0=
-k8s.io/kubectl v0.26.0/go.mod h1:eInP0b+U9XUJWSYeU9XZnTA+cVYuWyl3iYPGtru0qhQ=
+k8s.io/kubectl v0.26.7 h1:s24r6MjKDMW4sMOsuBLaNYQHlweTZeDC0BPkMiom8s0=
+k8s.io/kubectl v0.26.7/go.mod h1:4PGqS2bPQ5yGE0ZSQajzYdWKFUAi8HiuWBZQ2/iEFHg=
 k8s.io/utils v0.0.0-20230115233650-391b47cb4029 h1:L8zDtT4jrxj+TaQYD0k8KNlr556WaVQylDXswKmX+dE=
 k8s.io/utils v0.0.0-20230115233650-391b47cb4029/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
diff --git a/porch/func/Dockerfile b/porch/func/Dockerfile
index 50c99fc2..6371c340 100644
--- a/porch/func/Dockerfile
+++ b/porch/func/Dockerfile
@@ -25,7 +25,7 @@ FROM gcr.io/kpt-fn/set-project-id:v0.2.0 as set-project-id
 FROM gcr.io/kpt-fn/starlark:v0.3.0 as starlark
 FROM gcr.io/kpt-fn/upsert-resource:v0.2.0 as upsert-resource
 
-FROM golang:1.20.6-alpine3.18 as builder
+FROM golang:1.20.7-alpine3.18 as builder
 WORKDIR /go/src/github.com/GoogleContainerTools/kpt
 
 RUN go install github.com/grpc-ecosystem/grpc-health-probe@v0.4.11
@@ -43,7 +43,7 @@ COPY porch/func/ porch/func/
 RUN cd porch/func ; go build -v -o /server ./server
 COPY porch/func/config.yaml /config.yaml
 
-FROM alpine:3.15
+FROM alpine:3.18
 
 COPY --from=apply-setters          /usr/local/bin/function /functions/apply-setters
 COPY --from=apply-setters-v1       /usr/local/bin/function /functions/apply-setters-v1
diff --git a/porch/func/Dockerfile-wrapperserver b/porch/func/Dockerfile-wrapperserver
index a6c38cdc..307528ee 100644
--- a/porch/func/Dockerfile-wrapperserver
+++ b/porch/func/Dockerfile-wrapperserver
@@ -1,4 +1,4 @@
-FROM golang:1.20.6-alpine3.18 as builder
+FROM golang:1.20.7-alpine3.18 as builder
 
 WORKDIR /go/src/github.com/GoogleContainerTools/kpt
 
@@ -14,6 +14,6 @@ COPY porch/func/ porch/func/
 RUN cd porch/func ; go build -v -o /wrapper-server/wrapper-server ./wrapper-server
 RUN cp $GOPATH/bin/grpc-health-probe /wrapper-server/
 
-FROM alpine:3.15
+FROM alpine:3.18
 
 COPY --from=builder /wrapper-server/* /wrapper-server/
diff --git a/porch/go.mod b/porch/go.mod
index b97d33be..665f1a4e 100644
--- a/porch/go.mod
+++ b/porch/go.mod
@@ -42,11 +42,11 @@ require (
 	google.golang.org/grpc v1.55.0
 	google.golang.org/protobuf v1.30.0
 	gopkg.in/yaml.v2 v2.4.0
-	k8s.io/api v0.26.0
-	k8s.io/apimachinery v0.26.0
-	k8s.io/apiserver v0.26.0
-	k8s.io/client-go v0.26.0
-	k8s.io/component-base v0.26.0
+	k8s.io/api v0.26.7
+	k8s.io/apimachinery v0.26.7
+	k8s.io/apiserver v0.26.7
+	k8s.io/client-go v0.26.7
+	k8s.io/component-base v0.26.7
 	k8s.io/klog/v2 v2.90.1
 	k8s.io/kube-aggregator v0.24.0-beta.0
 	k8s.io/utils v0.0.0-20230115233650-391b47cb4029
@@ -102,7 +102,7 @@ require (
 	github.com/gogo/protobuf v1.3.2 // indirect
 	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
 	github.com/google/btree v1.1.2 // indirect
-	github.com/google/cel-go v0.12.5 // indirect
+	github.com/google/cel-go v0.12.6 // indirect
 	github.com/google/gnostic v0.6.9 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
@@ -177,12 +177,12 @@ require (
 	gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
 	gopkg.in/warnings.v0 v0.1.2 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
-	k8s.io/apiextensions-apiserver v0.26.0 // indirect
-	k8s.io/cli-runtime v0.26.0 // indirect
-	k8s.io/kms v0.26.0 // indirect
+	k8s.io/apiextensions-apiserver v0.26.7 // indirect
+	k8s.io/cli-runtime v0.26.7 // indirect
+	k8s.io/kms v0.26.7 // indirect
 	k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 // indirect
-	k8s.io/kubectl v0.26.0 // indirect
-	sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33 // indirect
+	k8s.io/kubectl v0.26.7 // indirect
+	sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37 // indirect
 	sigs.k8s.io/cli-utils v0.35.0 // indirect
 	sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
 	sigs.k8s.io/kustomize/api v0.12.1 // indirect
diff --git a/porch/go.sum b/porch/go.sum
index faa09cd0..f460853e 100644
--- a/porch/go.sum
+++ b/porch/go.sum
@@ -322,8 +322,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ
 github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
 github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
 github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
-github.com/google/cel-go v0.12.5 h1:DmzaiSgoaqGCjtpPQWl26/gND+yRpim56H1jCVev6d8=
-github.com/google/cel-go v0.12.5/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw=
+github.com/google/cel-go v0.12.6 h1:kjeKudqV0OygrAqA9fX6J55S8gj+Jre2tckIm5RoG4M=
+github.com/google/cel-go v0.12.6/go.mod h1:Jk7ljRzLBhkmiAwBoUxB1sZSCVBAzkqPF25olK/iRDw=
 github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ=
 github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0=
 github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E=
@@ -1227,25 +1227,25 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 k8s.io/api v0.24.0-beta.0/go.mod h1:D7w5dDA57yCeRJnl0vPuRj6KBAwWYxea4Dwo5kgJGIY=
-k8s.io/api v0.26.0 h1:IpPlZnxBpV1xl7TGk/X6lFtpgjgntCg8PJ+qrPHAC7I=
-k8s.io/api v0.26.0/go.mod h1:k6HDTaIFC8yn1i6pSClSqIwLABIcLV9l5Q4EcngKnQg=
-k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo=
-k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ=
+k8s.io/api v0.26.7 h1:Lf4iEBEJb5OFNmawtBfSZV/UNi9riSJ0t1qdhyZqI40=
+k8s.io/api v0.26.7/go.mod h1:Vk9bMadzA49UHPmHB//lX7VRCQSXGoVwfLd3Sc1SSXI=
+k8s.io/apiextensions-apiserver v0.26.7 h1:L7ImW831auK1ZQBtNJPaG5qyrFxeISEBlgfZJfnaIPk=
+k8s.io/apiextensions-apiserver v0.26.7/go.mod h1:3DbZBfS3kO7/Jaj7qqzcBtPcKP0/KcklyAnk8zc+fs4=
 k8s.io/apimachinery v0.24.0-beta.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM=
-k8s.io/apimachinery v0.26.0 h1:1feANjElT7MvPqp0JT6F3Ss6TWDwmcjLypwoPpEf7zg=
-k8s.io/apimachinery v0.26.0/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74=
+k8s.io/apimachinery v0.26.7 h1:590jSBwaSHCAFCqltaEogY/zybFlhGsnLteLpuF2wig=
+k8s.io/apimachinery v0.26.7/go.mod h1:qYzLkrQ9lhrZRh0jNKo2cfvf/R1/kQONnSiyB7NUJU0=
 k8s.io/apiserver v0.24.0-beta.0/go.mod h1:pPF5/dEQukQjwauSxjW8IHKn8W1r8u2nERGojwFFlj4=
-k8s.io/apiserver v0.26.0 h1:q+LqIK5EZwdznGZb8bq0+a+vCqdeEEe4Ux3zsOjbc4o=
-k8s.io/apiserver v0.26.0/go.mod h1:aWhlLD+mU+xRo+zhkvP/gFNbShI4wBDHS33o0+JGI84=
-k8s.io/cli-runtime v0.26.0 h1:aQHa1SyUhpqxAw1fY21x2z2OS5RLtMJOCj7tN4oq8mw=
-k8s.io/cli-runtime v0.26.0/go.mod h1:o+4KmwHzO/UK0wepE1qpRk6l3o60/txUZ1fEXWGIKTY=
+k8s.io/apiserver v0.26.7 h1:NX/zBZZn4R+Cq6shwyn8Pn8REd0yJJ16dbtv9WkEVEU=
+k8s.io/apiserver v0.26.7/go.mod h1:r0wDRWHI7VL/KlQLTkJJBVGZ3KeNfv+VetlyRtr86xs=
+k8s.io/cli-runtime v0.26.7 h1:ZhAV9RK9wzXUeMKVvtVVX8jnsJcxw6hcSAu4K3eQbEo=
+k8s.io/cli-runtime v0.26.7/go.mod h1:THp0KBlPxRk4SdpeoBmsuxJwNrwfpTT4+oDaNqhpv0c=
 k8s.io/client-go v0.24.0-beta.0/go.mod h1:D4rgRqnNPdFCFMMrcCqCOAouzIwJkPuKXr3zWThEExM=
-k8s.io/client-go v0.26.0 h1:lT1D3OfO+wIi9UFolCrifbjUUgu7CpLca0AD8ghRLI8=
-k8s.io/client-go v0.26.0/go.mod h1:I2Sh57A79EQsDmn7F7ASpmru1cceh3ocVT9KlX2jEZg=
+k8s.io/client-go v0.26.7 h1:hyU9aKHlwVOykgyxzGYkrDSLCc4+mimZVyUJjPyUn1E=
+k8s.io/client-go v0.26.7/go.mod h1:okYjy0jtq6sdeztALDvCh24tg4opOQS1XNvsJlERDAo=
 k8s.io/code-generator v0.24.0-beta.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w=
 k8s.io/component-base v0.24.0-beta.0/go.mod h1:UrgHIn7am00FE1rRmr0GHCiNZg7oZO+Oh6iXROJt2oU=
-k8s.io/component-base v0.26.0 h1:0IkChOCohtDHttmKuz+EP3j3+qKmV55rM9gIFTXA7Vs=
-k8s.io/component-base v0.26.0/go.mod h1:lqHwlfV1/haa14F/Z5Zizk5QmzaVf23nQzCwVOQpfC8=
+k8s.io/component-base v0.26.7 h1:uqsOyZh0Zqoaup8tmHa491D/CvgFdGUs+X2H/inNUKM=
+k8s.io/component-base v0.26.7/go.mod h1:CZe1HTmX/DQdeBrb9XYOXzs96jXth8ZbFvhLMsoJLUg=
 k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
 k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
 k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
@@ -1254,16 +1254,16 @@ k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
 k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
 k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=
 k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
-k8s.io/kms v0.26.0 h1:5+GOQLvUajSd0z5ODF52RzB2rHo1HJUSYsVC3Ri3VgI=
-k8s.io/kms v0.26.0/go.mod h1:ReC1IEGuxgfN+PDCIpR6w8+XMmDE7uJhxcCwMZFdIYc=
+k8s.io/kms v0.26.7 h1:vruEJNh2IyFnPHbCH8CpUjekHy1HFJtHd/lE2K0lU78=
+k8s.io/kms v0.26.7/go.mod h1:AYuV9ZebRhr6cb1eT9L6kZVxvgIUxmE1Fe6kPhqYvuc=
 k8s.io/kube-aggregator v0.24.0-beta.0 h1:pRl/qwCw2XBuWrMzkTiWOFfONZtClgHWdbKmIZdDY8o=
 k8s.io/kube-aggregator v0.24.0-beta.0/go.mod h1:i9SRRGwxhXwuNuArHlkfy/EuWSrrbUEsIah/7OROTZU=
 k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw=
 k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk=
 k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596 h1:8cNCQs+WqqnSpZ7y0LMQPKD+RZUHU17VqLPMW3qxnxc=
 k8s.io/kube-openapi v0.0.0-20230109183929-3758b55a6596/go.mod h1:/BYxry62FuDzmI+i9B+X2pqfySRmSOW2ARmj5Zbqhj0=
-k8s.io/kubectl v0.26.0 h1:xmrzoKR9CyNdzxBmXV7jW9Ln8WMrwRK6hGbbf69o4T0=
-k8s.io/kubectl v0.26.0/go.mod h1:eInP0b+U9XUJWSYeU9XZnTA+cVYuWyl3iYPGtru0qhQ=
+k8s.io/kubectl v0.26.7 h1:s24r6MjKDMW4sMOsuBLaNYQHlweTZeDC0BPkMiom8s0=
+k8s.io/kubectl v0.26.7/go.mod h1:4PGqS2bPQ5yGE0ZSQajzYdWKFUAi8HiuWBZQ2/iEFHg=
 k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
 k8s.io/utils v0.0.0-20230115233650-391b47cb4029 h1:L8zDtT4jrxj+TaQYD0k8KNlr556WaVQylDXswKmX+dE=
@@ -1272,8 +1272,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
 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.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33 h1:LYqFq+6Cj2D0gFfrJvL7iElD4ET6ir3VDdhDdTK7rgc=
-sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.33/go.mod h1:soWkSNf2tZC7aMibXEqVhCd73GOY5fJikn8qbdzemB0=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37 h1:fAPTNEpzQMOLMGwOHNbUkR2xXTQwMJOZYNx+/mLlOh0=
+sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.37/go.mod h1:vfnxT4FXNT8eGvO+xi/DsyC/qHmdujqwrUa1WSspCsk=
 sigs.k8s.io/cli-utils v0.35.0 h1:dfSJaF1W0frW74PtjwiyoB4cwdRygbHnC7qe7HF0g/Y=
 sigs.k8s.io/cli-utils v0.35.0/go.mod h1:ITitykCJxP1vaj1Cew/FZEaVJ2YsTN9Q71m02jebkoE=
 sigs.k8s.io/controller-runtime v0.14.1 h1:vThDes9pzg0Y+UbCPY3Wj34CGIYPgdmspPm2GIpxpzM=
diff --git a/porch/pkg/cache/packagerevision.go b/porch/pkg/cache/packagerevision.go
index 7e4bcdc6..01d9c101 100644
--- a/porch/pkg/cache/packagerevision.go
+++ b/porch/pkg/cache/packagerevision.go
@@ -40,10 +40,13 @@ func (c *cachedPackageRevision) GetPackageRevision(ctx context.Context) (*v1alph
 		return nil, err
 	}
 	if c.isLatestRevision {
-		if rev.Labels == nil {
-			rev.Labels = map[string]string{}
+		// copy the labels in case the cached object is being read by another go routine
+		labels := make(map[string]string, len(rev.Labels))
+		for k, v := range rev.Labels {
+			labels[k] = v
 		}
-		rev.Labels[v1alpha1.LatestPackageRevisionKey] = v1alpha1.LatestPackageRevisionValue
+		labels[v1alpha1.LatestPackageRevisionKey] = v1alpha1.LatestPackageRevisionValue
+		rev.Labels = labels
 	}
 	return rev, nil
 }
diff --git a/porch/pkg/engine/engine.go b/porch/pkg/engine/engine.go
index d157bbe8..e5c709bc 100644
--- a/porch/pkg/engine/engine.go
+++ b/porch/pkg/engine/engine.go
@@ -113,10 +113,13 @@ func (p *PackageRevision) GetPackageRevision(ctx context.Context) (*api.PackageR
 	}
 	repoPkgRev.Labels = p.packageRevisionMeta.Labels
 	if isLatest {
-		if repoPkgRev.Labels == nil {
-			repoPkgRev.Labels = make(map[string]string)
+		// copy the labels in case the cached object is being read by another go routine
+		labels := make(map[string]string, len(repoPkgRev.Labels))
+		for k, v := range repoPkgRev.Labels {
+			labels[k] = v
 		}
-		repoPkgRev.Labels[api.LatestPackageRevisionKey] = api.LatestPackageRevisionValue
+		labels[api.LatestPackageRevisionKey] = api.LatestPackageRevisionValue
+		repoPkgRev.Labels = labels
 	}
 	repoPkgRev.Annotations = p.packageRevisionMeta.Annotations
 	repoPkgRev.Finalizers = p.packageRevisionMeta.Finalizers
diff --git a/release/images/Dockerfile b/release/images/Dockerfile
index 79485530..ccff88fd 100644
--- a/release/images/Dockerfile
+++ b/release/images/Dockerfile
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM alpine:3.13
+FROM alpine:3.18
 RUN apk update && apk upgrade && \
     apk add --no-cache git less mandoc diffutils bash openssh docker-cli && \
     rm -rf /var/lib/apt/lists/* && \
diff --git a/site/book/04-using-functions/01-declarative-function-execution.md b/site/book/04-using-functions/01-declarative-function-execution.md
index 35d78e48..89ef9128 100644
--- a/site/book/04-using-functions/01-declarative-function-execution.md
+++ b/site/book/04-using-functions/01-declarative-function-execution.md
@@ -213,6 +213,33 @@ pipeline:
         tier: mysql
 ```
 
+## Specifying function `name`
+
+Functions can optionally be named using the `pipeline.mutators.name`
+or `pipeline.validators.name` field to identify a function.
+
+For example:
+
+```yaml
+# wordpress/mysql/Kptfile
+apiVersion: kpt.dev/v1
+kind: Kptfile
+metadata:
+  name: mysql
+pipeline:
+  mutators:
+    - name: set tier label
+      image: set-labels:v0.1
+      configMap:
+        tier: mysql
+```
+
+Unique function names for all functions in the Kptfile function
+pipeline is recommended.  If `name` is specified, `kpt pkg update`
+will merge each function pipeline list as an associative list, using
+`name` as the merge key. An unspecified `name` or duplicated names may
+result in unexpected merges.
+
 ## Specifying `selectors`
 
 In some cases, you want to invoke the function only on a subset of resources based on a
diff --git a/site/installation/kpt-cli.md b/site/installation/kpt-cli.md
index dc197a0b..23188b5c 100644
--- a/site/installation/kpt-cli.md
+++ b/site/installation/kpt-cli.md
@@ -103,7 +103,7 @@ Use one of the kpt docker images.
 ### `kpt`
 
 ```shell
-$ docker run gcr.io/kpt-dev/kpt:v1.0.0-beta.38 version
+$ docker run gcr.io/kpt-dev/kpt:v1.0.0-beta.41 version
 ```
 
 ### `kpt-gcloud`
@@ -111,7 +111,7 @@ $ docker run gcr.io/kpt-dev/kpt:v1.0.0-beta.38 version
 An image which includes kpt based upon the Google [cloud-sdk] alpine image.
 
 ```shell
-$ docker run gcr.io/kpt-dev/kpt-gcloud:v1.0.0-beta.38 version
+$ docker run gcr.io/kpt-dev/kpt-gcloud:v1.0.0-beta.41 version
 ```
 
 ## Source
@@ -134,12 +134,12 @@ $ kpt version
   https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt-gcloud?gcrImageListsize=30
 [cloud-sdk]: https://github.com/GoogleCloudPlatform/cloud-sdk-docker
 [linux-amd64]:
-  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_linux_amd64
+  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.41/kpt_linux_amd64
 [linux-arm64]:
-  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_linux_arm64
+  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.41/kpt_linux_arm64
 [darwin-amd64]:
-  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_darwin_amd64
+  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.41/kpt_darwin_amd64
 [darwin-arm64]:
-  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_darwin_arm64
+  https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.41/kpt_darwin_arm64
 [migration guide]: /installation/migration
 [bash-completion]: https://github.com/scop/bash-completion#installation
diff --git a/tools/licensescan/modules/github.com/GoogleContainerTools/kpt-functions-sdk/go/fn/v0.0.0-20220506190241-f85503febd54.yaml b/tools/licensescan/modules/github.com/GoogleContainerTools/kpt-functions-sdk/go/fn/v0.0.0-20220506190241-f85503febd54.yaml
new file mode 100644
index 00000000..a91dcd53
--- /dev/null
+++ b/tools/licensescan/modules/github.com/GoogleContainerTools/kpt-functions-sdk/go/fn/v0.0.0-20220506190241-f85503febd54.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/GoogleContainerTools/kpt-functions-sdk/go/fn@v0.0.0-20220506190241-f85503febd54
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/beorn7/perks/v1.0.1.yaml b/tools/licensescan/modules/github.com/beorn7/perks/v1.0.1.yaml
new file mode 100644
index 00000000..89f390fd
--- /dev/null
+++ b/tools/licensescan/modules/github.com/beorn7/perks/v1.0.1.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/beorn7/perks@v1.0.1
+license: MIT
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/blang/semver/v4/v4.0.0.yaml b/tools/licensescan/modules/github.com/blang/semver/v4/v4.0.0.yaml
new file mode 100644
index 00000000..6bddba59
--- /dev/null
+++ b/tools/licensescan/modules/github.com/blang/semver/v4/v4.0.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/blang/semver/v4@v4.0.0
+license: MIT
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/cespare/xxhash/v2/v2.1.2.yaml b/tools/licensescan/modules/github.com/cespare/xxhash/v2/v2.1.2.yaml
new file mode 100644
index 00000000..e8411d64
--- /dev/null
+++ b/tools/licensescan/modules/github.com/cespare/xxhash/v2/v2.1.2.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/cespare/xxhash/v2@v2.1.2
+license: MIT
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/emicklei/go-restful/v3/v3.9.0.yaml b/tools/licensescan/modules/github.com/emicklei/go-restful/v3/v3.9.0.yaml
new file mode 100644
index 00000000..522e5ffd
--- /dev/null
+++ b/tools/licensescan/modules/github.com/emicklei/go-restful/v3/v3.9.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/emicklei/go-restful/v3@v3.9.0
+license: MIT
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/matttproud/golang_protobuf_extensions/v1.0.2.yaml b/tools/licensescan/modules/github.com/matttproud/golang_protobuf_extensions/v1.0.2.yaml
new file mode 100644
index 00000000..ff64820a
--- /dev/null
+++ b/tools/licensescan/modules/github.com/matttproud/golang_protobuf_extensions/v1.0.2.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/matttproud/golang_protobuf_extensions@v1.0.2
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/moby/term/v0.0.0-20220808134915-39b0c02b01ae.yaml b/tools/licensescan/modules/github.com/moby/term/v0.0.0-20220808134915-39b0c02b01ae.yaml
new file mode 100644
index 00000000..46a78ea0
--- /dev/null
+++ b/tools/licensescan/modules/github.com/moby/term/v0.0.0-20220808134915-39b0c02b01ae.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/moby/term@v0.0.0-20220808134915-39b0c02b01ae
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/prometheus/client_golang/v1.14.0.yaml b/tools/licensescan/modules/github.com/prometheus/client_golang/v1.14.0.yaml
new file mode 100644
index 00000000..3500ca4f
--- /dev/null
+++ b/tools/licensescan/modules/github.com/prometheus/client_golang/v1.14.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/prometheus/client_golang@v1.14.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/prometheus/client_model/v0.3.0.yaml b/tools/licensescan/modules/github.com/prometheus/client_model/v0.3.0.yaml
new file mode 100644
index 00000000..8d45a3ac
--- /dev/null
+++ b/tools/licensescan/modules/github.com/prometheus/client_model/v0.3.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/prometheus/client_model@v0.3.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/prometheus/common/v0.37.0.yaml b/tools/licensescan/modules/github.com/prometheus/common/v0.37.0.yaml
new file mode 100644
index 00000000..d2682d6a
--- /dev/null
+++ b/tools/licensescan/modules/github.com/prometheus/common/v0.37.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/prometheus/common@v0.37.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/prometheus/procfs/v0.8.0.yaml b/tools/licensescan/modules/github.com/prometheus/procfs/v0.8.0.yaml
new file mode 100644
index 00000000..928b5ea0
--- /dev/null
+++ b/tools/licensescan/modules/github.com/prometheus/procfs/v0.8.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/prometheus/procfs@v0.8.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/github.com/spyzhov/ajson/v0.7.2.yaml b/tools/licensescan/modules/github.com/spyzhov/ajson/v0.7.2.yaml
new file mode 100644
index 00000000..e6160485
--- /dev/null
+++ b/tools/licensescan/modules/github.com/spyzhov/ajson/v0.7.2.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/github.com/spyzhov/ajson@v0.7.2
+license: MIT
\ No newline at end of file
diff --git a/tools/licensescan/modules/golang.org/x/time/v0.3.0.yaml b/tools/licensescan/modules/golang.org/x/time/v0.3.0.yaml
new file mode 100644
index 00000000..3a5a18f3
--- /dev/null
+++ b/tools/licensescan/modules/golang.org/x/time/v0.3.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/golang.org/x/time@v0.3.0
+license: BSD-3-Clause
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/api/v0.26.0.yaml b/tools/licensescan/modules/k8s.io/api/v0.26.0.yaml
new file mode 100644
index 00000000..5712c009
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/api/v0.26.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/api@v0.26.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/apimachinery/v0.26.0.yaml b/tools/licensescan/modules/k8s.io/apimachinery/v0.26.0.yaml
new file mode 100644
index 00000000..ce4ecf5d
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/apimachinery/v0.26.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/apimachinery@v0.26.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/cli-runtime/v0.26.0.yaml b/tools/licensescan/modules/k8s.io/cli-runtime/v0.26.0.yaml
new file mode 100644
index 00000000..48ac0ac3
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/cli-runtime/v0.26.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/cli-runtime@v0.26.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/client-go/v0.26.0.yaml b/tools/licensescan/modules/k8s.io/client-go/v0.26.0.yaml
new file mode 100644
index 00000000..8c985d00
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/client-go/v0.26.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/client-go@v0.26.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/component-base/v0.26.0.yaml b/tools/licensescan/modules/k8s.io/component-base/v0.26.0.yaml
new file mode 100644
index 00000000..b518baae
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/component-base/v0.26.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/component-base@v0.26.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/kubectl/v0.26.0.yaml b/tools/licensescan/modules/k8s.io/kubectl/v0.26.0.yaml
new file mode 100644
index 00000000..3d1b48c3
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/kubectl/v0.26.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/kubectl@v0.26.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/k8s.io/utils/v0.0.0-20230115233650-391b47cb4029.yaml b/tools/licensescan/modules/k8s.io/utils/v0.0.0-20230115233650-391b47cb4029.yaml
new file mode 100644
index 00000000..e2abcae9
--- /dev/null
+++ b/tools/licensescan/modules/k8s.io/utils/v0.0.0-20230115233650-391b47cb4029.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/k8s.io/utils@v0.0.0-20230115233650-391b47cb4029
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/sigs.k8s.io/cli-utils/v0.35.0.yaml b/tools/licensescan/modules/sigs.k8s.io/cli-utils/v0.35.0.yaml
new file mode 100644
index 00000000..b324e71e
--- /dev/null
+++ b/tools/licensescan/modules/sigs.k8s.io/cli-utils/v0.35.0.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/sigs.k8s.io/cli-utils@v0.35.0
+license: Apache-2.0
\ No newline at end of file
diff --git a/tools/licensescan/modules/sigs.k8s.io/controller-runtime/v0.14.1.yaml b/tools/licensescan/modules/sigs.k8s.io/controller-runtime/v0.14.1.yaml
new file mode 100644
index 00000000..6bd5ef48
--- /dev/null
+++ b/tools/licensescan/modules/sigs.k8s.io/controller-runtime/v0.14.1.yaml
@@ -0,0 +1,2 @@
+# https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1
+license: Apache-2.0
\ No newline at end of file


Test patch:
diff --git a/commands/alpha/rpkg/pull/command_test.go b/commands/alpha/rpkg/pull/command_test.go
index 2adc9b0b..ee8d60fb 100644
--- a/commands/alpha/rpkg/pull/command_test.go
+++ b/commands/alpha/rpkg/pull/command_test.go
@@ -68,13 +68,24 @@ data:
 apiVersion: config.kubernetes.io/v1
 kind: ResourceList
 items:
+- apiVersion: porch.kpt.dev/v1alpha1
+  kind: KptRevisionMetadata
+  metadata:
+    name: repo-fjdos9u2nfe2f32
+    namespace: ns
+    creationTimestamp: null
+    resourceVersion: "999"
+    annotations:
+      config.kubernetes.io/index: '0'
+      internal.config.kubernetes.io/index: '0'
+      internal.config.kubernetes.io/path: '.KptRevisionMetadata'
+      config.kubernetes.io/path: '.KptRevisionMetadata'
 - apiVersion: kpt.dev/v1
   kind: Kptfile
   metadata:
     name: bar
     annotations:
       config.kubernetes.io/local-config: "true"
-      internal.kpt.dev/resource-version: "999"
       config.kubernetes.io/index: '0'
       internal.config.kubernetes.io/index: '0'
       internal.config.kubernetes.io/path: 'Kptfile'
@@ -121,13 +132,24 @@ data:
 apiVersion: config.kubernetes.io/v1
 kind: ResourceList
 items:
+- apiVersion: porch.kpt.dev/v1alpha1
+  kind: KptRevisionMetadata
+  metadata:
+    name: repo-fjdos9u2nfe2f32
+    namespace: ns
+    creationTimestamp: null
+    resourceVersion: "999"
+    annotations:
+      config.kubernetes.io/index: '0'
+      internal.config.kubernetes.io/index: '0'
+      internal.config.kubernetes.io/path: '.KptRevisionMetadata'
+      config.kubernetes.io/path: '.KptRevisionMetadata'
 - apiVersion: kpt.dev/v1
   kind: Kptfile
   metadata:
     name: bar
     annotations:
       config.kubernetes.io/local-config: "true"
-      internal.kpt.dev/resource-version: "999"
       config.kubernetes.io/index: '0'
       internal.config.kubernetes.io/index: '0'
       internal.config.kubernetes.io/path: 'Kptfile'
diff --git a/e2e/porch_test.go b/e2e/porch_test.go
index 2f9b277e..2e7e7ee3 100644
--- a/e2e/porch_test.go
+++ b/e2e/porch_test.go
@@ -158,13 +158,14 @@ func reorderYamlStdout(t *testing.T, buf *bytes.Buffer) {
 		return
 	}
 
-	// strip out the internal.kpt.dev/resource-version
-	// annotation, because that will change with every run
+	// strip out the resourceVersion:, creationTimestamp:
+	// because that will change with every run
 	scanner := bufio.NewScanner(buf)
 	var newBuf bytes.Buffer
 	for scanner.Scan() {
 		line := scanner.Text()
-		if !strings.Contains(line, "internal.kpt.dev/resource-version:") {
+		if !strings.Contains(line, "resourceVersion:") &&
+			!strings.Contains(line, "creationTimestamp:") {
 			newBuf.Write([]byte(line))
 			newBuf.Write([]byte("\n"))
 		}
diff --git a/e2e/testdata/porch/rpkg-clone/config.yaml b/e2e/testdata/porch/rpkg-clone/config.yaml
index 05ba6bf2..ef6bbaa9 100644
--- a/e2e/testdata/porch/rpkg-clone/config.yaml
+++ b/e2e/testdata/porch/rpkg-clone/config.yaml
@@ -61,6 +61,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-3465eed5831e5c372243d048631c8ef1666b47d6
+          namespace: rpkg-clone
+          uid: uid:basens-clone:clone-2
       - apiVersion: kpt.dev/v1
         info:
           description: sample description
@@ -107,6 +118,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-b67f9ce14d378317ba83c9504eab9cc024932dd3
+          namespace: rpkg-clone
+          uid: uid:empty-clone:clone-1
       - apiVersion: kpt.dev/v1
         info:
           description: Empty Blueprint
@@ -114,6 +136,7 @@ commands:
         metadata:
           annotations:
             config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: Kptfile
             internal.config.kubernetes.io/index: "0"
             internal.config.kubernetes.io/path: Kptfile
             internal.kpt.dev/upstream-identifier: kpt.dev|Kptfile|default|empty-clone
diff --git a/e2e/testdata/porch/rpkg-copy/config.yaml b/e2e/testdata/porch/rpkg-copy/config.yaml
index c0960ba7..eb5965ef 100644
--- a/e2e/testdata/porch/rpkg-copy/config.yaml
+++ b/e2e/testdata/porch/rpkg-copy/config.yaml
@@ -49,6 +49,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-a29df72d1135fd010ea49f4d4877001dee423be6
+          namespace: rpkg-copy
+          uid: uid:basens-edit:copy-2
       - apiVersion: kpt.dev/v1
         info:
           description: sample description
diff --git a/e2e/testdata/porch/rpkg-init-deploy/config.yaml b/e2e/testdata/porch/rpkg-init-deploy/config.yaml
index b030da32..9f757e12 100644
--- a/e2e/testdata/porch/rpkg-init-deploy/config.yaml
+++ b/e2e/testdata/porch/rpkg-init-deploy/config.yaml
@@ -39,6 +39,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-628abd0a0903f5de6cb3604d917724f6fc1b5e08
+          namespace: rpkg-init-deploy
+          uid: uid:deploy-package:deploy
       - apiVersion: kpt.dev/v1
         info:
           description: Test Package Description
diff --git a/e2e/testdata/porch/rpkg-init/config.yaml b/e2e/testdata/porch/rpkg-init/config.yaml
index db2dd906..e0392f4a 100644
--- a/e2e/testdata/porch/rpkg-init/config.yaml
+++ b/e2e/testdata/porch/rpkg-init/config.yaml
@@ -38,6 +38,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-95686470a1fd3a3ba726cce4c8f449f6bbe2b02a
+          namespace: rpkg-init
+          uid: uid:init-package:init-1
       - apiVersion: kpt.dev/v1
         info:
           description: Test Package Description
diff --git a/e2e/testdata/porch/rpkg-lifecycle/config.yaml b/e2e/testdata/porch/rpkg-lifecycle/config.yaml
index 6aae1c4d..a8970942 100644
--- a/e2e/testdata/porch/rpkg-lifecycle/config.yaml
+++ b/e2e/testdata/porch/rpkg-lifecycle/config.yaml
@@ -158,6 +158,9 @@ commands:
       - --namespace=rpkg-lifecycle
     stderr: |
       cannot reject git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 with lifecycle 'Published'
+      Error: errors:
+        cannot reject git-017a8366a5e0d9b35ae6dc489d4d3f68046d6034 with lifecycle 'Published' 
+    exitCode: 1
   - args:
       - alpha
       - rpkg
diff --git a/e2e/testdata/porch/rpkg-push/config.yaml b/e2e/testdata/porch/rpkg-push/config.yaml
index 378ab6e7..999e1b6b 100644
--- a/e2e/testdata/porch/rpkg-push/config.yaml
+++ b/e2e/testdata/porch/rpkg-push/config.yaml
@@ -24,6 +24,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-efe3d01c68dfdcdd69114c9a7c65cce0d662a46f
+          namespace: rpkg-push
+          uid: uid:test-package:push
       - apiVersion: kpt.dev/v1
         info:
           description: sample description
@@ -59,6 +70,17 @@ commands:
     stdin: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-efe3d01c68dfdcdd69114c9a7c65cce0d662a46f
+          namespace: rpkg-push
+          uid: uid:test-package:push
       - apiVersion: kpt.dev/v1
         info:
           description: sample description
@@ -122,6 +144,17 @@ commands:
     stdout: |
       apiVersion: config.kubernetes.io/v1
       items:
+      - apiVersion: ""
+        kind: KptRevisionMetadata
+        metadata:
+          annotations:
+            config.kubernetes.io/index: "0"
+            config.kubernetes.io/path: .KptRevisionMetadata
+            internal.config.kubernetes.io/index: "0"
+            internal.config.kubernetes.io/path: .KptRevisionMetadata
+          name: git-efe3d01c68dfdcdd69114c9a7c65cce0d662a46f
+          namespace: rpkg-push
+          uid: uid:test-package:push
       - apiVersion: kpt.dev/v1
         info:
           description: Updated Test Package Description