Skip to content

Commit

Permalink
build(repo): fix consumer chart
Browse files Browse the repository at this point in the history
  • Loading branch information
pedronauck committed Dec 11, 2024
1 parent b871a0c commit decb324
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion cluster/charts/fuel-streams/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: fuel-streams
version: 0.2.2
version: 0.2.3
dependencies:
- name: nats
version: 1.2.6
Expand Down
28 changes: 2 additions & 26 deletions cluster/charts/fuel-streams/templates/consumer/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,6 @@ spec:
{{- include "set-field-and-value" (dict "context" $consumer "field" "tolerations" "path" "config.tolerations") | nindent 6 }}
{{- include "k8s.security-context" (dict "context" . "service" "consumer") | nindent 6 }}

volumes:
- name: podinfo
emptyDir: {}

initContainers:
- name: pod-name-init
image: busybox
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
command:
- /bin/sh
- -c
- echo $POD_NAME > /podinfo/pod-name
volumeMounts:
- name: podinfo
mountPath: /podinfo

containers:
- name: consumer
image: "{{ $consumer.image.repository }}:{{ $consumer.image.tag | default .Chart.AppVersion }}"
Expand All @@ -84,8 +64,8 @@ spec:
env:
- name: SERVICE_NAME
valueFrom:
execFrom:
command: ['cat', '/podinfo/pod-name']
fieldRef:
fieldPath: metadata.name
{{- range $key, $value := $consumer.env }}
- name: {{ $key }}
value: {{ $value | quote }}
Expand All @@ -94,9 +74,5 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}

volumeMounts:
- name: podinfo
mountPath: /podinfo

{{- include "k8s.hpa" (dict "context" . "service" (dict "name" "consumer" "autoscaling" $consumer.autoscaling)) }}
{{- end }}

0 comments on commit decb324

Please sign in to comment.