5353 {{- end }}
5454 - name : OR_I_ACCEPT_EULA
5555 value : {{ .Values.I_do_accept_the_EULA | quote }}
56- {{- if (or .Values.project.auth.ssh_key .Values.project.auth.ssh_secret) }}
57- - name : PROJECT_SSH_KEY
58- valueFrom :
59- secretKeyRef :
60- name : {{ .Values.project.auth.ssh_secret | default (printf "%s-%s" (include "opc-router.fullname" $) "secret" | trunc 63 | trimSuffix "-") }}
61- key : project-ssh-key
62- {{- end }}
6356 # Loading environment variables specified in the values file
6457 {{- range .Values.EnvVars }}
6558 - name : " {{ keys . | first }}"
@@ -71,21 +64,35 @@ spec:
7164 {{- if .Values.project.projectRepo }}
7265 # Volume mount for the project and configuration file
7366 volumeMounts :
74- - mountPath : /project
67+ - mountPath : /data
7568 name : project-volume
7669 # Command and arguments for loading the project and configuration into the opcrouter
7770 command : ["/init", "dotnet", "/app/inray.OPCRouter.Service.dll", "import-project"]
78- args : ["--source","/project/{{ .Values.project.projectPath }}",{{ if eq .Values.image.repository "opcrouter/runtime" }}"--configdb","OPCRouterRuntime",{{ end }}"--allow-clear-config","--start-service"{{ if .Values.project.configPath }},"--runtime-configuration-filepath","/project/{{ .Values.project.configPath }}"{{ end }}]
79-
71+ args :
72+ - " --source"
73+ - " /data/project/{{ .Values.project.projectPath }}"
74+ {{- if eq .Values.image.repository "opcrouter/runtime" }}
75+ - " --configdb"
76+ - " OPCRouterRuntime"
77+ {{- end }}
78+ - " --allow-clear-config"
79+ - " --start-service"
80+ {{- if .Values.project.configPath }}
81+ - " --runtime-configuration-filepath"
82+ - " /data/project/{{ .Values.project.configPath }}"
83+ {{- end }}
8084 # Init container for pulling the project files
8185 initContainers :
8286 - name : pull-project
8387 image : alpine/git:latest
8488 # Script for setting ssh credentials and cloning the repository onto the volume
85- command : ['sh', '-c', "{{ if .Values.project.auth.ssh_key }}mkdir .ssh; cd .ssh; echo -e $PROJECT_SSH_KEY > id; chmod 400 id; eval `ssh-agent`; ssh-add id; ssh -o 'StrictHostKeyChecking=no' *; {{ end }}cd /project; git clone {{ .Values.project.projectRepo }} .; echo Done"]
89+ command : ["sh", "-c"]
90+ args :
91+ - >-
92+ {{- include "project.clone" $ | indent 10}}
8693 # Volume mount for the project and configuration file
8794 volumeMounts :
88- - mountPath : /project
95+ - mountPath : /data
8996 name : project-volume
9097 {{- if (or .Values.project.auth.ssh_key .Values.project.auth.ssh_secret) }}
9198 env :
0 commit comments