From 9cedcc20dbad377e6db101fd37506b4907deed4b Mon Sep 17 00:00:00 2001 From: Abdulla Zin <102162454+abdullazin@users.noreply.github.com> Date: Wed, 5 Jul 2023 04:45:35 -0400 Subject: [PATCH] [stable/locust] Adding hostAliases to locust template (#485) * Adding hostAliases to master-deployment * Adding hostaliases to worker-deployment * version bump * updated readme * updated readme again * Adding hostaliases to the values.yaml file * Added explanation * Rerun docs generation --------- Co-authored-by: Max Williams <8859277+max-rocket-internet@users.noreply.github.com> --- stable/locust/Chart.yaml | 2 +- stable/locust/README.md | 3 ++- stable/locust/templates/master-deployment.yaml | 3 +++ stable/locust/templates/worker-deployment.yaml | 3 +++ stable/locust/values.yaml | 6 ++++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/stable/locust/Chart.yaml b/stable/locust/Chart.yaml index 6137ccca..87a8770e 100644 --- a/stable/locust/Chart.yaml +++ b/stable/locust/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: locust -version: "0.31.4" +version: "0.31.5" appVersion: 2.15.1 home: https://github.com/locustio/locust icon: https://locust.io/static/img/logo.png diff --git a/stable/locust/README.md b/stable/locust/README.md index c0d3555d..7c8e0890 100644 --- a/stable/locust/README.md +++ b/stable/locust/README.md @@ -1,6 +1,6 @@ # locust -![Version: 0.31.4](https://img.shields.io/badge/Version-0.31.4-informational?style=flat-square) ![AppVersion: 2.15.1](https://img.shields.io/badge/AppVersion-2.15.1-informational?style=flat-square) +![Version: 0.31.5](https://img.shields.io/badge/Version-0.31.5-informational?style=flat-square) ![AppVersion: 2.15.1](https://img.shields.io/badge/AppVersion-2.15.1-informational?style=flat-square) A chart to install Locust, a scalable load testing tool written in Python. @@ -66,6 +66,7 @@ helm install my-release deliveryhero/locust -f values.yaml | extraConfigMaps | object | `{}` | Any extra configmaps to mount for the master and worker. Can be used for extra python packages | | extraLabels | object | `{}` | Any extra labels to apply to all resources | | fullnameOverride | string | `""` | | +| hostAliases | list | `[]` | List of entries added to the /etc/hosts file on the pod to resolve custom hosts | | image.pullPolicy | string | `"IfNotPresent"` | | | image.repository | string | `"locustio/locust"` | | | image.tag | string | `"2.15.1"` | | diff --git a/stable/locust/templates/master-deployment.yaml b/stable/locust/templates/master-deployment.yaml index 5128bfbe..689329c9 100644 --- a/stable/locust/templates/master-deployment.yaml +++ b/stable/locust/templates/master-deployment.yaml @@ -40,6 +40,9 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "locust.fullname" . }}-master +{{- if .Values.hostAliases }} + hostAliases: {{- .Values.hostAliases | toYaml | nindent 8 }} +{{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/stable/locust/templates/worker-deployment.yaml b/stable/locust/templates/worker-deployment.yaml index 37bec872..3cb75cd3 100644 --- a/stable/locust/templates/worker-deployment.yaml +++ b/stable/locust/templates/worker-deployment.yaml @@ -42,6 +42,9 @@ spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} serviceAccountName: {{ template "locust.fullname" . }}-worker +{{- if .Values.hostAliases }} + hostAliases: {{- .Values.hostAliases | toYaml | nindent 8 }} +{{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/stable/locust/values.yaml b/stable/locust/values.yaml index 992e55e4..61e0c0f6 100644 --- a/stable/locust/values.yaml +++ b/stable/locust/values.yaml @@ -142,6 +142,12 @@ nameOverride: "" fullnameOverride: "" imagePullSecrets: [] +# hostAliases -- List of entries added to the /etc/hosts file on the pod to resolve custom hosts +hostAliases: [] + # - ip: "10.0.0.1" + # hostnames: + # - "example-host.com" + podSecurityContext: {} # fsGroup: 2000