UPSTREAM: <carry>: disable file locking for kubeconfig because it breaks tests
@@ -22,7 +22,6 @@ import (
"path"
"path/filepath"
"reflect"
- "sort"
"k8s.io/klog"
@@ -156,17 +155,6 @@ func NewDefaultPathOptions() *PathOptions {
// that means that this code will only write into a single file. If you want to relativizePaths, you must provide a fully qualified path in any
// modified element.
func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error {
- possibleSources := configAccess.GetLoadingPrecedence()
- // sort the possible kubeconfig files so we always "lock" in the same order
- // to avoid deadlock (note: this can fail w/ symlinks, but... come on).
- sort.Strings(possibleSources)
- for _, filename := range possibleSources {
- if err := lockFile(filename); err != nil {
- return err
- }
- defer unlockFile(filename)
- }
-
startingConfig, err := configAccess.GetStartingConfig()
if err != nil {
return err
