diff --git a/templates/deployment-sidekiq.yaml b/templates/deployment-sidekiq.yaml index 8cae4f3..09ed53d 100644 --- a/templates/deployment-sidekiq.yaml +++ b/templates/deployment-sidekiq.yaml @@ -44,6 +44,10 @@ spec: app.kubernetes.io/component: sidekiq-{{ .name }} app.kubernetes.io/part-of: rails spec: + {{- with $context.Values.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with $context.Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/templates/deployment-streaming.yaml b/templates/deployment-streaming.yaml index 1e4acaa..cdb3795 100644 --- a/templates/deployment-streaming.yaml +++ b/templates/deployment-streaming.yaml @@ -28,6 +28,10 @@ spec: {{- include "mastodon.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: streaming spec: + {{- with .Values.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/templates/deployment-web.yaml b/templates/deployment-web.yaml index 47aa0f6..521d158 100644 --- a/templates/deployment-web.yaml +++ b/templates/deployment-web.yaml @@ -31,6 +31,10 @@ spec: app.kubernetes.io/component: web app.kubernetes.io/part-of: rails spec: + {{- with .Values.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} diff --git a/values.yaml b/values.yaml index 237ace5..f61fced 100644 --- a/values.yaml +++ b/values.yaml @@ -562,6 +562,10 @@ tolerations: [] # -- Affinity for all pods unless overwritten affinity: {} +# Any aliases to add to pod's /etc/hosts file. +# https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/ +hostAliases: [] + # -- Topology Spread Constraints for all pods unless overwritten # Please note that you need to use `matchLabelKeys` (Kubernetes 1.25+) if you # want to spread each deployment independently, or override topologySpreadConstraints