Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Merge pull request #12 from stefanprodan/rename
Browse files Browse the repository at this point in the history
Rename project to flagger-appmesh-gateway
  • Loading branch information
stefanprodan committed Nov 8, 2019
2 parents 76226b3 + d212361 commit 38351cd
Show file tree
Hide file tree
Showing 41 changed files with 78 additions and 675 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@ jobs:
uses: stefanprodan/kube-tools@v1
with:
command: make test
- name: Validate Helm chart
uses: stefanprodan/kube-tools@v1
with:
helm: 2.15.1
command: |
helm template chart/appmesh-gateway | kubeval --strict --ignore-missing-schemas
- name: Validate kustomization
uses: stefanprodan/kube-tools@v1
with:
command: |
echo "build gateway"
kustomize build ./kustomize/appmesh-gateway-nlb | kubeval --strict --ignore-missing-schemas
kustomize build ./kustomize/appmesh-gateway-nodeport | kubeval --strict --ignore-missing-schemas
kustomize build ./kustomize/nlb | kubeval --strict --ignore-missing-schemas
kustomize build ./kustomize/nodeport | kubeval --strict --ignore-missing-schemas
echo "build test"
kustomize build ./kustomize/test | kubeval --strict --ignore-missing-schemas
build:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
run: |
if [[ "${GITHUB_REF}" == "refs/tags"* ]]; then
DOCKER_TAG=$(echo ${GITHUB_REF} | rev | cut -d/ -f1 | rev)
docker build . -t ${{ secrets.DOCKER_USERNAME }}/appmesh-gateway:${DOCKER_TAG}
docker push ${{ secrets.DOCKER_USERNAME }}/appmesh-gateway:${DOCKER_TAG}
docker build . -t weaveworks/flagger-appmesh-gateway:${DOCKER_TAG}
docker push weaveworks/flagger-appmesh-gateway:${DOCKER_TAG}
fi
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM golang:1.13 as builder

RUN mkdir -p /appmesh-gateway/
RUN mkdir -p /flagger-appmesh-gateway/

WORKDIR /appmesh-gateway
WORKDIR /flagger-appmesh-gateway

COPY . .

RUN go mod download

