Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chart: Added PodDisruptionBudget for the loadtester #819

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions charts/loadtester/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Flagger load testing service

[Flagger's](https://github.com/fluxcd/flagger) load testing service is based on
[rakyll/hey](https://github.com/rakyll/hey) and
[Flagger's](https://github.com/fluxcd/flagger) load testing service is based on
[rakyll/hey](https://github.com/rakyll/hey) and
[bojand/ghz](https://github.com/bojand/ghz).
It can be used to generate HTTP and gRPC traffic during canary analysis when configured as a webhook.

Expand Down Expand Up @@ -50,7 +50,7 @@ Parameter | Description | Default
`image.pullPolicy` | Image pull policy | `IfNotPresent`
`image.tag` | Image tag | `<VERSION>`
`replicaCount` | Desired number of pods | `1`
`serviceAccountName` | Kubernetes service account name | `none`
`serviceAccountName` | Kubernetes service account name | `none`
`resources.requests.cpu` | CPU requests | `10m`
`resources.requests.memory` | Memory requests | `64Mi`
`tolerations` | List of node taints to tolerate | `[]`
Expand All @@ -70,6 +70,8 @@ Parameter | Description | Default
`podPriorityClassName` | PriorityClass name for pod priority configuration | ""
`securityContext.enabled` | Add securityContext to container | ""
`securityContext.context` | securityContext to add | ""
`podDisruptionBudget.enabled` | A PodDisruptionBudget will be created if `true` | `false`
`podDisruptionBudget.minAvailable` | The minimal number of available replicas that will be set in the PodDisruptionBudget | `1`

Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade`. For example,

Expand All @@ -87,5 +89,3 @@ helm install flagger/loadtester --name flagger-loadtester -f values.yaml
```

> **Tip**: You can use the default [values.yaml](values.yaml)


11 changes: 11 additions & 0 deletions charts/loadtester/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "loadtester.fullname" . }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "loadtester.name" . }}
{{- end }}
12 changes: 8 additions & 4 deletions charts/loadtester/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8080"

podPriorityClassName: ""
podPriorityClassName: ""

logLevel: info
cmd:
Expand Down Expand Up @@ -62,15 +62,15 @@ appmesh:
- podinfo
- podinfo-canary

#Istio virtual service and gatway settings. TLS secrets should be in namespace before enbaled it. ( secret format loadtester.fullname )
#Istio virtual service and gatway settings. TLS secrets should be in namespace before enbaled it. ( secret format loadtester.fullname )
istio:
enabled: false
host: flagger-loadtester.flagger
gateway:
enabled: false
enabled: false
tls:
enabled: false
httpsRedirect: false
httpsRedirect: false

# when enabled, it will add a security context for the loadtester pod
securityContext:
Expand All @@ -79,3 +79,7 @@ securityContext:
readOnlyRootFilesystem: true
runAsUser: 100
runAsGroup: 101

podDisruptionBudget:
enabled: false
minAvailable: 1