Skip to content

Commit

Permalink
Merge pull request #140 from pelashchoudhary/optional-configmap
Browse files Browse the repository at this point in the history
Make the configmap optional
  • Loading branch information
epot authored Nov 22, 2024
2 parents fa33d18 + 9caf281 commit f36da24
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
7 changes: 7 additions & 0 deletions charts/warpstream-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.13.56] - 2024-11-22

### Added

- Make the ConfigMap optional.
- Add affinity for diagnose pods.

## [0.13.55] - 2024-11-21

### Added
Expand Down
2 changes: 1 addition & 1 deletion charts/warpstream-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: warpstream-agent
description: WarpStream Agent for Kubernetes.
type: application
version: 0.13.55
version: 0.13.56
appVersion: v601
icon: https://avatars.githubusercontent.com/u/132156278
home: https://docs.warpstream.com/warpstream/
Expand Down
2 changes: 2 additions & 0 deletions charts/warpstream-agent/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if ne .Values.config.configMapEnabled false }}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -20,3 +21,4 @@ data:
{{- end }}
WARPSTREAM_REGION: {{ .Values.config.region | quote }}
{{- end }}
{{- end }}
7 changes: 6 additions & 1 deletion charts/warpstream-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,13 @@ spec:
{{- toYaml .Values.extraEnv | nindent 12 }}
{{- end }}
envFrom:
{{- if ne .Values.config.configMapEnabled false }}
- configMapRef:
name: {{ include "warpstream-agent.fullname" . }}
{{- else }}
- secretRef:
name: {{ include "warpstream-agent.secretName" . }}
{{- end }}
ports:
- name: kafka
containerPort: 9092
Expand Down Expand Up @@ -183,4 +188,4 @@ spec:
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/warpstream-agent/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ spec:
- -type
- diagnose-connection
restartPolicy: Never
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/warpstream-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ headlessService:
enabled: true

config:
# If set to false, configmap will not be created and secrets will be referenced in the deployemnt
configMapEnabled: true
playground: false
## To learn what values to set for the config variables, look at our documentation
## for configuring the WarpStream Agents for production.
Expand Down

0 comments on commit f36da24

Please sign in to comment.