-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigmap.yaml
80 lines (71 loc) · 2.9 KB
/
configmap.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{{- if .Values.services.osrdyne.enabled -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "osrd.fullname" . }}-osrdyne-config
data:
osrdyne.yml: |
{{- if .Values.services.osrdyne.config.pool_id }}
pool_id: "{{ .Values.services.osrdyne.config.pool_id }}"
{{- end }}
{{- if .Values.services.osrdyne.config.default_message_ttl }}
default_message_ttl: "{{ .Values.services.osrdyne.config.default_message_ttl }}"
{{- end }}
{{- if .Values.services.osrdyne.config.max_length }}
max_length: {{ printf "%.0f" .Values.services.osrdyne.config.max_length }}
{{- end }}
{{- if .Values.services.osrdyne.config.max_length_bytes }}
max_length_bytes: {{ printf "%.0f" .Values.services.osrdyne.config.max_length_bytes }}
{{- end }}
api_address: "0.0.0.0:{{ .Values.services.osrdyne.service.targetPort }}"
worker_driver:
type: "KubernetesDriver"
container_image: "{{ .Values.images.core }}"
{{- if .Values.imagePullSecrets }}
image_pull_secrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
start_command: ["sh", "-c", "exec java $JAVA_OPTS -ea -jar /app/osrd_core.jar worker"]
deployment_prefix: "{{ include "osrd.fullname" . }}"
namespace: "{{ .Release.Namespace }}"
{{- with .Values.services.core.autoscaling }}
autoscaling:
{{- toYaml . | nindent 8 }}
{{- end }}
kube_deployment_options:
default_env:
{{- with .Values.services.core.env }}
{{- toYaml . | nindent 10 }}
{{- end }}
- name: CORE_EDITOAST_URL
value: http://{{ include "osrd.fullname" . }}-editoast
- name: CORE_MONITOR_TYPE
value: "{{ .Values.services.core.config.telemetry }}"
- name: JAVA_TOOL_OPTIONS
value: {{ if eq .Values.services.core.config.telemetry "opentelemetry" -}}
"-javaagent:/app/opentelemetry-javaagent.jar"
{{- end -}}
{{- with .Values.services.core.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.services.core.labels }}
labels:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.services.core.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
node_selector:
{{- toYaml (merge (.Values.nodeSelector | default dict) (.Values.services.core.nodeSelector | default dict)) | nindent 10 }}
affinity:
{{- toYaml (merge (.Values.affinity | default dict) (.Values.services.core.affinity | default dict)) | nindent 10 }}
tolerations:
{{- with .Values.tolerations | default dict }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.services.core.tolerations | default dict }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}