Skip to content
This repository was archived by the owner on Nov 5, 2020. It is now read-only.

Commit d30a19f

Browse files
committed
Update to latest faas-provider
* Move to new namespace * Update to new functions types for CRUD Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent aa06502 commit d30a19f

37 files changed

+278
-222
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
FROM golang:1.11 as build
22

3-
RUN mkdir -p /go/src/github.com/ewilde/faas-federation/
3+
RUN mkdir -p /go/src/github.com/openfaas-incubator/faas-federation/
4+
ENV CGO_ENABLED=0
45

5-
WORKDIR /go/src/github.com/ewilde/faas-federation
6+
WORKDIR /go/src/github.com/openfaas-incubator/faas-federation
67

78
COPY .git .git
89
COPY handlers handlers
@@ -46,6 +47,6 @@ EXPOSE 8080
4647
ENV http_proxy ""
4748
ENV https_proxy ""
4849

49-
COPY --from=build /go/src/github.com/ewilde/faas-federation/faas-federation .
50+
COPY --from=build /go/src/github.com/openfaas-incubator/faas-federation/faas-federation .
5051

5152
CMD ["./faas-federation"]

Gopkg.lock

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,14 @@
1-
# Gopkg.toml example
2-
#
3-
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
4-
# for detailed Gopkg.toml documentation.
5-
#
6-
# required = ["github.com/user/thing/cmd/thing"]
7-
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8-
#
9-
# [[constraint]]
10-
# name = "github.com/user/project"
11-
# version = "1.0.0"
12-
#
13-
# [[constraint]]
14-
# name = "github.com/user/project2"
15-
# branch = "dev"
16-
# source = "github.com/myfork/project2"
17-
#
18-
# [[override]]
19-
# name = "github.com/x/y"
20-
# version = "2.4.0"
21-
#
22-
# [prune]
23-
# non-go = false
24-
# go-tests = true
25-
# unused-packages = true
26-
27-
281
[[constraint]]
292
name = "github.com/gorilla/mux"
303
version = "1.7.1"
314

325
[[constraint]]
336
name = "github.com/openfaas/faas"
34-
version = "0.13.0"
7+
version = "0.18.0"
358

369
[[constraint]]
3710
name = "github.com/openfaas/faas-provider"
38-
version = "0.9.0"
11+
version = "0.10.2"
3912

4013
[[constraint]]
4114
name = "github.com/sirupsen/logrus"

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ testacc: goimportscheck
1515

1616
.PHONY: build
1717
build:
18-
docker build -t ewilde/faas-federation:$(TAG) . --squash=${SQUASH}
18+
docker build -t openfaas/faas-federation:$(TAG) . --squash=${SQUASH}
1919

2020
.PHONY: build-local
2121
build-local:
2222
go build --ldflags "-s -w \
23-
-X github.com/ewilde/faas-federation/version.GitCommitSHA=${GIT_COMMIT_SHA} \
24-
-X \"github.com/ewilde/faas-federation/version.GitCommitMessage=${GIT_COMMIT_MESSAGE}\" \
25-
-X github.com/ewilde/faas-federation/version.Version=${VERSION}" \
23+
-X github.com/openfaas-incubator/faas-federation/version.GitCommitSHA=${GIT_COMMIT_SHA} \
24+
-X \"github.com/openfaas-incubator/faas-federation/version.GitCommitMessage=${GIT_COMMIT_MESSAGE}\" \
25+
-X github.com/openfaas-incubator/faas-federation/version.Version=${VERSION}" \
2626
-o faas-federation .
2727

2828
.PHONY: up-local
@@ -31,8 +31,8 @@ up: build
3131

3232
.PHONY: push
3333
push:
34-
docker tag ewilde/faas-federation:latest ewilde/faas-federation:${VERSION}
35-
docker push ewilde/faas-federation:${VERSION}
34+
docker tag openfaas/faas-federation:latest openfaas/faas-federation:${VERSION}
35+
docker push openfaas/faas-federation:${VERSION}
3636

3737
.PHONY: release
3838
release:

