From b4a1777c39e7b3e761dfdc8460b37ab8722e26e3 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 8 Nov 2019 11:19:35 +0200 Subject: [PATCH 1/2] Rename project to flagger-appmesh-gateway --- .github/workflows/build.yml | 10 +- .github/workflows/release.yml | 4 +- Dockerfile | 10 +- Makefile | 21 ++- README.md | 28 ++-- chart/appmesh-gateway/.helmignore | 21 --- chart/appmesh-gateway/Chart.yaml | 17 --- chart/appmesh-gateway/README.md | 72 --------- chart/appmesh-gateway/templates/NOTES.txt | 1 - chart/appmesh-gateway/templates/_helpers.tpl | 56 ------- chart/appmesh-gateway/templates/account.yaml | 8 - chart/appmesh-gateway/templates/config.yaml | 41 ----- .../appmesh-gateway/templates/deployment.yaml | 144 ------------------ chart/appmesh-gateway/templates/hpa.yaml | 28 ---- chart/appmesh-gateway/templates/mesh.yaml | 12 -- chart/appmesh-gateway/templates/psp.yaml | 57 ------- chart/appmesh-gateway/templates/rbac.yaml | 39 ----- chart/appmesh-gateway/templates/service.yaml | 24 --- chart/appmesh-gateway/values.yaml | 69 --------- .../main.go | 8 +- go.mod | 2 +- .../{appmesh-gateway => gateway}/account.yaml | 2 +- .../deployment.yaml | 22 +-- .../{appmesh-gateway => gateway}/envoy.yaml | 0 .../{appmesh-gateway => gateway}/hpa.yaml | 4 +- .../kustomization.yaml | 2 +- .../{appmesh-gateway => gateway}/rbac.yaml | 8 +- .../{appmesh-gateway => gateway}/service.yaml | 6 +- .../deployment.yaml | 4 +- .../kustomization.yaml | 2 +- .../namespace.yaml | 0 .../{appmesh-gateway-nlb => nlb}/service.yaml | 2 +- .../deployment.yaml | 4 +- .../kustomization.yaml | 2 +- .../namespace.yaml | 0 .../service.yaml | 2 +- pkg/discovery/controller.go | 2 +- pkg/discovery/virtualservice.go | 2 +- test/e2e-build.sh | 4 +- test/e2e-logs.sh | 5 +- test/gateway.bats | 6 +- 41 files changed, 77 insertions(+), 674 deletions(-) delete mode 100644 chart/appmesh-gateway/.helmignore delete mode 100644 chart/appmesh-gateway/Chart.yaml delete mode 100644 chart/appmesh-gateway/README.md delete mode 100644 chart/appmesh-gateway/templates/NOTES.txt delete mode 100644 chart/appmesh-gateway/templates/_helpers.tpl delete mode 100644 chart/appmesh-gateway/templates/account.yaml delete mode 100644 chart/appmesh-gateway/templates/config.yaml delete mode 100644 chart/appmesh-gateway/templates/deployment.yaml delete mode 100644 chart/appmesh-gateway/templates/hpa.yaml delete mode 100644 chart/appmesh-gateway/templates/mesh.yaml delete mode 100644 chart/appmesh-gateway/templates/psp.yaml delete mode 100644 chart/appmesh-gateway/templates/rbac.yaml delete mode 100644 chart/appmesh-gateway/templates/service.yaml delete mode 100644 chart/appmesh-gateway/values.yaml rename cmd/{appmesh-gateway => flagger-appmesh-gateway}/main.go (93%) rename kustomize/base/{appmesh-gateway => gateway}/account.yaml (58%) rename kustomize/base/{appmesh-gateway => gateway}/deployment.yaml (88%) rename kustomize/base/{appmesh-gateway => gateway}/envoy.yaml (100%) rename kustomize/base/{appmesh-gateway => gateway}/hpa.yaml (80%) rename kustomize/base/{appmesh-gateway => gateway}/kustomization.yaml (85%) rename kustomize/base/{appmesh-gateway => gateway}/rbac.yaml (81%) rename kustomize/base/{appmesh-gateway => gateway}/service.yaml (69%) rename kustomize/{appmesh-gateway-nodeport => nlb}/deployment.yaml (81%) rename kustomize/{appmesh-gateway-nlb => nlb}/kustomization.yaml (86%) rename kustomize/{appmesh-gateway-nlb => nlb}/namespace.yaml (100%) rename kustomize/{appmesh-gateway-nlb => nlb}/service.yaml (84%) rename kustomize/{appmesh-gateway-nlb => nodeport}/deployment.yaml (81%) rename kustomize/{appmesh-gateway-nodeport => nodeport}/kustomization.yaml (86%) rename kustomize/{appmesh-gateway-nodeport => nodeport}/namespace.yaml (100%) rename kustomize/{appmesh-gateway-nodeport => nodeport}/service.yaml (65%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80ca9e6..9cc9e05 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac86b62..1e27292 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 1355689..927b4b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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"] diff --git a/Makefile b/Makefile index 525e996..264980f 100644 --- a/Makefile +++ b/Makefile @@ -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 ./... @@ -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 @@ -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" diff --git a/README.md b/README.md index 5e71412..7481c2e 100644 --- a/README.md +++ b/README.md @@ -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 App Mesh Gateway 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). @@ -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: @@ -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: @@ -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`: @@ -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 diff --git a/chart/appmesh-gateway/.helmignore b/chart/appmesh-gateway/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/chart/appmesh-gateway/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/chart/appmesh-gateway/Chart.yaml b/chart/appmesh-gateway/Chart.yaml deleted file mode 100644 index 53fd3d1..0000000 --- a/chart/appmesh-gateway/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -name: appmesh-gateway -description: App Mesh Gateway Helm chart for Kubernetes -version: 0.5.0 -appVersion: 0.5.0 -home: https://github.com/stefanprodan/appmesh-gateway -icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png -sources: - - https://github.com/stefanprodan/appmesh-gateway -maintainers: - - name: Stefan Prodan - url: https://github.com/stefanprodan - email: stefanprodan@users.noreply.github.com -keywords: - - eks - - appmesh - - envoy diff --git a/chart/appmesh-gateway/README.md b/chart/appmesh-gateway/README.md deleted file mode 100644 index 1aa8562..0000000 --- a/chart/appmesh-gateway/README.md +++ /dev/null @@ -1,72 +0,0 @@ -# App Mesh Gateway - -[App Mesh Gateway](https://github.com/stefanprodan/appmesh-gateway) Helm chart for Kubernetes - -## Prerequisites - -* Kubernetes >= 1.13 -* App Mesh controller >= 0.2.0 -* App Mesh inject >= 0.2.0 - -## Installing the Chart - -Install App Mesh Gateway: - -```sh -helm upgrade -i appmesh-gateway chart/appmesh-gateway \ ---namespace appmesh-gateway \ ---set mesh.name=global -``` - -Optionally you can create a mesh at install time: - -```sh -helm upgrade -i appmesh-gateway chart/appmesh-gateway \ ---namespace appmesh-system \ ---set mesh.name=global \ ---set mesh.create=true -``` - -The [configuration](#configuration) section lists the parameters that can be configured during installation. - -## Uninstalling the Chart - -To uninstall/delete the `appmesh-gateway` deployment: - -```console -helm delete --purge appmesh-gateway -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Configuration - -The following tables lists the configurable parameters of the chart and their default values. - -Parameter | Description | Default ---- | --- | --- -`service.type` | When set to LoadBalancer it creates an AWS NLB | `LoadBalancer` -`proxy.access_log_path` | to enable the access logs, set it to `/dev/stdout` | `/dev/null` -`proxy.image.repository` | image repository | `envoyproxy/envoy` -`proxy.image.tag` | image tag | `` -`proxy.image.pullPolicy` | image pull policy | `IfNotPresent` -`controller.image.repository` | image repository | `stefanprodan/appmesh-gateway` -`controller.image.tag` | image tag | `` -`controller.image.pullPolicy` | image pull policy | `IfNotPresent` -`resources.requests/cpu` | pod CPU request | `100m` -`resources.requests/memory` | pod memory request | `128Mi` -`resources.limits/memory` | pod memory limit | `2Gi` -`nodeSelector` | node labels for pod assignment | `{}` -`tolerations` | list of node taints to tolerate | `[]` -`rbac.create` | if `true`, create and use RBAC resources | `true` -`rbac.pspEnabled` | If `true`, create and use a restricted pod security policy | `false` -`serviceAccount.create` | If `true`, create a new service account | `true` -`serviceAccount.name` | Service account to be used | None -`mesh.create` | If `true`, create mesh custom resource | `false` -`mesh.name` | The name of the mesh to use | `global` -`mesh.discovery` | The service discovery type to use, can be dns or cloudmap | `dns` -`hpa.enabled` | `true` if HPA resource should be created, metrics-server is required | `true` -`hpa.maxReplicas` | number of max replicas | `3` -`hpa.cpu` | average total CPU usage per pod (1-100) | `99` -`hpa.memory` | average memory usage per pod (100Mi-1Gi) | None -`discovery.optIn` | `true` if only services with the 'expose' annotation are discoverable | `true` diff --git a/chart/appmesh-gateway/templates/NOTES.txt b/chart/appmesh-gateway/templates/NOTES.txt deleted file mode 100644 index 8ebd989..0000000 --- a/chart/appmesh-gateway/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -App Mesh Gateway installed! \ No newline at end of file diff --git a/chart/appmesh-gateway/templates/_helpers.tpl b/chart/appmesh-gateway/templates/_helpers.tpl deleted file mode 100644 index 05f8090..0000000 --- a/chart/appmesh-gateway/templates/_helpers.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "appmesh-gateway.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "appmesh-gateway.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "appmesh-gateway.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "appmesh-gateway.labels" -}} -app.kubernetes.io/name: {{ include "appmesh-gateway.name" . }} -helm.sh/chart: {{ include "appmesh-gateway.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "appmesh-gateway.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "appmesh-gateway.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/chart/appmesh-gateway/templates/account.yaml b/chart/appmesh-gateway/templates/account.yaml deleted file mode 100644 index 3c0e360..0000000 --- a/chart/appmesh-gateway/templates/account.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if .Values.serviceAccount.create }} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "appmesh-gateway.serviceAccountName" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -{{- end }} diff --git a/chart/appmesh-gateway/templates/config.yaml b/chart/appmesh-gateway/templates/config.yaml deleted file mode 100644 index f41bb20..0000000 --- a/chart/appmesh-gateway/templates/config.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -data: - envoy.yaml: |- - admin: - access_log_path: {{ .Values.proxy.access_log_path }} - address: - socket_address: - address: 0.0.0.0 - port_value: 8081 - - dynamic_resources: - ads_config: - api_type: GRPC - grpc_services: - - envoy_grpc: - cluster_name: xds - cds_config: - ads: {} - lds_config: - ads: {} - - static_resources: - clusters: - - name: xds - connect_timeout: 0.50s - type: static - http2_protocol_options: {} - load_assignment: - cluster_name: xds - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: 127.0.0.1 - port_value: 18000 diff --git a/chart/appmesh-gateway/templates/deployment.yaml b/chart/appmesh-gateway/templates/deployment.yaml deleted file mode 100644 index fca9b9d..0000000 --- a/chart/appmesh-gateway/templates/deployment.yaml +++ /dev/null @@ -1,144 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -spec: - replicas: {{ .Values.replicaCount }} - strategy: - type: Recreate - selector: - matchLabels: - app.kubernetes.io/name: {{ include "appmesh-gateway.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - template: - metadata: - labels: - app.kubernetes.io/name: {{ include "appmesh-gateway.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - app.kubernetes.io/part-of: appmesh - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: "/stats/prometheus" - prometheus.io/port: "8081" - # exclude inbound traffic on port 8080 - appmesh.k8s.aws/ports: "444" - # exclude egress traffic to xDS server and Kubernetes API - appmesh.k8s.aws/egressIgnoredPorts: "18000,22,443" - checksum/config: {{ include (print $.Template.BasePath "/config.yaml") . | sha256sum | quote }} - spec: - serviceAccountName: {{ include "appmesh-gateway.serviceAccountName" . }} - terminationGracePeriodSeconds: 45 - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - podAffinityTerm: - labelSelector: - matchLabels: - app.kubernetes.io/name: {{ include "appmesh-gateway.name" . }} - topologyKey: kubernetes.io/hostname - weight: 100 - volumes: - - name: appmesh-gateway-config - configMap: - name: {{ template "appmesh-gateway.fullname" . }} - containers: - - name: controller - image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag }}" - imagePullPolicy: {{ .Values.controller.image.pullPolicy }} - securityContext: - readOnlyRootFilesystem: true - runAsUser: 10001 - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - command: - - ./appmesh-gateway - - --opt-in={{ .Values.discovery.optIn }} - - --gateway-mesh={{ .Values.mesh.name }} - - --gateway-name=$(POD_SERVICE_ACCOUNT) - - --gateway-namespace=$(POD_NAMESPACE) - env: - - name: POD_SERVICE_ACCOUNT - valueFrom: - fieldRef: - fieldPath: spec.serviceAccountName - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - ports: - - name: grpc - containerPort: 18000 - protocol: TCP - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: grpc - readinessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: grpc - resources: - limits: - memory: 1Gi - requests: - cpu: 10m - memory: 32Mi - - name: proxy - image: "{{ .Values.proxy.image.repository }}:{{ .Values.proxy.image.tag }}" - imagePullPolicy: {{ .Values.proxy.image.pullPolicy }} - securityContext: - capabilities: - drop: - - ALL - add: - - NET_BIND_SERVICE - args: - - -c - - /config/envoy.yaml - - --service-cluster $(POD_NAMESPACE) - - --service-node $(POD_NAME) - - --log-level info - - --base-id 1234 - ports: - - name: admin - containerPort: 8081 - protocol: TCP - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - initialDelaySeconds: 5 - tcpSocket: - port: admin - readinessProbe: - initialDelaySeconds: 5 - httpGet: - path: /ready - port: admin - env: - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: POD_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - name: appmesh-gateway-config - mountPath: /config - resources: -{{ toYaml .Values.resources | indent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: -{{ toYaml . | indent 8 }} - {{- end }} diff --git a/chart/appmesh-gateway/templates/hpa.yaml b/chart/appmesh-gateway/templates/hpa.yaml deleted file mode 100644 index c24a452..0000000 --- a/chart/appmesh-gateway/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.hpa.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ template "appmesh-gateway.fullname" . }} - minReplicas: {{ .Values.replicaCount }} - maxReplicas: {{ .Values.hpa.maxReplicas }} - metrics: - {{- if .Values.hpa.cpu }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.hpa.cpu }} - {{- end }} - {{- if .Values.hpa.memory }} - - type: Resource - resource: - name: memory - targetAverageValue: {{ .Values.hpa.memory }} - {{- end }} -{{- end }} diff --git a/chart/appmesh-gateway/templates/mesh.yaml b/chart/appmesh-gateway/templates/mesh.yaml deleted file mode 100644 index 8542dd3..0000000 --- a/chart/appmesh-gateway/templates/mesh.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.mesh.create }} -apiVersion: appmesh.k8s.aws/v1beta1 -kind: Mesh -metadata: - name: {{ .Values.mesh.name }} - annotations: - helm.sh/resource-policy: keep - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -spec: - serviceDiscoveryType: {{ .Values.mesh.discovery }} -{{- end }} diff --git a/chart/appmesh-gateway/templates/psp.yaml b/chart/appmesh-gateway/templates/psp.yaml deleted file mode 100644 index 2044497..0000000 --- a/chart/appmesh-gateway/templates/psp.yaml +++ /dev/null @@ -1,57 +0,0 @@ -{{- if .Values.rbac.pspEnabled }} -apiVersion: policy/v1beta1 -kind: PodSecurityPolicy -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} - annotations: - seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' -spec: - privileged: false - hostIPC: false - hostNetwork: false - hostPID: false - readOnlyRootFilesystem: false - allowPrivilegeEscalation: false - allowedCapabilities: - - '*' - fsGroup: - rule: RunAsAny - runAsUser: - rule: RunAsAny - seLinux: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - volumes: - - '*' ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: {{ template "appmesh-gateway.fullname" . }}-psp - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -rules: - - apiGroups: ['policy'] - resources: ['podsecuritypolicies'] - verbs: ['use'] - resourceNames: - - {{ template "appmesh-gateway.fullname" . }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ template "appmesh-gateway.fullname" . }}-psp - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "appmesh-gateway.fullname" . }}-psp -subjects: - - kind: ServiceAccount - name: {{ template "appmesh-gateway.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/chart/appmesh-gateway/templates/rbac.yaml b/chart/appmesh-gateway/templates/rbac.yaml deleted file mode 100644 index 51e7fa7..0000000 --- a/chart/appmesh-gateway/templates/rbac.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{{- if .Values.rbac.create }} -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -rules: - - apiGroups: - - "" - resources: - - services - verbs: ["*"] - - apiGroups: - - appmesh.k8s.aws - resources: - - meshes - - meshes/status - - virtualnodes - - virtualnodes/status - - virtualservices - - virtualservices/status - verbs: ["*"] ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "appmesh-gateway.fullname" . }} -subjects: -- name: {{ template "appmesh-gateway.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - kind: ServiceAccount -{{- end }} diff --git a/chart/appmesh-gateway/templates/service.yaml b/chart/appmesh-gateway/templates/service.yaml deleted file mode 100644 index e11c2dd..0000000 --- a/chart/appmesh-gateway/templates/service.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ template "appmesh-gateway.fullname" . }} - annotations: - gateway.appmesh.k8s.aws/expose: "false" - {{- if eq .Values.service.type "LoadBalancer" }} - service.beta.kubernetes.io/aws-load-balancer-type: "nlb" - {{- end }} - labels: -{{ include "appmesh-gateway.labels" . | indent 4 }} -spec: - type: {{ .Values.service.type }} - {{- if eq .Values.service.type "LoadBalancer" }} - externalTrafficPolicy: Local - {{- end }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - app.kubernetes.io/name: {{ include "appmesh-gateway.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/chart/appmesh-gateway/values.yaml b/chart/appmesh-gateway/values.yaml deleted file mode 100644 index 8e575ad..0000000 --- a/chart/appmesh-gateway/values.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Default values for appmesh-gateway. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 -discovery: - # discovery.optIn `true` if only services with the 'expose' annotation are discoverable - optIn: true - -proxy: - access_log_path: /dev/null - image: - repository: docker.io/envoyproxy/envoy - tag: v1.12.0 - pullPolicy: IfNotPresent - -controller: - image: - repository: docker.io/stefanprodan/appmesh-gateway - tag: v0.5.0 - pullPolicy: IfNotPresent - -nameOverride: "" -fullnameOverride: "" - -service: - # service.type: When set to LoadBalancer it creates an AWS NLB - type: LoadBalancer - port: 80 - -hpa: - # hpa.enabled `true` if HPA resource should be created, metrics-server is required - enabled: true - maxReplicas: 3 - # hpa.cpu average total CPU usage per pod (1-100) - cpu: 99 - # hpa.memory average memory usage per pod (100Mi-1Gi) - memory: - -resources: - limits: - memory: 2Gi - requests: - cpu: 100m - memory: 128Mi - -nodeSelector: {} - -tolerations: [] - -serviceAccount: - # serviceAccount.create: Whether to create a service account or not - create: true - # serviceAccount.name: The name of the service account to create or use - name: "" - -rbac: - # rbac.create: `true` if rbac resources should be created - create: true - # rbac.pspEnabled: `true` if PodSecurityPolicy resources should be created - pspEnabled: false - -mesh: - # mesh.create: `true` if mesh resource should be created - create: false - # mesh.name: The name of the mesh to use - name: "global" - # mesh.discovery: The service discovery type to use, can be dns or cloudmap - discovery: dns diff --git a/cmd/appmesh-gateway/main.go b/cmd/flagger-appmesh-gateway/main.go similarity index 93% rename from cmd/appmesh-gateway/main.go rename to cmd/flagger-appmesh-gateway/main.go index 6685a6f..d0fb447 100644 --- a/cmd/appmesh-gateway/main.go +++ b/cmd/flagger-appmesh-gateway/main.go @@ -14,10 +14,10 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/klog" - "github.com/stefanprodan/appmesh-gateway/pkg/discovery" - "github.com/stefanprodan/appmesh-gateway/pkg/envoy" - "github.com/stefanprodan/appmesh-gateway/pkg/server" - "github.com/stefanprodan/appmesh-gateway/pkg/signals" + "github.com/stefanprodan/flagger-appmesh-gateway/pkg/discovery" + "github.com/stefanprodan/flagger-appmesh-gateway/pkg/envoy" + "github.com/stefanprodan/flagger-appmesh-gateway/pkg/server" + "github.com/stefanprodan/flagger-appmesh-gateway/pkg/signals" ) // VERSION semantic versioning format diff --git a/go.mod b/go.mod index 3f9764b..b7d3dc6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/stefanprodan/appmesh-gateway +module github.com/stefanprodan/flagger-appmesh-gateway go 1.13 diff --git a/kustomize/base/appmesh-gateway/account.yaml b/kustomize/base/gateway/account.yaml similarity index 58% rename from kustomize/base/appmesh-gateway/account.yaml rename to kustomize/base/gateway/account.yaml index a4e61a5..2db6b30 100644 --- a/kustomize/base/appmesh-gateway/account.yaml +++ b/kustomize/base/gateway/account.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway diff --git a/kustomize/base/appmesh-gateway/deployment.yaml b/kustomize/base/gateway/deployment.yaml similarity index 88% rename from kustomize/base/appmesh-gateway/deployment.yaml rename to kustomize/base/gateway/deployment.yaml index 65256fd..92d19be 100644 --- a/kustomize/base/appmesh-gateway/deployment.yaml +++ b/kustomize/base/gateway/deployment.yaml @@ -1,13 +1,13 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway labels: - app: appmesh-gateway + app: flagger-appmesh-gateway spec: selector: matchLabels: - app: appmesh-gateway + app: flagger-appmesh-gateway strategy: type: RollingUpdate rollingUpdate: @@ -15,7 +15,7 @@ spec: template: metadata: labels: - app: appmesh-gateway + app: flagger-appmesh-gateway annotations: prometheus.io/scrape: "true" prometheus.io/path: "/stats/prometheus" @@ -25,7 +25,7 @@ spec: # exclude egress traffic to xDS server and Kubernetes API appmesh.k8s.aws/egressIgnoredPorts: "18000,22,443" spec: - serviceAccountName: appmesh-gateway + serviceAccountName: flagger-appmesh-gateway terminationGracePeriodSeconds: 45 affinity: podAntiAffinity: @@ -33,7 +33,7 @@ spec: - podAffinityTerm: labelSelector: matchLabels: - app: appmesh-gateway + app: flagger-appmesh-gateway topologyKey: kubernetes.io/hostname weight: 100 containers: @@ -85,10 +85,10 @@ spec: cpu: 100m memory: 128Mi volumeMounts: - - name: appmesh-gateway-config + - name: flagger-appmesh-gateway mountPath: /config - name: controller - image: docker.io/stefanprodan/appmesh-gateway:v0.5.0 + image: docker.io/weaveworks/flagger-appmesh-gateway:v1.0.0 imagePullPolicy: IfNotPresent securityContext: readOnlyRootFilesystem: true @@ -99,7 +99,7 @@ spec: add: - NET_BIND_SERVICE command: - - ./appmesh-gateway + - ./flagger-appmesh-gateway - --gateway-mesh=appmesh - --gateway-name=$(POD_SERVICE_ACCOUNT) - --gateway-namespace=$(POD_NAMESPACE) @@ -131,6 +131,6 @@ spec: cpu: 10m memory: 32Mi volumes: - - name: appmesh-gateway-config + - name: flagger-appmesh-gateway configMap: - name: appmesh-gateway + name: flagger-appmesh-gateway diff --git a/kustomize/base/appmesh-gateway/envoy.yaml b/kustomize/base/gateway/envoy.yaml similarity index 100% rename from kustomize/base/appmesh-gateway/envoy.yaml rename to kustomize/base/gateway/envoy.yaml diff --git a/kustomize/base/appmesh-gateway/hpa.yaml b/kustomize/base/gateway/hpa.yaml similarity index 80% rename from kustomize/base/appmesh-gateway/hpa.yaml rename to kustomize/base/gateway/hpa.yaml index 91873e0..e07177c 100644 --- a/kustomize/base/appmesh-gateway/hpa.yaml +++ b/kustomize/base/gateway/hpa.yaml @@ -1,12 +1,12 @@ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment - name: appmesh-gateway + name: flagger-appmesh-gateway minReplicas: 1 maxReplicas: 3 metrics: diff --git a/kustomize/base/appmesh-gateway/kustomization.yaml b/kustomize/base/gateway/kustomization.yaml similarity index 85% rename from kustomize/base/appmesh-gateway/kustomization.yaml rename to kustomize/base/gateway/kustomization.yaml index 830728c..a6ed03b 100644 --- a/kustomize/base/appmesh-gateway/kustomization.yaml +++ b/kustomize/base/gateway/kustomization.yaml @@ -7,6 +7,6 @@ resources: - hpa.yaml - rbac.yaml configMapGenerator: - - name: appmesh-gateway + - name: flagger-appmesh-gateway files: - envoy.yaml diff --git a/kustomize/base/appmesh-gateway/rbac.yaml b/kustomize/base/gateway/rbac.yaml similarity index 81% rename from kustomize/base/appmesh-gateway/rbac.yaml rename to kustomize/base/gateway/rbac.yaml index 898517e..4155463 100644 --- a/kustomize/base/appmesh-gateway/rbac.yaml +++ b/kustomize/base/gateway/rbac.yaml @@ -1,7 +1,7 @@ apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway rules: - apiGroups: - "" @@ -22,12 +22,12 @@ rules: apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: appmesh-gateway + name: flagger-appmesh-gateway subjects: - kind: ServiceAccount - name: appmesh-gateway + name: flagger-appmesh-gateway namespace: appmesh-gateway diff --git a/kustomize/base/appmesh-gateway/service.yaml b/kustomize/base/gateway/service.yaml similarity index 69% rename from kustomize/base/appmesh-gateway/service.yaml rename to kustomize/base/gateway/service.yaml index 9f10c73..c01ec3f 100644 --- a/kustomize/base/appmesh-gateway/service.yaml +++ b/kustomize/base/gateway/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway labels: - app: appmesh-gateway + app: flagger-appmesh-gateway annotations: gateway.appmesh.k8s.aws/expose: "false" spec: @@ -14,4 +14,4 @@ spec: protocol: TCP targetPort: http selector: - app: appmesh-gateway + app: flagger-appmesh-gateway diff --git a/kustomize/appmesh-gateway-nodeport/deployment.yaml b/kustomize/nlb/deployment.yaml similarity index 81% rename from kustomize/appmesh-gateway-nodeport/deployment.yaml rename to kustomize/nlb/deployment.yaml index 81e5930..232803b 100644 --- a/kustomize/appmesh-gateway-nodeport/deployment.yaml +++ b/kustomize/nlb/deployment.yaml @@ -1,14 +1,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway spec: template: spec: containers: - name: controller command: - - ./appmesh-gateway + - ./flagger-appmesh-gateway - --opt-in=true - --gateway-mesh=appmesh - --gateway-name=$(POD_SERVICE_ACCOUNT) diff --git a/kustomize/appmesh-gateway-nlb/kustomization.yaml b/kustomize/nlb/kustomization.yaml similarity index 86% rename from kustomize/appmesh-gateway-nlb/kustomization.yaml rename to kustomize/nlb/kustomization.yaml index 4b9bbcf..183291c 100644 --- a/kustomize/appmesh-gateway-nlb/kustomization.yaml +++ b/kustomize/nlb/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: appmesh-gateway bases: - - ../base/appmesh-gateway + - ../base/gateway resources: - namespace.yaml patchesStrategicMerge: diff --git a/kustomize/appmesh-gateway-nlb/namespace.yaml b/kustomize/nlb/namespace.yaml similarity index 100% rename from kustomize/appmesh-gateway-nlb/namespace.yaml rename to kustomize/nlb/namespace.yaml diff --git a/kustomize/appmesh-gateway-nlb/service.yaml b/kustomize/nlb/service.yaml similarity index 84% rename from kustomize/appmesh-gateway-nlb/service.yaml rename to kustomize/nlb/service.yaml index e6493d1..0a51055 100644 --- a/kustomize/appmesh-gateway-nlb/service.yaml +++ b/kustomize/nlb/service.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" spec: diff --git a/kustomize/appmesh-gateway-nlb/deployment.yaml b/kustomize/nodeport/deployment.yaml similarity index 81% rename from kustomize/appmesh-gateway-nlb/deployment.yaml rename to kustomize/nodeport/deployment.yaml index 81e5930..232803b 100644 --- a/kustomize/appmesh-gateway-nlb/deployment.yaml +++ b/kustomize/nodeport/deployment.yaml @@ -1,14 +1,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway spec: template: spec: containers: - name: controller command: - - ./appmesh-gateway + - ./flagger-appmesh-gateway - --opt-in=true - --gateway-mesh=appmesh - --gateway-name=$(POD_SERVICE_ACCOUNT) diff --git a/kustomize/appmesh-gateway-nodeport/kustomization.yaml b/kustomize/nodeport/kustomization.yaml similarity index 86% rename from kustomize/appmesh-gateway-nodeport/kustomization.yaml rename to kustomize/nodeport/kustomization.yaml index 4b9bbcf..183291c 100644 --- a/kustomize/appmesh-gateway-nodeport/kustomization.yaml +++ b/kustomize/nodeport/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: appmesh-gateway bases: - - ../base/appmesh-gateway + - ../base/gateway resources: - namespace.yaml patchesStrategicMerge: diff --git a/kustomize/appmesh-gateway-nodeport/namespace.yaml b/kustomize/nodeport/namespace.yaml similarity index 100% rename from kustomize/appmesh-gateway-nodeport/namespace.yaml rename to kustomize/nodeport/namespace.yaml diff --git a/kustomize/appmesh-gateway-nodeport/service.yaml b/kustomize/nodeport/service.yaml similarity index 65% rename from kustomize/appmesh-gateway-nodeport/service.yaml rename to kustomize/nodeport/service.yaml index 1562c01..b34aaea 100644 --- a/kustomize/appmesh-gateway-nodeport/service.yaml +++ b/kustomize/nodeport/service.yaml @@ -1,6 +1,6 @@ apiVersion: v1 kind: Service metadata: - name: appmesh-gateway + name: flagger-appmesh-gateway spec: type: NodePort diff --git a/pkg/discovery/controller.go b/pkg/discovery/controller.go index fe7d53b..4a41051 100644 --- a/pkg/discovery/controller.go +++ b/pkg/discovery/controller.go @@ -14,7 +14,7 @@ import ( "k8s.io/client-go/util/workqueue" "k8s.io/klog" - "github.com/stefanprodan/appmesh-gateway/pkg/envoy" + "github.com/stefanprodan/flagger-appmesh-gateway/pkg/envoy" ) // Controller watches Kubernetes for App Mesh virtual services and diff --git a/pkg/discovery/virtualservice.go b/pkg/discovery/virtualservice.go index 4465e85..a8f941d 100644 --- a/pkg/discovery/virtualservice.go +++ b/pkg/discovery/virtualservice.go @@ -11,7 +11,7 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/client-go/dynamic" - "github.com/stefanprodan/appmesh-gateway/pkg/envoy" + "github.com/stefanprodan/flagger-appmesh-gateway/pkg/envoy" ) // VirtualServiceManager transforms virtual service to upstreams diff --git a/test/e2e-build.sh b/test/e2e-build.sh index 822e180..3f4be16 100755 --- a/test/e2e-build.sh +++ b/test/e2e-build.sh @@ -5,8 +5,8 @@ set -o errexit function main() { - docker build -t test/appmesh-gateway:latest . - kind load docker-image test/appmesh-gateway:latest + docker build -t test/flagger-appmesh-gateway:latest . + kind load docker-image test/flagger-appmesh-gateway:latest } main diff --git a/test/e2e-logs.sh b/test/e2e-logs.sh index 39e244b..c306cb0 100755 --- a/test/e2e-logs.sh +++ b/test/e2e-logs.sh @@ -8,7 +8,7 @@ export REPO_ROOT=$(git rev-parse --show-toplevel) export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" -name=appmesh-gateway +name=flagger-appmesh-gateway namespace=appmesh-gateway function status() { @@ -17,7 +17,8 @@ function status() { } function logs() { - kubectl -n $namespace logs deployment/$name || true + kubectl -n $namespace logs deployment/$name -c proxy || true + kubectl -n $namespace logs deployment/$name -c controller || true } status diff --git a/test/gateway.bats b/test/gateway.bats index f3e7ebf..54b425c 100755 --- a/test/gateway.bats +++ b/test/gateway.bats @@ -10,7 +10,7 @@ export KUBECONFIG="$(kind get kubeconfig-path --name="kind")" load ${REPO_ROOT}/test/e2e-lib.sh mesh=appmesh -name=appmesh-gateway +name=flagger-appmesh-gateway namespace=appmesh-gateway function setup() { @@ -21,8 +21,8 @@ function setup() { @test "App Mesh Gateway" { # run kustomization for the locally built image - kubectl apply -k ${REPO_ROOT}/kustomize/appmesh-gateway-nodeport - kubectl -n $namespace set image deployment/$name controller=test/appmesh-gateway:latest + kubectl apply -k ${REPO_ROOT}/kustomize/nodeport + kubectl -n $namespace set image deployment/$name controller=test/flagger-appmesh-gateway:latest # run install tests waitForService $name $namespace From d212361ec0233c0c7708282d12d5ac45d418f4af Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Fri, 8 Nov 2019 11:52:21 +0200 Subject: [PATCH 2/2] Release v1.0.0 --- README.md | 2 +- cmd/flagger-appmesh-gateway/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7481c2e..950db48 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![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) -Flagger 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). diff --git a/cmd/flagger-appmesh-gateway/main.go b/cmd/flagger-appmesh-gateway/main.go index d0fb447..18981f5 100644 --- a/cmd/flagger-appmesh-gateway/main.go +++ b/cmd/flagger-appmesh-gateway/main.go @@ -21,7 +21,7 @@ import ( ) // VERSION semantic versioning format -const VERSION = "0.5.0" +const VERSION = "1.0.0" var ( masterURL string