// KubectlPath returns distro based path for kubectl
512338
func (c *NodeupModelContext) KubectlPath() string {
	kubeletCommand := "/usr/local/bin"
	if c.Distribution == distros.DistributionCoreOS {
		kubeletCommand = "/opt/bin"
	}
	if c.Distribution == distros.DistributionContainerOS {
		kubeletCommand = "/home/kubernetes/bin"
	}
	return kubeletCommand
}
1052095
func (s *Service) confPath() string {
	return path.Join(InitDir, s.Service.Name+".conf")
}
580750
func absPath(configPath string, defaultPathFn func() (string, error)) (o string, err error) {
	if len(configPath) > 0 {
		if o, err = filepath.Abs(configPath); err != nil {
			err = errors.Wrapf(err, "filepath.Abs of %s failed", configPath)
			return
		}
	} else if defaultPathFn != nil {
		if o, err = defaultPathFn(); err != nil {
			err = errors.Wrapf(err, "default path function to compute absPath of %s failed", configPath)
			return
		}
	}
	return
}
844278
func (m *MountPoint) Path() string {
	if m.Volume != nil {
		return m.Volume.Path()
	}
	return m.Source
}
546283
func relPathToRelGoPath(modAbsPath, absPath string) string {
	if absPath == "." {
		return ""
	}

	path := strings.TrimPrefix(absPath, modAbsPath)
	pathItems := strings.Split(path, string(filepath.Separator))
	return strings.Join(pathItems, "/")
}
466506
func BuildFromPath(path string) (*ServiceTemplate, error) {
	sd, err := servicedefinition.BuildFromPath(path)
	if err != nil {
		return nil, err
	}
	st := ServiceTemplate{
		Services:    []servicedefinition.ServiceDefinition{*sd},
		Name:        sd.Name,
		Version:     sd.Version,
		Description: sd.Description,
	}
	return &st, nil
}
80967
func NewKubeStaticPodPathManagerUsingTempDirs(realManifestDir string, saveManifestsDir, saveEtcdDir bool) (StaticPodPathManager, error) {
	upgradedManifestsDir, err := constants.CreateTempDirForKubeadm("kubeadm-upgraded-manifests")
	if err != nil {
		return nil, err
	}
	backupManifestsDir, err := constants.CreateTimestampDirForKubeadm("kubeadm-backup-manifests")
	if err != nil {
		return nil, err
	}
	backupEtcdDir, err := constants.CreateTimestampDirForKubeadm("kubeadm-backup-etcd")
	if err != nil {
		return nil, err
	}

	return NewKubeStaticPodPathManager(realManifestDir, upgradedManifestsDir, backupManifestsDir, backupEtcdDir, saveManifestsDir, saveEtcdDir), nil
}
944565
func kpath(key, keytail string) string {
	l, t := len(key), len(keytail)
	return key[:l-t]
}
1031535
func GetAbsolutePath(bin string) (string, error) {
	lp, err := exec.LookPath(bin)
	if err != nil {
		return "", fmt.Errorf("failed to resolve path to %q executable: %v", bin, err)
	}

	return filepath.EvalSymlinks(lp)
}
1107068
func (o *Opts) ConfigPath(path string) *Opts {
	o.cfgPath = path
	return o
}
433429
func Convert_kubeadm_HostPathMount_To_v1beta2_HostPathMount(in *kubeadm.HostPathMount, out *HostPathMount, s conversion.Scope) error {
	return autoConvert_kubeadm_HostPathMount_To_v1beta2_HostPathMount(in, out, s)
}
507653
func (k *InstalledKite) BinPath() string {
	return filepath.Join(k.Domain, k.User, k.Repo, k.Version, "bin", strings.TrimSuffix(k.Repo, ".kite"))
}
303534
func (p *Pod) Path() string {
	switch {
	case p.isEmbryo:
		return p.embryoPath()
	case p.isPreparing || p.isAbortedPrepare:
		return p.preparePath()
	case p.isPrepared:
		return p.preparedPath()
	case p.isExitedGarbage:
		return p.exitedGarbagePath()
	case p.isGarbage:
		return p.garbagePath()
	case p.isGone:
		return "" // TODO(vc): anything better?
	}

	return p.runPath()
}
204383
func (n *Network) PeerConfigPath(p *Peer) string {
	return filepath.Join(n.PeerDir(p), "core.yaml")
}
453662
func (e *V1Endpoint) Path(path string) string {
	return e.URL.String() + "/v1/" + path
}
401593
func (kl *Kubelet) getPodContainerDir(podUID types.UID, ctrName string) string {
	return filepath.Join(kl.getPodDir(podUID), config.DefaultKubeletContainersDirName, ctrName)
}
1355920
func parsePathSpec(path string) (*PathSpec, error) {
	parts := strings.SplitN(path, ":", 2)
	if !isPathForPod(path) {
		return &PathSpec{
			Path: path,
		}, nil
	}
	if reasons := kvalidation.ValidatePodName(parts[0], false); len(reasons) != 0 {
		return nil, fmt.Errorf("invalid pod name %s: %s", parts[0], strings.Join(reasons, ", "))
	}
	return &PathSpec{
		PodName: parts[0],
		Path:    parts[1],
	}, nil
}