Skip to content

Modular logistics and supply chain operating system (LSOS)

Adapt the Helm chart to be used with AWS EKS

Eugene Dementyev2a89659cc3db
diff --git a/infra/helm/templates/deployment.yaml b/infra/helm/templates/deployment.yaml
index 2549a168..ab084aa2 100644
--- a/infra/helm/templates/deployment.yaml
+++ b/infra/helm/templates/deployment.yaml
@@ -34,7 +34,11 @@ spec:
- name: {{ .Chart.Name }}-httpd
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
+ {{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/app-httpd:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- else }}
+ image: "{{ .Values.image.repository }}:app-httpd-{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: NGINX_APPLICATION_HOSTNAME
@@ -56,7 +60,11 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
+ {{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/app:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- else }}
+ image: "{{ .Values.image.repository }}:app-{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:
diff --git a/infra/helm/templates/deployment_services.yaml b/infra/helm/templates/deployment_services.yaml
index 8c1be99e..8cc6c9b9 100644
--- a/infra/helm/templates/deployment_services.yaml
+++ b/infra/helm/templates/deployment_services.yaml
@@ -35,7 +35,11 @@ spec:
command: ["php", "artisan", "queue:work"]
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
+ {{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/events:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- else }}
+ image: "{{ .Values.image.repository }}:events-{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:
@@ -93,7 +97,11 @@ spec:
- name: scheduler
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
+ {{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/scheduler:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- else }}
+ image: "{{ .Values.image.repository }}:scheduler-{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- secretRef:
diff --git a/infra/helm/templates/hooks.yaml b/infra/helm/templates/hooks.yaml
index c31706a6..314ef39b 100644
--- a/infra/helm/templates/hooks.yaml
+++ b/infra/helm/templates/hooks.yaml
@@ -28,8 +28,12 @@ spec:
- name: deployment-job
securityContext:
{{- toYaml .Values.securityContext | nindent 10 }}
+ {{- if .Values.gcp }}
image: "{{ .Values.image.repository }}/app:{{ .Values.image.tag | default .Chart.AppVersion }}"
- command: ["./deploy.sh"]
+ {{- else }}
+ image: "{{ .Values.image.repository }}:app-{{ .Values.image.tag | default .Chart.AppVersion }}"
+ {{- end }}
+ args: ["./deploy.sh"]
env:
{{- include "helm.commonVariables" . | nindent 12 }}
envFrom:
diff --git a/infra/helm/templates/ingress.yaml b/infra/helm/templates/ingress.yaml
index fd1a0272..5d69e228 100644
--- a/infra/helm/templates/ingress.yaml
+++ b/infra/helm/templates/ingress.yaml
@@ -44,7 +44,7 @@ spec:
pathType: ImplementationSpecific
backend:
service:
- name: fleetbase-app
+ name: {{ include "helm.fullname" . }}
port:
number: {{ $svcPort }}
- host: {{ .Values.socketcluster_host }}
diff --git a/infra/helm/templates/socketcluster.yaml b/infra/helm/templates/socketcluster.yaml
index 62feedcb..cf0eddb2 100644
--- a/infra/helm/templates/socketcluster.yaml
+++ b/infra/helm/templates/socketcluster.yaml
@@ -32,4 +32,4 @@ spec:
- protocol: TCP
port: 80
targetPort: 8000
- type: ClusterIP
+ type: {{ .Values.service.type }}