Change:
[X] Test approval issue: [X] Test PR: 5 Oct 2022 [X] Two weeks soak end date: 19 Oct 2022 [X] Test promotion PR: According to this APIsnoop query, there are still three remaining LimitRange endpoints which are untested. replaceCoreV1NamespacedServiceAccount Using a number of existing e2e test practices a new has been created for one ServiceAccount endpoint. The e2e logs for this test are listed below. This query shows which ServiceAccount endpoints are hit within a short period of running this e2e test If a test with these calls gets merged, test coverage will go up by 1 point This test is also created with the goal of conformance promotion. /sig testing /sig architecture /area conformance
/triage accepted
/reopen
Reopened this issue. <detailsIn response to : /reopen Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details

Discussion:
apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" <ins> utilrand "k8s.io/apimachinery/pkg/util/rand" </ins> "k8s.io/apimachinery/pkg/util/sets" "k8s.io/apimachinery/pkg/util/uuid" "k8s.io/apimachinery/pkg/util/wait" watch "k8s.io/apimachinery/pkg/watch" <ins> "k8s.io/client-go/util/retry" </ins> "k8s.io/kubernetes/plugin/pkg/admission/serviceaccount" "k8s.io/kubernetes/test/e2e/framework" e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"

})) framework.Logf("Reconciled root ca configmap in namespace %q", f.Namespace.Name) }) <ins> ginkgo.It("should update a ServiceAccount", func() { saClient := f.ClientSet.CoreV1().ServiceAccounts(f.Namespace.Name) saName := "e2e-sa-" + utilrand.String(5) initialServiceAccount := &v1.ServiceAccount{ ObjectMeta: metav1.ObjectMeta{ Name: saName, }, AutomountServiceAccountToken: utilptr.Bool(false), } ginkgo.By(fmt.Sprintf("Creating ServiceAccount %q ", saName)) createdServiceAccount, err := saClient.Create(context.TODO(), initialServiceAccount, metav1.CreateOptions{}) framework.ExpectNoError(err) framework.ExpectEqual(createdServiceAccount.AutomountServiceAccountToken, utilptr.Bool(false), "Failed to set AutomountServiceAccountToken") framework.Logf("AutomountServiceAccountToken: %v", *createdServiceAccount.AutomountServiceAccountToken) ginkgo.By(fmt.Sprintf("Updating ServiceAccount %q ", saName)) var updatedServiceAccount *v1.ServiceAccount err = retry.RetryOnConflict(retry.DefaultRetry, func() error { updateServiceAccount, err := saClient.Get(context.TODO(), saName, metav1.GetOptions{}) framework.ExpectNoError(err, "Unable to get ServiceAccount %q", saName) updateServiceAccount.AutomountServiceAccountToken = utilptr.Bool(true) updatedServiceAccount, err = saClient.Update(context.TODO(), updateServiceAccount, metav1.UpdateOptions{}) return err }) framework.ExpectNoError(err, "Failed to update ServiceAccount") framework.ExpectEqual(updatedServiceAccount.AutomountServiceAccountToken, utilptr.Bool(true), "Failed to set AutomountServiceAccountToken") framework.Logf("AutomountServiceAccountToken: %v", *updatedServiceAccount.AutomountServiceAccountToken) }) </ins> }) var reportLogsParser = regexp.MustCompile("([a-zA-Z0-9-_]*)=([a-zA-Z0-9-_]*)$")