Skip to content

Commit 47b09b5

Browse files
author
cgchinmay
committed
Updated eks-distro-minimal-base image (#527)
Xray SamplingRate changes Add service instance port to Cloud Map Service Discovery (#490) Volume injection support (#488) Introduce config variables for samplingRate & statsSocketPath (#512) Use xray daemon from ecr public repo instead of dockerhub Updated proxy-route-manager to v4-prod Updated Dockerfile to support multi-arch Updated Makefile to use docker buildx Updated go version Updated spire agent and server to 0.12.0 to be compatible with envoy v1.19.x Dockerfile changes to support ARM Bump Envoy image version to v1.20.0.1-prod (#538) Co-authored-by: Shailesh Gupta <[email protected]> Update Chart and App version for new patch release
1 parent 50a7999 commit 47b09b5

File tree

26 files changed

+385
-114
lines changed

26 files changed

+385
-114
lines changed

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
# syntax=docker/dockerfile:experimental
2+
13
# Build the controller binary
2-
FROM golang:1.14 as builder
4+
FROM --platform=${TARGETPLATFORM} golang:1.16 as builder
35

46
WORKDIR /workspace
57

@@ -8,16 +10,19 @@ COPY . ./
810
# and so that source changes don't invalidate our downloaded layer
911
RUN go mod download
1012

13+
ARG TARGETOS
14+
ARG TARGETARCH
15+
1116
# Build
1217
ENV VERSION_PKG=github.com/aws/aws-app-mesh-controller-for-k8s/pkg/version
1318
RUN GIT_VERSION=$(git describe --tags --dirty --always) && \
1419
GIT_COMMIT=$(git rev-parse HEAD) && \
1520
BUILD_DATE=$(date +%Y-%m-%dT%H:%M:%S%z) && \
16-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build \
21+
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GO111MODULE=on go build \
1722
-ldflags="-X ${VERSION_PKG}.GitVersion=${GIT_VERSION} -X ${VERSION_PKG}.GitCommit=${GIT_COMMIT} -X ${VERSION_PKG}.BuildDate=${BUILD_DATE}" -a -o controller main.go
1823

1924
# Build the container image
20-
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base:2021-08-22-1629654770
25+
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base:2021-10-19-1634675452
2126

2227
WORKDIR /
2328
COPY --from=builder /workspace/controller .

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ generate: controller-gen
7777
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
7878

7979
# Build the docker image
80+
# Requires buildx to be installed: https://docs.docker.com/buildx/working-with-buildx/
81+
# By default the TARGETPLATFORM is set to linux/amd64, change the value if you are building for linux/arm64
8082
docker-build: check-env test
81-
docker build . -t $(IMAGE)
83+
docker buildx build --platform linux/amd64 -t $(IMAGE) . --load
8284

8385
docker-push: check-env
8486
docker push $(IMAGE)
@@ -132,7 +134,7 @@ endif
132134
check-env:
133135
@:$(call check_var, AWS_ACCOUNT, AWS account ID for publishing docker images)
134136
@:$(call check_var, AWS_REGION, AWS region for publishing docker images)
135-
137+
136138
check_var = \
137139
$(strip $(foreach 1,$1, \
138140
$(call __check_var,$1,$(strip $(value 2)))))

config/helm/appmesh-controller/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v1
22
name: appmesh-controller
33
description: App Mesh controller Helm chart for Kubernetes
4-
version: 1.4.1
5-
appVersion: 1.4.1
4+
version: 1.4.4
5+
appVersion: 1.4.2
66
home: https://github.com/aws/eks-charts
77
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png
88
sources:

config/helm/appmesh-controller/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Make sure that the Envoy proxies have the following IAM policies attached for th
9494

9595
There are **2 ways** you can attach the above policy to the Envoy Pod
9696
#### With IRSA
97-
Download the Envoy IAM polocy
97+
Download the Envoy IAM policy
9898
```
9999
curl -o envoy-iam-policy.json https://raw.githubusercontent.com/aws/aws-app-mesh-controller-for-k8s/master/config/iam/envoy-iam-policy.json
100100
```
@@ -379,16 +379,18 @@ Parameter | Description | Default
379379
`init.image.tag` | Route manager image tag | `<VERSION>`
380380
`stats.tagsEnabled` | If `true`, Envoy should include app-mesh tags | `false`
381381
`stats.statsdEnabled` | If `true`, Envoy should publish stats to statsd endpoint @ 127.0.0.1:8125 | `false`
382-
`stats.statsdAddress` | DogStatsD daemon IP address | `127.0.0.1`
383-
`stats.statsdPort` | DogStatsD daemon port | `8125`
382+
`stats.statsdAddress` | DogStatsD daemon IP address. This will be overridden if `stats.statsdSocketPath` is specified | `127.0.0.1`
383+
`stats.statsdPort` | DogStatsD daemon port. This will be overridden if `stats.statsdSocketPath` is specified | `8125`
384+
`stats.statsdSocketPath` | DogStatsD Unix domain socket path. If statsd is enabled but this value is not specified then we will use combination of <statsAddress:statsPort> as the default | None
384385
`cloudMapCustomHealthCheck.enabled` | If `true`, CustomHealthCheck will be enabled for CloudMap Services | `false`
385386
`cloudMapDNS.ttl` | Sets CloudMap DNS TTL | `300`
386387
`tracing.enabled` | If `true`, Envoy will be configured with tracing | `false`
387388
`tracing.provider` | The tracing provider can be x-ray, jaeger or datadog | `x-ray`
388389
`tracing.address` | Jaeger or Datadog agent server address (ignored for X-Ray) | `appmesh-jaeger.appmesh-system`
389390
`tracing.port` | Jaeger or Datadog agent port (ignored for X-Ray) | `9411`
391+
`tracing.samplingRate` | X-Ray tracer sampling rate. Value can be a decimal number between 0 and 1.00 (100%) | `0.05`
390392
`enableCertManager` | Enable Cert-Manager | `false`
391-
`xray.image.repository` | X-Ray image repository | `amazon/aws-xray-daemon`
393+
`xray.image.repository` | X-Ray image repository | `public.ecr.aws/xray/aws-xray-daemon`
392394
`xray.image.tag` | X-Ray image tag | `latest`
393395
`accountId` | AWS Account ID for the Kubernetes cluster | None
394396
`env` | environment variables to be injected into the appmesh-controller pod | `{}`

config/helm/appmesh-controller/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,13 @@ spec:
8181
- --enable-statsd=true
8282
- --statsd-address={{ .Values.stats.statsdAddress }}
8383
- --statsd-port={{ .Values.stats.statsdPort }}
84+
- --statsd-socket-path={{ .Values.stats.statsdSocketPath }}
8485
{{- end }}
8586
{{- if and .Values.tracing.enabled ( eq .Values.tracing.provider "x-ray" ) }}
8687
- --enable-xray-tracing=true
8788
- --xray-image={{ .Values.xray.image.repository}}:{{ .Values.xray.image.tag }}
8889
- --xray-daemon-port={{ .Values.tracing.port }}
90+
- --xray-sampling-rate={{ .Values.tracing.samplingRate }}
8991
{{- end }}
9092
{{- if and .Values.tracing.enabled ( eq .Values.tracing.provider "jaeger" ) }}
9193
- --enable-jaeger-tracing=true

config/helm/appmesh-controller/test.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ preview: false
99

1010
image:
1111
repository: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/appmesh-controller
12-
tag: v1.4.1
12+
tag: v1.4.2
1313
pullPolicy: IfNotPresent
1414

1515
sidecar:
1616
image:
1717
repository: 840364872350.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-envoy
18-
tag: v1.16.1.1-prod
18+
tag: v1.20.0.1-prod
1919
# sidecar.logLevel: Envoy log level can be info, warn, error or debug
2020
logLevel: info
2121
envoyAdminAccessPort: 9901
@@ -39,11 +39,11 @@ sidecar:
3939
init:
4040
image:
4141
repository: 840364872350.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-proxy-route-manager
42-
tag: v3-prod
42+
tag: v4-prod
4343

4444
xray:
4545
image:
46-
repository: amazon/aws-xray-daemon
46+
repository: public.ecr.aws/xray/aws-xray-daemon
4747
tag: latest
4848

4949
nameOverride: ""
@@ -120,8 +120,10 @@ tracing:
120120
provider: x-ray
121121
# tracing.address: Jaeger or Datadog agent server address (ignored for X-Ray)
122122
address: appmesh-jaeger.appmesh-system
123-
# tracing.port: Jaeger or Datadog agent server port
123+
# tracing.port: X-Ray, Jaeger or Datadog agent server port
124124
port: 2000
125+
# tracing.samplingRate: X-Ray tracer sampling rate
126+
samplingRate: 0.05
125127

126128
stats:
127129
# stats.tagsEnabled: `true` if Envoy should include app-mesh tags
@@ -132,6 +134,8 @@ stats:
132134
statsdAddress: 127.0.0.1
133135
#stats.statsdPort: DogStatsD daemon port
134136
statsdPort: 8125
137+
#stats.statsdSocketPath: DogStatsD unix domain socket path
138+
statsdSocketPath: ""
135139

136140
# Enable cert-manager
137141
enableCertManager: false

config/helm/appmesh-controller/values.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ preview: false
99

1010
image:
1111
repository: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/appmesh-controller
12-
tag: v1.4.1
12+
tag: v1.4.2
1313
pullPolicy: IfNotPresent
1414

1515
sidecar:
1616
image:
1717
repository: 840364872350.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-envoy
18-
tag: v1.16.1.1-prod
18+
tag: v1.20.0.1-prod
1919
# sidecar.logLevel: Envoy log level can be info, warn, error or debug
2020
logLevel: info
2121
envoyAdminAccessPort: 9901
@@ -39,11 +39,11 @@ sidecar:
3939
init:
4040
image:
4141
repository: 840364872350.dkr.ecr.us-west-2.amazonaws.com/aws-appmesh-proxy-route-manager
42-
tag: v3-prod
42+
tag: v4-prod
4343

4444
xray:
4545
image:
46-
repository: amazon/aws-xray-daemon
46+
repository: public.ecr.aws/xray/aws-xray-daemon
4747
tag: latest
4848

4949
nameOverride: ""
@@ -106,8 +106,10 @@ tracing:
106106
provider: x-ray
107107
# tracing.address: Jaeger or Datadog agent server address (ignored for X-Ray)
108108
address: appmesh-jaeger.appmesh-system
109-
# tracing.port: Jaeger or Datadog agent server port
109+
# tracing.port: X-Ray, Jaeger or Datadog agent server port
110110
port: 2000
111+
# tracing.samplingRate: X-Ray tracer sampling rate
112+
samplingRate: 0.05
111113

112114
stats:
113115
# stats.tagsEnabled: `true` if Envoy should include app-mesh tags
@@ -118,6 +120,8 @@ stats:
118120
statsdAddress: 127.0.0.1
119121
#stats.statsdPort: DogStatsD daemon port
120122
statsdPort: 8125
123+
#stats.statsdSocketPath: DogStatsD unix domain socket path
124+
statsdSocketPath: ""
121125

122126
# Enable cert-manager
123127
enableCertManager: false

docs/guide/tracing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ AppMesh controller supports integration with multiple tracing solutions for data
1313

1414
You can optionally use a specific X-Ray image by setting the following flags in addition to the above:
1515
```sh
16-
--set xray.image.repository=amazon/aws-xray-daemon \
17-
--set xray.image.tag=3.2.0
16+
--set xray.image.repository=public.ecr.aws/xray/aws-xray-daemon \
17+
--set xray.image.tag=3.3.3
1818
```
1919

2020
**Note**: You should restart all pods running inside the mesh after enabling tracing.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/aws/aws-app-mesh-controller-for-k8s
22

3-
go 1.13
3+
go 1.16
44

55
require (
66
github.com/aws/aws-sdk-go v1.38.59

0 commit comments

Comments
 (0)