@@ -25,11 +25,11 @@ import (
25
25
"k8s.io/client-go/kubernetes"
26
26
)
27
27
28
- // WatchdogPort for the OpenFaaS function watchdog
29
- const WatchdogPort = 8080
28
+ // watchdogPort for the OpenFaaS function watchdog
29
+ const watchdogPort = 8080
30
30
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
33
33
34
34
// DefaultFunctionNamespace define default work namespace
35
35
const DefaultFunctionNamespace string = "default"
@@ -150,7 +150,7 @@ func makeDeploymentSpec(request requests.CreateFunctionRequest, config *DeployHa
150
150
151
151
nodeSelector := createSelector (request .Constraints )
152
152
153
- initialReplicas := int32p (InitialReplicas )
153
+ initialReplicas := int32p (initialReplicasCount )
154
154
155
155
resources , resourceErr := createResources (request )
156
156
@@ -195,7 +195,7 @@ func makeDeploymentSpec(request requests.CreateFunctionRequest, config *DeployHa
195
195
Name : request .Service ,
196
196
Image : request .Image ,
197
197
Ports : []apiv1.ContainerPort {
198
- {ContainerPort : int32 (WatchdogPort ), Protocol : v1 .ProtocolTCP },
198
+ {ContainerPort : int32 (watchdogPort ), Protocol : v1 .ProtocolTCP },
199
199
},
200
200
Env : envVars ,
201
201
Resources : * resources ,
@@ -226,10 +226,10 @@ func makeServiceSpec(request requests.CreateFunctionRequest) *v1.Service {
226
226
Ports : []v1.ServicePort {
227
227
{
228
228
Protocol : v1 .ProtocolTCP ,
229
- Port : 8080 ,
229
+ Port : watchdogPort ,
230
230
TargetPort : intstr.IntOrString {
231
231
Type : intstr .Int ,
232
- IntVal : int32 (8080 ),
232
+ IntVal : int32 (watchdogPort ),
233
233
},
234
234
},
235
235
},
0 commit comments