diff --git a/pkg/backends/openfaas.go b/pkg/backends/openfaas.go index d8616ef9..a3d9a733 100644 --- a/pkg/backends/openfaas.go +++ b/pkg/backends/openfaas.go @@ -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, @@ -226,7 +226,6 @@ func (of *OpenfaasBackend) ReadService(name string) (*types.Service, error) { } return svc, nil - } // UpdateService updates an existent service diff --git a/pkg/types/service.go b/pkg/types/service.go index 18d09c85..ca69073d 100644 --- a/pkg/types/service.go +++ b/pkg/types/service.go @@ -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...) } } }