File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Expand file tree Collapse file tree 3 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import (
12
12
"io/ioutil"
13
13
"os"
14
14
"path/filepath"
15
+ "strconv"
15
16
"strings"
16
17
"time"
17
18
)
@@ -82,6 +83,12 @@ func main() {
82
83
// start stress tests if any
83
84
beginStressTest (viper .GetInt ("stress-cpu" ), viper .GetInt ("stress-memory" ), logger )
84
85
86
+ // validate port
87
+ if _ , err := strconv .Atoi (viper .GetString ("port" )); err != nil {
88
+ port , _ := fs .GetInt ("port" )
89
+ viper .Set ("port" , strconv .Itoa (port ))
90
+ }
91
+
85
92
// load HTTP server config
86
93
var srvCfg api.Config
87
94
if err := viper .Unmarshal (& srvCfg ); err != nil {
@@ -92,7 +99,7 @@ func main() {
92
99
logger .Info ("Starting podinfo" ,
93
100
zap .String ("version" , viper .GetString ("version" )),
94
101
zap .String ("revision" , viper .GetString ("revision" )),
95
- zap .String ("port" , viper . GetString ( "port" ) ),
102
+ zap .String ("port" , srvCfg . Port ),
96
103
)
97
104
98
105
// start HTTP server
Original file line number Diff line number Diff line change 1
1
---
2
- apiVersion : apps/v1beta1
2
+ apiVersion : apps/v1
3
3
kind : Deployment
4
4
metadata :
5
5
name : podinfo
6
6
spec :
7
- replicas : 1
7
+ minReadySeconds : 5
8
+ progressDeadlineSeconds : 60
9
+ strategy :
10
+ rollingUpdate :
11
+ maxUnavailable : 0
12
+ type : RollingUpdate
13
+ selector :
14
+ matchLabels :
15
+ app : podinfo
8
16
template :
9
17
metadata :
18
+ annotations :
19
+ prometheus.io/scrape : " true"
10
20
labels :
11
21
app : podinfo
12
- # role: openfaas-system
13
- annotations :
14
- prometheus.io/scrape : ' true'
15
22
spec :
16
23
containers :
17
24
- name : podinfod
18
- image : quay.io/stefanprodan/podinfo:1.0.1
25
+ image : quay.io/stefanprodan/podinfo:1.4.3
19
26
command :
20
27
- ./podinfo
21
28
- --port=9898
Original file line number Diff line number Diff line change 1
1
package version
2
2
3
- var VERSION = "1.4.2 "
3
+ var VERSION = "1.4.3 "
4
4
var REVISION = "unknown"
You can’t perform that action at this time.
0 commit comments