MCPcopy
hub / github.com/kubernetes/client-go / NewDefaultPathOptions

Function NewDefaultPathOptions

tools/clientcmd/config.go:137–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135}
136
137func NewDefaultPathOptions() *PathOptions {
138 ret := &PathOptions{
139 GlobalFile: RecommendedHomeFile,
140 EnvVar: RecommendedConfigPathEnvVar,
141 ExplicitFileFlag: RecommendedConfigPathFlag,
142
143 GlobalFileSubpath: path.Join(RecommendedHomeDir, RecommendedFileName),
144
145 LoadingRules: NewDefaultClientConfigLoadingRules(),
146 }
147 ret.LoadingRules.DoNotResolvePaths = true
148
149 return ret
150}
151
152// ModifyConfig takes a Config object, iterates through Clusters, AuthInfos, and Contexts, uses the LocationOfOrigin if specified or
153// uses the default destination file to write the results into. This results in multiple file reads, but it's very easy to follow.

Callers 1

TestModifyContextFunction · 0.85

Calls 1

Tested by 1

TestModifyContextFunction · 0.68