summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/configmap.yaml26
-rw-r--r--templates/deployment.yaml91
2 files changed, 114 insertions, 3 deletions
diff --git a/templates/configmap.yaml b/templates/configmap.yaml
index da50934..170ee56 100644
--- a/templates/configmap.yaml
+++ b/templates/configmap.yaml
@@ -24,3 +24,29 @@ metadata:
heritage: {{ .Release.Service }}
data:
{{ tpl (.Files.Glob "resources/config/eteshare/config/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-lighttpd-configmap
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/lighttpd/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.fullname" . }}-lighttpd-index-configmap
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/lighttpd/*").AsConfig . | indent 2 }} \ No newline at end of file
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 7b0c140..255017b 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -31,11 +31,9 @@ spec:
release: {{ .Release.Name }}
spec:
containers:
- - name: {{ include "common.name" . }}
+ - name: {{ include "common.name" . }}-robot
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- ports:
- - containerPort: {{ .Values.service.internalPort }}
{{ if .Values.liveness.enabled }}
livenessProbe:
tcpSocket:
@@ -58,8 +56,85 @@ spec:
mountPath: /share/config
- name: robot-logs
mountPath: /share/logs
+ - name: vnf-assets
+ mountPath: /share/assets
resources:
{{ include "common.resources" . }}
+ - name: {{ include "common.name" . }}-web
+ image: "{{ .Values.lighthttpdImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ tty: true
+ {{ if .Values.liveness.enabled }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - name: localtime
+ mountPath: /etc/localtime
+ readOnly: true
+ - name: robot-eteshare
+ mountPath: /var/www/localhost/htdocs/robot_properties.py
+ subPath: robot_properties.py
+ - name: robot-lighttpd-index
+ mountPath: /var/www/localhost/htdocs/index.html
+ subPath: index.html
+ - name: robot-logs
+ mountPath: /share/logs
+ - name: robot-lighttpd-config
+ mountPath: /etc/lighttpd/
+ resources:
+{{ include "common.resources" . }}
+ - name: {{ include "common.name" . }}-debug
+ image: "{{ .Values.debugImage }}"
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ if .Values.liveness.enabled }}
+ livenessProbe:
+ exec:
+ command:
+ - ls
+ - /
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{ end }}
+ readinessProbe:
+ exec:
+ command:
+ - ls
+ - /
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ volumeMounts:
+ - name: robot-logs
+ mountPath: /share/logs
+ resources:
+{{ include "common.resources" . }}
+ initContainers:
+ - name: git-sync
+ image: {{ .Values.gitInitImage }}
+ volumeMounts:
+ - mountPath: /git/tmp
+ name: vnf-assets
+ env:
+ - name: GIT_SYNC_REPO
+ value: "{{ .Values.vnfAssetLocation }}"
+ - name: GIT_SYNC_ONE_TIME
+ value: "true"
+ - name: GIT_SYNC_REF
+ value: "{{ .Values.demoArtifactsVersion }}"
+ - name: GIT_SYNC_ROOT
+ value: "/git/tmp"
+ securityContext:
+ runAsUser: 0
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
@@ -86,5 +161,15 @@ spec:
configMap:
name: {{ include "common.fullname" . }}-eteshare-configmap
defaultMode: 0755
+ - name: robot-lighttpd-config
+ configMap:
+ name: {{ include "common.fullname" . }}-lighttpd-configmap
+ defaultMode: 0755
+ - name: robot-lighttpd-index
+ configMap:
+ name: {{ include "common.fullname" . }}-lighttpd-index-configmap
+ defaultMode: 0755
+ - name: vnf-assets
+ emptyDir: {}
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"