From fd50c4b4b7e75845aaeb90af0845e3b887007e1b Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 4 Jun 2019 15:31:02 +0300 Subject: [PATCH] Add service account option to tester chart --- charts/loadtester/Chart.yaml | 4 ++-- charts/loadtester/README.md | 12 ++++++------ charts/loadtester/templates/deployment.yaml | 3 +++ charts/loadtester/values.yaml | 4 +++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/charts/loadtester/Chart.yaml b/charts/loadtester/Chart.yaml index 36ea2f42..3772b661 100644 --- a/charts/loadtester/Chart.yaml +++ b/charts/loadtester/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: loadtester -version: 0.4.0 -appVersion: 0.3.0 +version: 0.4.1 +appVersion: 0.4.0 kubeVersion: ">=1.11.0-0" engine: gotpl description: Flagger's load testing services based on rakyll/hey that generates traffic during canary analysis when configured as a webhook. diff --git a/charts/loadtester/README.md b/charts/loadtester/README.md index cb891782..b1172617 100644 --- a/charts/loadtester/README.md +++ b/charts/loadtester/README.md @@ -7,7 +7,6 @@ and can be used to generates traffic during canary analysis when configured as a ## Prerequisites * Kubernetes >= 1.11 -* Istio >= 1.0 ## Installing the Chart @@ -25,7 +24,7 @@ helm upgrade -i flagger-loadtester flagger/loadtester The command deploys Grafana on the Kubernetes cluster in the default namespace. -> **Tip**: Note that the namespace where you deploy the load tester should have the Istio sidecar injection enabled +> **Tip**: Note that the namespace where you deploy the load tester should have the Istio or App Mesh sidecar injection enabled The [configuration](#configuration) section lists the parameters that can be configured during installation. @@ -48,13 +47,14 @@ Parameter | Description | Default `image.repository` | Image repository | `quay.io/stefanprodan/flagger-loadtester` `image.pullPolicy` | Image pull policy | `IfNotPresent` `image.tag` | Image tag | `` -`replicaCount` | desired number of pods | `1` +`replicaCount` | Desired number of pods | `1` +`serviceAccountName` | Kubernetes service account name | `none` `resources.requests.cpu` | CPU requests | `10m` -`resources.requests.memory` | memory requests | `64Mi` +`resources.requests.memory` | Memory requests | `64Mi` `tolerations` | List of node taints to tolerate | `[]` `affinity` | node/pod affinities | `node` -`nodeSelector` | node labels for pod assignment | `{}` -`service.type` | type of service | `ClusterIP` +`nodeSelector` | Node labels for pod assignment | `{}` +`service.type` | Type of service | `ClusterIP` `service.port` | ClusterIP port | `80` `cmd.timeout` | Command execution timeout | `1h` `logLevel` | Log level can be debug, info, warning, error or panic | `info` diff --git a/charts/loadtester/templates/deployment.yaml b/charts/loadtester/templates/deployment.yaml index 75a91abe..ec7fef88 100644 --- a/charts/loadtester/templates/deployment.yaml +++ b/charts/loadtester/templates/deployment.yaml @@ -19,6 +19,9 @@ spec: annotations: appmesh.k8s.aws/ports: "444" spec: + {{- if .Values.serviceAccountName }} + serviceAccountName: {{ .Values.serviceAccountName }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/charts/loadtester/values.yaml b/charts/loadtester/values.yaml index 9399a8ad..486ab92b 100644 --- a/charts/loadtester/values.yaml +++ b/charts/loadtester/values.yaml @@ -2,7 +2,7 @@ replicaCount: 1 image: repository: weaveworks/flagger-loadtester - tag: 0.3.0 + tag: 0.4.0 pullPolicy: IfNotPresent logLevel: info @@ -27,6 +27,8 @@ tolerations: [] affinity: {} +serviceAccountName: "" + # App Mesh virtual node settings meshName: "" #backends: