Skip to content

Commit

Permalink
Fix addition of Watchdog environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
srisco committed Jul 10, 2020
1 parent 3ecfd8e commit 8d9cb42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/backends/openfaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (of *OpenfaasBackend) CreateService(service types.Service) error {
}

// Watch for deployment changes in services namespace
var timeoutSeconds int64 = 130
var timeoutSeconds int64 = 30
var deploymentCreated = false
listOpts := metav1.ListOptions{
TimeoutSeconds: &timeoutSeconds,
Expand Down Expand Up @@ -226,7 +226,6 @@ func (of *OpenfaasBackend) ReadService(name string) (*types.Service, error) {
}

return svc, nil

}

// UpdateService updates an existent service
Expand Down
4 changes: 2 additions & 2 deletions pkg/types/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ func addWatchdogEnvVars(p *v1.PodSpec) {
},
}

for _, cont := range p.Containers {
for i, cont := range p.Containers {
if cont.Name == ContainerName {
cont.Env = append(cont.Env, requiredEnvVars...)
p.Containers[i].Env = append(p.Containers[i].Env, requiredEnvVars...)
}
}
}

0 comments on commit 8d9cb42

Please sign in to comment.