Skip to content

Commit

Permalink
Merge pull request #23 from tamcore/feature/container-spec
Browse files Browse the repository at this point in the history
make command, args and env configurable
  • Loading branch information
tananaev authored Feb 11, 2023
2 parents 02ff085 + 711f6c5 commit c6d2dce
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/traccar/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: traccar
description: A Helm chart for Traccar GPS Server
type: application
version: 1.4.0
version: 1.5.0
appVersion: "5.6"
dependencies:
- name: mysql
Expand Down
14 changes: 12 additions & 2 deletions charts/traccar/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,18 @@ spec:
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: {{ include "traccar.image" . }}
command: ["java", "-Xms512m", "-Xmx512m", "-Djava.net.preferIPv4Stack=true"]
args: ["-jar", "tracker-server.jar", "conf/traccar.xml"]
{{- with .Values.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.env }}
env:
{{- toYaml . | nindent 12 }}
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
Expand Down
19 changes: 19 additions & 0 deletions charts/traccar/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,25 @@ securityContext:
# A list of initContainers to run before the pod starts
initContainers: []

command: ["java", "-Xms512m", "-Xmx512m", "-Djava.net.preferIPv4Stack=true"]
args: ["-jar", "tracker-server.jar", "conf/traccar.xml"]

# This allows you to use environment variables (i.e. referenced from Secrets) to use in your configuration
# The names of the keys are identical. But, a dot (.), you'll have to use an underscore (_) and define everything in UPPERCASE
env: []
# - name: "CONFIG_USE_ENVIRONMENT_VARIABLES"
# value: "true"
# - name: "DATABASE_USER"
# valueFrom:
# secretKeyRef:
# name: "postgres-secrets"
# key: "username"
# - name: "DATABASE_PASSWORD"
# valueFrom:
# secretKeyRef:
# name: "postgres-secrets"
# key: "password"

ingress:
enabled: false
extraAnnotations: {}
Expand Down

0 comments on commit c6d2dce

Please sign in to comment.