Merge pull request #60314 from mtaufen/kubelet-manifest-is-oldspeak

Automatic merge from submit-queue (batch tested with PRs 60324, 60269, 59771, 60314, 59941). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

expunge the word 'manifest' from Kubelet's config API

The word 'manifest' technically refers to a container-group specification
that predated the Pod abstraction. We should avoid using this legacy
terminology where possible. Fortunately, the Kubelet's config API will
be beta in 1.10 for the first time, so we still had the chance to make
this change.

I left the flags alone, since they're deprecated anyway.

I changed a few var names in files I touched too, but this PR is the
just the first shot, not the whole campaign
(`git grep -i manifest | wc -l -> 1248`).

```release-note
Some field names in the Kubelet's now v1beta1 config API differ from the v1alpha1 API: PodManifestPath is renamed to PodPath, ManifestURL is renamed to PodURL, ManifestURLHeader is renamed to PodURLHeader.
```
This commit is contained in:
Kubernetes Submit Queue
2018-02-24 20:01:46 -08:00
committed by GitHub
17 changed files with 77 additions and 77 deletions

View File

@@ -129,12 +129,12 @@ func (e *E2EServices) startKubelet() (*server, error) {
return nil, err
}
// Create pod manifest path
manifestPath, err := createPodManifestDirectory()
// Create pod directory
podPath, err := createPodDirectory()
if err != nil {
return nil, err
}
e.rmDirs = append(e.rmDirs, manifestPath)
e.rmDirs = append(e.rmDirs, podPath)
err = createRootDirectory(KubeletRootDirectory)
if err != nil {
return nil, err
@@ -159,7 +159,7 @@ func (e *E2EServices) startKubelet() (*server, error) {
kc.SerializeImagePulls = false
kubeletConfigFlags = append(kubeletConfigFlags, "serialize-image-pulls")
kc.PodManifestPath = manifestPath
kc.StaticPodPath = podPath
kubeletConfigFlags = append(kubeletConfigFlags, "pod-manifest-path")
kc.FileCheckFrequency = metav1.Duration{Duration: 10 * time.Second} // Check file frequently so tests won't wait too long
@@ -216,7 +216,7 @@ func (e *E2EServices) startKubelet() (*server, error) {
"-v", "/var/lib/docker:/var/lib/docker",
"-v", "/var/lib/kubelet:/var/lib/kubelet:rw,rslave",
"-v", "/var/log:/var/log",
"-v", manifestPath+":"+manifestPath+":rw",
"-v", podPath+":"+podPath+":rw",
)
// if we will generate a kubelet config file, we need to mount that path into the container too
@@ -400,15 +400,15 @@ func newKubeletConfigJSONEncoder() (runtime.Encoder, error) {
return kubeletCodecs.EncoderForVersion(info.Serializer, v1beta1.SchemeGroupVersion), nil
}
// createPodManifestDirectory creates pod manifest directory.
func createPodManifestDirectory() (string, error) {
// createPodDirectory creates pod directory.
func createPodDirectory() (string, error) {
cwd, err := os.Getwd()
if err != nil {
return "", fmt.Errorf("failed to get current working directory: %v", err)
}
path, err := ioutil.TempDir(cwd, "pod-manifest")
path, err := ioutil.TempDir(cwd, "static-pods")
if err != nil {
return "", fmt.Errorf("failed to create static pod manifest directory: %v", err)
return "", fmt.Errorf("failed to create static pod directory: %v", err)
}
return path, nil
}