deployment/chart/of-federation/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ keywords:
1313
maintainers:
1414
- name: alexellis
1515
16-
- name: ewilde
17-
email: ewilde@gmail.com
16+
- name: openfaas
17+
email: openfaas@gmail.com

deployment/chart/of-federation/OWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
approvers:
22
- alexellis
3-
- ewilde
3+
- openfaas

deployment/chart/of-federation/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ faasnetes:
2626
periodSeconds: 10
2727

2828
faasfederation:
29-
image: ewilde/faas-federation:0.1
29+
image: openfaas/faas-federation:0.1
3030
replicas: 1
3131
readTimeout : "60s"
3232
writeTimeout : "60s"
@@ -44,7 +44,7 @@ faasfederation:
4444
default_provider: "http://faasnetes.openfaas:8080"
4545

4646
faaslambda:
47-
image: ewilde/faas-lambda:0.1
47+
image: openfaas/faas-lambda:0.1
4848
replicas: 1
4949
readTimeout : "60s"
5050
writeTimeout : "60s"

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ services:
4040
faas-federation:
4141
ports:
4242
- 8081:8080
43-
image: ewilde/faas-federation:latest
43+
image: openfaas/faas-federation:latest
4444
networks:
4545
- federation
4646
environment:
@@ -67,7 +67,7 @@ services:
6767
faas-provider-a:
6868
ports:
6969
- 8082:8080
70-
image: ewilde/faas-inmemory:latest
70+
image: openfaas/faas-inmemory:latest
7171
networks:
7272
- federation
7373
environment:
@@ -92,7 +92,7 @@ services:
9292
faas-provider-b:
9393
ports:
9494
- 8083:8080
95-
image: ewilde/faas-inmemory:latest
95+
image: openfaas/faas-inmemory:latest
9696
networks:
9797
- federation
9898
environment:

handlers/delete_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/ewilde/faas-federation/routing"
11-
acc "github.com/ewilde/faas-federation/testing"
1210
"github.com/gorilla/mux"
11+
"github.com/openfaas-incubator/faas-federation/routing"
12+
acc "github.com/openfaas-incubator/faas-federation/testing"
1313
"github.com/openfaas/faas-provider/proxy"
1414
)
1515

handlers/deploy.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ import (
1010
"io/ioutil"
1111
"net/http"
1212

13-
"github.com/ewilde/faas-federation/routing"
13+
types "github.com/openfaas/faas-provider/types"
14+
1415
"github.com/gorilla/mux"
15-
"github.com/openfaas/faas/gateway/requests"
16+
"github.com/openfaas-incubator/faas-federation/routing"
1617
log "github.com/sirupsen/logrus"
1718
)
1819

@@ -35,7 +36,7 @@ func MakeDeployHandler(proxy http.HandlerFunc, providerLookup routing.ProviderLo
3536
}
3637
}
3738

38-
func proxyDeployment(proxy http.HandlerFunc, function *requests.CreateFunctionRequest, w http.ResponseWriter, r *http.Request) {
39+
func proxyDeployment(proxy http.HandlerFunc, function *types.FunctionDeployment, w http.ResponseWriter, r *http.Request) {
3940
pathVars := mux.Vars(r)
4041
if pathVars == nil {
4142
r = mux.SetURLVars(r, map[string]string{})
@@ -47,11 +48,11 @@ func proxyDeployment(proxy http.HandlerFunc, function *requests.CreateFunctionRe
4748
proxy.ServeHTTP(w, r)
4849
}
4950

50-
func addToFunctionToCache(r *http.Request, providerLookup routing.ProviderLookup) (*requests.CreateFunctionRequest, error) {
51+
func addToFunctionToCache(r *http.Request, providerLookup routing.ProviderLookup) (*types.FunctionDeployment, error) {
5152
defer r.Body.Close()
5253
body, _ := ioutil.ReadAll(r.Body)
5354

54-
request := &requests.CreateFunctionRequest{}
55+
request := &types.FunctionDeployment{}
5556
if err := json.Unmarshal(body, &request); err != nil {
5657
return nil, fmt.Errorf("error during unmarshal of create function request. %v", err)
5758
}

0 commit comments

Comments
 (0)