File tree Expand file tree Collapse file tree 4 files changed +97
-3
lines changed Expand file tree Collapse file tree 4 files changed +97
-3
lines changed Original file line number Diff line number Diff line change
1
+ REGISTRY_NAME? =docker.io/sbezverk
2
+ IMAGE_VERSION? =0.0.0
3
+
4
+ .PHONY : all jalapeno-gateway container push clean test
5
+
6
+ ifdef V
7
+ TESTARGS = -v -args -alsologtostderr -v 5
8
+ else
9
+ TESTARGS =
10
+ endif
11
+
12
+ all : jalapeno-gateway
13
+
14
+ jalapeno-gateway :
15
+ mkdir -p bin
16
+ CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -ldflags ' -extldflags "-static"' -o ./bin/jalapeno-gateway ./cmd/gateway.go
17
+
18
+ container : jalapeno-gateway
19
+ docker build -t $(REGISTRY_NAME ) /jalapeno-gateway-debug:$(IMAGE_VERSION ) -f ./build/Dockerfile.gateway .
20
+
21
+ push : container
22
+ docker push $(REGISTRY_NAME ) /jalapeno-gateway-debug:$(IMAGE_VERSION )
23
+
24
+ clean :
25
+ rm -rf bin
26
+
27
+ test :
28
+ GO111MODULE=on go test ` go list ./... | grep -v ' vendor' ` $(TESTARGS )
29
+ GO111MODULE=on go vet ` go list ./... | grep -v vendor`
Original file line number Diff line number Diff line change
1
+ FROM scratch
2
+
3
+ COPY ./bin/jalapeno-gateway /jalapeno-gateway
4
+ ENTRYPOINT ["/jalapeno-gateway"]
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ConfigMap
3
+ data :
4
+ gateway-config.yaml : |
5
+ metadata :
6
+ name : jalapeno-gateway-config
7
+ namespace : default
8
+ ---
9
+ apiVersion : v1
10
+ kind : Service
11
+ spec :
12
+ ports :
13
+ - name : jalapeno-gateway
14
+ port : 40040
15
+ protocol : TCP
16
+ targetPort : gateway-port
17
+ selector :
18
+ app : jalapeno-gateway
19
+ type : ClusterIP
20
+ externalIPs :
21
+ - 192.168.80.104
22
+ metadata :
23
+ name : jalapeno-gateway
24
+ namespace : default
25
+ ---
26
+ apiVersion : apps/v1
27
+ kind : Deployment
28
+ metadata :
29
+ name : jalapeno-gateway
30
+ spec :
31
+ replicas : 2
32
+ selector :
33
+ matchLabels :
34
+ app : jalapeno-gateway
35
+ template :
36
+ metadata :
37
+ labels :
38
+ app : jalapeno-gateway
39
+ spec :
40
+ containers :
41
+ - name : jalapeno-gateway
42
+ image : 192.168.80.240:4000/jalapeno-gateway/jalapeno-gateway-debug:v0.0.0
43
+ imagePullPolicy : Always
44
+ ports :
45
+ - containerPort : 40040
46
+ name : gateway-port
47
+ protocol : TCP
48
+ volumeMounts :
49
+ - name : config-volume
50
+ mountPath : /config
51
+ env :
52
+ - name : GATEWAY_PORT
53
+ value : " 40040"
54
+
55
+ volumes :
56
+ - name : config-volume
57
+ configMap :
58
+ name : jalapeno-gateway-config
59
+ metadata :
60
+ name : jalapeno-gateway
61
+ namespace : default
Original file line number Diff line number Diff line change 17
17
)
18
18
19
19
type dbMock struct {
20
- mu sync.Mutex
21
- qoe map [int32 ]* pbapi.Qoe
22
- vpnRD2AS map [uint32 ][]uint32
20
+ mu sync.Mutex
21
+ qoe map [int32 ]* pbapi.Qoe
22
+ vpn map [pbapi. RouteDistinguisherType ] map [uint32 ][]uint32
23
23
}
24
24
25
25
// GetQoE is required method by DB interface, it takes requested QoE and searches through
You can’t perform that action at this time.
0 commit comments