Skip to content

Commit 2be9356

Browse files
committed
Use watchdog port constant
Signed-off-by: Alex Ellis <[email protected]>
1 parent c1aaaa3 commit 2be9356

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

handlers/deploy.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ import (
2525
"k8s.io/client-go/kubernetes"
2626
)
2727

28-
// WatchdogPort for the OpenFaaS function watchdog
29-
const WatchdogPort = 8080
28+
// watchdogPort for the OpenFaaS function watchdog
29+
const watchdogPort = 8080
3030

31-
// InitialReplicas how many replicas to start of creating for a function
32-
const InitialReplicas = 1
31+
// initialReplicasCount how many replicas to start of creating for a function
32+
const initialReplicasCount = 1
3333

3434
// DefaultFunctionNamespace define default work namespace
3535
const DefaultFunctionNamespace string = "default"
@@ -150,7 +150,7 @@ func makeDeploymentSpec(request requests.CreateFunctionRequest, config *DeployHa
150150

151151
nodeSelector := createSelector(request.Constraints)
152152

153-
initialReplicas := int32p(InitialReplicas)
153+
initialReplicas := int32p(initialReplicasCount)
154154

155155
resources, resourceErr := createResources(request)
156156

@@ -195,7 +195,7 @@ func makeDeploymentSpec(request requests.CreateFunctionRequest, config *DeployHa
195195
Name: request.Service,
196196
Image: request.Image,
197197
Ports: []apiv1.ContainerPort{
198-
{ContainerPort: int32(WatchdogPort), Protocol: v1.ProtocolTCP},
198+
{ContainerPort: int32(watchdogPort), Protocol: v1.ProtocolTCP},
199199
},
200200
Env: envVars,
201201
Resources: *resources,
@@ -226,10 +226,10 @@ func makeServiceSpec(request requests.CreateFunctionRequest) *v1.Service {
226226
Ports: []v1.ServicePort{
227227
{
228228
Protocol: v1.ProtocolTCP,
229-
Port: 8080,
229+
Port: watchdogPort,
230230
TargetPort: intstr.IntOrString{
231231
Type: intstr.Int,
232-
IntVal: int32(8080),
232+
IntVal: int32(watchdogPort),
233233
},
234234
},
235235
},

0 commit comments

Comments
 (0)