RUN CGO_ENABLED=0 GOOS=linux go build -a -o bin/appmesh-gateway cmd/appmesh-gateway/*
RUN CGO_ENABLED=0 GOOS=linux go build -a -o bin/flagger-appmesh-gateway cmd/flagger-appmesh-gateway/*

FROM alpine:3.10

Expand All @@ -19,9 +19,9 @@ RUN addgroup -S app \

WORKDIR /home/app

COPY --from=builder /appmesh-gateway/bin/appmesh-gateway .
COPY --from=builder /flagger-appmesh-gateway/bin/flagger-appmesh-gateway .
RUN chown -R app:app ./

USER app

CMD ["./appmesh-gateway"]
CMD ["./flagger-appmesh-gateway"]
21 changes: 9 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
TAG?=latest
VERSION?=$(shell grep 'const VERSION' cmd/appmesh-gateway/main.go | awk '{ print $$4 }' | tr -d '"' | head -n1)
NAME:=appmesh-gateway
DOCKER_REPOSITORY:=stefanprodan
VERSION?=$(shell grep 'const VERSION' cmd/flagger-appmesh-gateway/main.go | awk '{ print $$4 }' | tr -d '"' | head -n1)
NAME:=flagger-appmesh-gateway
DOCKER_REPOSITORY:=weaveworks
DOCKER_IMAGE_NAME:=$(DOCKER_REPOSITORY)/$(NAME)

build:
go build -o bin/appmesh-gateway cmd/appmesh-gateway/*.go
go build -o bin/flagger-appmesh-gateway cmd/flagger-appmesh-gateway/*.go

test:
go test -v -race ./...
Expand All @@ -14,8 +14,8 @@ go-fmt:
gofmt -l pkg/* | grep ".*\.go"; if [ "$$?" = "0" ]; then exit 1; fi;

run:
go run cmd/appmesh-gateway/*.go --kubeconfig=$$HOME/.kube/config -v=4 \
--gateway-mesh=appmesh --gateway-name=gateway --gateway-namespace=appmesh-gateway
go run cmd/flagger-appmesh-gateway/*.go --kubeconfig=$$HOME/.kube/config -v=4 \
--gateway-mesh=appmesh --gateway-name=gateway --gateway-namespace=flagger-appmesh-gateway

envoy:
envoy -c envoy.yaml -l info
Expand All @@ -29,9 +29,6 @@ push-container: build-container
version-set:
@next="$(TAG)" && \
current="$(VERSION)" && \
sed -i '' "s/$$current/$$next/g" cmd/appmesh-gateway/main.go && \
sed -i '' "s/tag: v$$current/tag: v$$next/g" chart/appmesh-gateway/values.yaml && \
sed -i '' "s/version: $$current/version: $$next/g" chart/appmesh-gateway/Chart.yaml && \
sed -i '' "s/appVersion: $$current/appVersion: $$next/g" chart/appmesh-gateway/Chart.yaml && \
sed -i '' "s/appmesh-gateway:v$$current/appmesh-gateway:v$$next/g" kustomize/base/appmesh-gateway/deployment.yaml && \
echo "Version $$next set in code, chart and kustomization"
sed -i '' "s/$$current/$$next/g" cmd/flagger-appmesh-gateway/main.go && \
sed -i '' "s/flagger-appmesh-gateway:v$$current/flagger-appmesh-gateway:v$$next/g" kustomize/base/gateway/deployment.yaml && \
echo "Version $$next set in code and kustomization"
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# appmesh-gateway
[![build](https://github.com/stefanprodan/appmesh-gateway/workflows/build/badge.svg)](https://github.com/stefanprodan/appmesh-gateway/actions)
[![e2e](https://github.com/stefanprodan/appmesh-gateway/workflows/e2e/badge.svg)](https://github.com/stefanprodan/appmesh-gateway/actions)
[![report](https://goreportcard.com/badge/github.com/stefanprodan/appmesh-gateway)](https://goreportcard.com/report/github.com/stefanprodan/appmesh-gateway)
[![release](https://img.shields.io/github/release/stefanprodan/appmesh-gateway/all.svg)](https://github.com/stefanprodan/appmesh-gateway/releases)
# flagger-appmesh-gateway
[![build](https://github.com/stefanprodan/flagger-appmesh-gateway/workflows/build/badge.svg)](https://github.com/stefanprodan/flagger-appmesh-gateway/actions)
[![e2e](https://github.com/stefanprodan/flagger-appmesh-gateway/workflows/e2e/badge.svg)](https://github.com/stefanprodan/flagger-appmesh-gateway/actions)
[![report](https://goreportcard.com/badge/github.com/stefanprodan/flagger-appmesh-gateway)](https://goreportcard.com/report/github.com/stefanprodan/flagger-appmesh-gateway)
[![release](https://img.shields.io/github/release/stefanprodan/flagger-appmesh-gateway/all.svg)](https://github.com/stefanprodan/flagger-appmesh-gateway/releases)

App Mesh Gateway is an edge L7 load balancer that exposes applications outside the mesh.
Flagger Gateway for AWS App Mesh is an edge L7 load balancer that exposes applications outside the mesh.

**Note** that this is a specialised ingress solution for application running on EKS and App Mesh only.
If you are looking for an Envoy-powered API Gateway for Kubernetes check out [Gloo by Solo.io](https://www.solo.io/gloo).
Expand All @@ -24,7 +24,7 @@ The gateway is composed of:
* Envoy control plane (xDS gRPC server)
* Kubernetes controller (service discovery)

![appmesh-gateway](docs/appmesh-gateway-diagram.png)
![flagger-appmesh-gateway](docs/appmesh-gateway-diagram.png)

An application running on App Mesh can be exposed outside the mesh by annotating its virtual service with:

Expand Down Expand Up @@ -58,25 +58,25 @@ Requirements:
Install the API Gateway as NLB in `appmesh-gateway` namespace:

```sh
kubectl apply -k github.com/stefanprodan/appmesh-gateway//kustomize/appmesh-gateway-nlb
kubectl apply -k github.com/stefanprodan/flagger-appmesh-gateway//kustomize/nlb
```

To run the gateway behind an ALB you can install the NodePort version:

```sh
kubectl apply -k github.com/stefanprodan/appmesh-gateway//kustomize/appmesh-gateway-nodeport
kubectl apply -k github.com/stefanprodan/flagger-appmesh-gateway//kustomize/nodeport
```

Wait for the deployment rollout to finish:

```sh
kubectl -n appmesh-gateway rollout status deploy/appmesh-gateway
kubectl -n appmesh-gateway rollout status deploy/flagger-appmesh-gateway
```

When the gateway starts it will create a virtual node. You can verify the install with:

```text
watch kubectl -n appmesh-gateway describe virtualnode appmesh-gateway
watch kubectl -n appmesh-gateway describe virtualnode flagger-appmesh-gateway
Status:
Conditions:
Expand All @@ -89,13 +89,13 @@ Status:
Deploy podinfo in the `test` namespace:

```sh
kubectl -n test apply -k github.com/stefanprodan/appmesh-gateway//kustomize/test
kubectl -n test apply -k github.com/stefanprodan/flagger-appmesh-gateway//kustomize/test
```

Port forward to the gateway:

```sh
kubectl -n appmesh-gateway port-forward svc/appmesh-gateway 8080:80
kubectl -n appmesh-gateway port-forward svc/flagger-appmesh-gateway 8080:80
```

Access the podinfo API by setting the host header to `podinfo.test`:
Expand All @@ -113,7 +113,7 @@ curl -vH 'Host: podinfo.internal' localhost:8080
Access podinfo using the gateway NLB address:

```sh
URL="http://$(kubectl -n appmesh-gateway get svc/appmesh-gateway -ojson | \
URL="http://$(kubectl -n appmesh-gateway get svc/flagger-appmesh-gateway -ojson | \
jq -r ".status.loadBalancer.ingress[].hostname")"
curl -vH 'Host: podinfo.internal' $URL
Expand Down
21 changes: 0 additions & 21 deletions chart/appmesh-gateway/.helmignore

This file was deleted.

17 changes: 0 additions & 17 deletions chart/appmesh-gateway/Chart.yaml

This file was deleted.

72 changes: 0 additions & 72 deletions chart/appmesh-gateway/README.md

This file was deleted.

1 change: 0 additions & 1 deletion chart/appmesh-gateway/templates/NOTES.txt

This file was deleted.

56 changes: 0 additions & 56 deletions chart/appmesh-gateway/templates/_helpers.tpl

This file was deleted.

8 changes: 0 additions & 8 deletions chart/appmesh-gateway/templates/account.yaml

This file was deleted.

Loading

0 comments on commit 38351cd

Please sign in to comment.