EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit a56093f9 authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Adding service and deployment yamls for registrar

parent 9c291bde
No related branches found
No related tags found
2 merge requests!37Chart,!36Staging to master to prepare 1.0.0 release
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "vs.fullname" . }}-registrar
labels:
{{- include "vs.labels" . | nindent 4 }}
app.kubernetes.io/service: registrar
spec:
replicas: {{ .Values.registrar.replicaCount }}
selector:
matchLabels:
{{- include "vs.selectorLabels" . | nindent 6 }}
app.kubernetes.io/service: registrar
strategy:
rollingUpdate:
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
annotations:
prometheus.io/scrape: "false"
labels:
{{- include "vs.selectorLabels" . | nindent 8 }}
app.kubernetes.io/service: registrar
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-registrar
image: "registry.gitlab.eox.at/esa/prism/vs/pvs_core:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 80
protocol: TCP
livenessProbe:
httpGet:
path: /
port: http
readinessProbe:
httpGet:
path: /
port: http
resources:
{{- toYaml .Values.registrar.resources | nindent 12 }}
args:
- /run-httpd.sh
env:
{{- range $key, $value := .Values.config.general }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.config.database }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: DB_HOST
value: {{ .Release.Name }}-database
{{- range $key, $value := .Values.config.django }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- range $key, $value := .Values.config.objectStorage.data }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
- name: INIT_SCRIPTS
value: /configure.sh /init-db.sh /initialized.sh
- name: INSTALL_DIR
value: /var/www/pvs/dev/
- name: INSTANCE_ID
value: prism-view-server_registrar
- name: STARTUP_SCRIPTS
value: /wait-initialized.sh
- name: WAIT_SERVICES
value: {{ .Release.Name }}-database:{{ .Values.config.database.DB_PORT }}
volumeMounts:
- mountPath: /init-db.sh
name: init-db
subPath: init-db.sh
{{- with .Values.registrar.affinity | default .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- configMap:
items:
- key: init-db.sh
path: init-db.sh
name: {{ include "vs.fullname" . }}-init-db
name: init-db
apiVersion: v1
kind: Service
metadata:
name: {{ include "vs.fullname" . }}-registrar
labels:
{{- include "vs.labels" . | nindent 4 }}
app.kubernetes.io/service: registrar
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "vs.selectorLabels" . | nindent 4 }}
app.kubernetes.io/service: registrar
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment