Skip to content

Commit

Permalink
Revert "Add app label to the pods"
Browse files Browse the repository at this point in the history
This reverts commit bb06252.
  • Loading branch information
Alex Guerra authored and aguerra committed Apr 27, 2018
1 parent 505eb11 commit b30a2aa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [NEXT_RELEASE]
### Changed
- [server] Add app label to the pods
- [server] Always return `fallback` cloudprovider operations for unknown cloud providers

### Fixed
Expand Down
1 change: 0 additions & 1 deletion pkg/server/spec/cronjob.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ func NewCronJob(description, slugURL, schedule string, imgs *Images, a *app.App,
"SLUG_URL": slugURL,
"SLUG_DIR": slugVolumeMountPath,
},
Labels{},
fs,
)
ps.Containers[0].Args = args
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/spec/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ func NewDeploy(imgs *Images, description, slugURL string, rhl int, a *app.App, t
"SLUG_URL": slugURL,
"SLUG_DIR": slugVolumeMountPath,
},
Labels{"run": a.Name, "app": a.Name},
fs,
)
ps.Labels["run"] = a.Name
ps.Containers[0].Args = []string{"start", a.ProcessType}
ps.Containers[0].VolumeMounts = append(ps.Containers[0].VolumeMounts, newSlugVolumeMount())

Expand Down
6 changes: 2 additions & 4 deletions pkg/server/spec/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ func newPodContainers(name, nginxImage, appImage string, envVars map[string]stri
return c
}

func NewPod(name, nginxImage, image string, a *app.App, envVars map[string]string, labels Labels, fs storage.Storage) *Pod {
func NewPod(name, nginxImage, image string, a *app.App, envVars map[string]string, fs storage.Storage) *Pod {
hasNginx := nginxImage != ""
ps := &Pod{
Name: name,
Namespace: a.Name,
Containers: newPodContainers(name, nginxImage, image, envVars, a.Secrets),
Volumes: newPodVolumes(a.Name, fs, hasNginx),
Labels: labels,
Labels: make(map[string]string),
}

for _, e := range a.EnvVars {
Expand All @@ -103,7 +103,6 @@ func NewBuilder(name, tarBallLocation, buildDest, image string, a *app.App, fs s
"PUT_PATH": buildDest,
"BUILDER_STORAGE": fs.Type(),
},
Labels{},
fs,
)
ps.Containers[0].VolumeMounts = []*VolumeMounts{newStorageKeyVolumeMount()}
Expand All @@ -122,7 +121,6 @@ func NewRunner(name, slugURL string, imgs *Images, a *app.App, fs storage.Storag
"SLUG_URL": slugURL,
"SLUG_DIR": slugVolumeMountPath,
},
Labels{},
fs,
)
ps.Containers[0].Args = command
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/spec/pod_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestNewPodSpec(t *testing.T) {
expectedName := "test"
expectedImage := "docker/teresa-test:0.0.1"

ps := NewPod(expectedName, "nginx", expectedImage, a, ev, Labels{}, storage.NewFake())
ps := NewPod(expectedName, "nginx", expectedImage, a, ev, storage.NewFake())
if ps.Name != expectedName {
t.Errorf("expected %s, got %s", expectedName, ps.Name)
}
Expand Down

0 comments on commit b30a2aa

Please sign in to comment.