Skip to content

Commit

Permalink
chore: unify web-gateway and backend (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubisoft-potato authored Aug 8, 2024
1 parent 88c627b commit 62e3b1b
Show file tree
Hide file tree
Showing 46 changed files with 698 additions and 1,318 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/push-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
run: make vendor
- name: Build web and go applications
run: |
make build-web
make build-web-console
make build-go -j ${{ env.GO_BUILD_CONCURRENCY }}
make clean-web
make clean-web-console
- name: Add executable permission to go binary files
run: chmod +x bin/*
- name: Set up docker
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,21 @@ $(GO_APP_BUILD_TARGETS): build-%:
go build -ldflags "-s -w -X $(LDFLAGS_VERSION)=$(VERSION) -X $(LDFLAGS_HASH)=$(HASH) -X $(LDFLAGS_BUILDDATE)=$(BUILDDATE)" \
-o bin/$* -mod=vendor cmd/$*/$*.go

.PHONY: clean-web
clean-web:
.PHONY: clean-web-console
clean-web-console:
rm -rf ui/web-v2/dist/*
touch ui/web-v2/dist/DONT-EDIT-FILES-IN-THIS-DIRECTORY

.PHONY: build-web
build-web:
.PHONY: build-web-console
build-web-console:
rm -rf ui/web-v2/dist/*
make -C ui/web-v2 install build

.PHONY: build-go
build-go: $(GO_APP_BUILD_TARGETS)

.PHONY: build-go-embed
build-go-embed: build-web $(GO_APP_BUILD_TARGETS) clean-web
build-go-embed: build-web-console $(GO_APP_BUILD_TARGETS) clean-web-console

# Make sure bucketeer-httpstan is already running. If not, run "make start-httpstan".
.PHONY: test-go
Expand Down
4 changes: 2 additions & 2 deletions cmd/backend/backend.go → cmd/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ package main
import (
"log"

"github.com/bucketeer-io/bucketeer/pkg/backend/cmd/server"
"github.com/bucketeer-io/bucketeer/pkg/cli"
"github.com/bucketeer-io/bucketeer/pkg/web/cmd/server"
)

var (
name = "bucketeer-backend"
name = "bucketeer-web"
version = ""
build = ""
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ data:
private_key:
filename: /usr/local/certs/service/tls.key
type: strict_dns
- name: backend
- name: web
connect_timeout: 5s
ignore_health_on_host_removal: true
circuit_breakers:
Expand All @@ -109,13 +109,13 @@ data:
max_pending_requests: 100000000
max_requests: 100000000
load_assignment:
cluster_name: backend
cluster_name: web
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: backend.{{ .Values.namespace }}.svc.cluster.local
address: web.{{ .Values.namespace }}.svc.cluster.local
port_value: 9000
dns_lookup_family: V4_ONLY
lb_policy: {{ .Values.envoy.lbPolicy }}
Expand Down Expand Up @@ -256,7 +256,7 @@ data:
exact: application/grpc
prefix: /bucketeer.feature.FeatureService
route:
cluster: backend
cluster: web
timeout: 15s
retry_policy:
retry_on: 5xx
Expand All @@ -268,7 +268,7 @@ data:
exact: application/grpc
prefix: /bucketeer.account.AccountService
route:
cluster: backend
cluster: web
timeout: 15s
retry_policy:
retry_on: 5xx
Expand Down
5 changes: 0 additions & 5 deletions manifests/bucketeer/charts/backend/Chart.yaml

This file was deleted.

13 changes: 0 additions & 13 deletions manifests/bucketeer/charts/backend/templates/oauth-configmap.yaml

This file was deleted.

This file was deleted.

29 changes: 0 additions & 29 deletions manifests/bucketeer/charts/backend/templates/service.yaml

This file was deleted.

141 changes: 0 additions & 141 deletions manifests/bucketeer/charts/backend/values.yaml

This file was deleted.

Loading

0 comments on commit 62e3b1b

Please sign in to comment.