Skip to content
Snippets Groups Projects
Commit f3f05ed4 authored by Martin Weise's avatar Martin Weise
Browse files

Merge branch '404-integrate-the-helm-chart-into-this-repository' into 'dev'

Resolve "Integrate the Helm chart into this repository"

See merge request !230
parents 464c6b94 473bfcd3
Branches
Tags
3 merge requests!235Master,!233Master,!230Resolve "Integrate the Helm chart into this repository"
apiVersion: batch/v1
kind: Job
metadata:
name: storage-service-create-buckets-job
namespace: {{ .Values.namespace }}
spec:
template:
metadata:
name: storage-service-create-buckets-job
spec:
restartPolicy: OnFailure
containers:
- name: init
image: s210.dl.hpc.tuwien.ac.at/dbrepo/storage-service-init:latest
env:
- name: WEED_CLUSTER_DEFAULT
value: "sw"
- name: WEED_CLUSTER_SW_MASTER
value: "storage-service-master.{{ .Release.Name }}:9333"
- name: SEAWEEDFS_ENDPOINT
value: "storage-service-master.{{ .Release.Name }}:9333"
- name: WEED_CLUSTER_SW_FILER
value: "storage-service-filer-client.{{ .Release.Name }}:8888"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SEAWEEDFS_FULLNAME
value: "storage-service"
volumeMounts:
- name: config-users
mountPath: /etc/sw
readOnly: true
ports:
- containerPort: 9333
name: swfs-master
- containerPort: 19333
#name: swfs-master-grpc
volumes:
- name: config-users
secret:
defaultMode: 420
secretName: seaweedfs-s3-secret
apiVersion: v1
kind: Secret
metadata:
name: seaweedfs-s3-secret
namespace: {{ .Values.namespace }}
labels:
app.kubernetes.io/name: seaweedfs
app.kubernetes.io/component: s3
stringData:
seaweedfs_s3_config: |
{
"identities": [
{
"name": "admin",
"credentials": [
{
"accessKey": "{{ index .Values "storage-service" "s3" "auth" "username" }}",
"secretKey": "{{ index .Values "storage-service" "s3" "auth" "password" }}"
}
],
"actions": [
"Read",
"Write",
"List",
"Tagging",
"Admin"
]
}
]
}
{{- if .Values.ui.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ui-setup
namespace: {{ $.Values.namespace }}
data:
dbrepo.config.json: |
{
"title": "{{ .Values.ui.title }}",
"version": "{{ .Values.ui.version }}",
"ssl": {
"force": "{{ .Values.ui.forceSsl }}"
},
"logo": {
"path": "{{ .Values.ui.logo }}"
},
"icon": {
"path": "{{ .Values.ui.icon }}"
},
"appleTouchIcon": {
"path": "{{ .Values.ui.appleTouchIcon }}"
},
"api": {
"useSsl": "{{ .Values.ui.forceSsl }}"
},
"broker": {
"connection": {
"host": "{{ .Values.ui.broker.host }}",
"ports": {{ .Values.ui.broker.ports | toJson }},
"extraInfo": "{{ .Values.ui.broker.extraInfo}}"
}
},
"storage": {
"endpoint": "storage-service",
"port": 9000,
"useSsl": false,
"accessKey": {
"id": "seaweedfsadmin",
"secret": "seaweedfsadmin"
}
},
"database": {
"connection": {
"extraInfo": "128.130.0.0/15"
}
},
"keycloak": {
"client": {
"id": "dbrepo-client",
"secret": "MUwRc7yfXSJwX8AdRMWaQC3Nep1VjwgG"
}
},
"opensearch": {
"username": "admin",
"password": "admin"
},
"pid": {
"default": {
"publisher": "TU Wien"
}
},
"doi": {
"url": "{{ .Values.ui.datacite.url }}"
},
"pages": {
"login": {
"links": [
{
"text": "OpenSearch Admin",
"blank": true,
"href": "{{ printf "https://%s/admin/dashboard" .Values.hostname }}"
},
{
"text": "RabbitMQ Admin",
"blank": true,
"href": "{{ printf "https://%s/admin/broker/" .Values.hostname }}"
},
{
"text": "Keycloak Admin",
"blank": true,
"href": "{{ printf "https://%s/api/auth/" .Values.hostname }}"
}
]
},
"information": {
"links": [
{
"text": "Online Documentation",
"blank": true,
"href": "https://www.ifs.tuwien.ac.at/infrastructures/dbrepo/latest/"
},
{
"text": "Sourcecode Documentation",
"blank": true,
"href": "https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services"
},
{
"text": "Docker Images",
"blank": true,
"href": "https://hub.docker.com/u/dbrepo"
},
{
"text": "Demo Instance (Kubernetes)",
"blank": true,
"href": "https://test.dbrepo.tuwien.ac.at/"
},
{
"text": "Demo Instance (Docker Compose)",
"blank": true,
"href": "https://dbrepo2.ec.tuwien.ac.at/"
},
{
"text": "Paper",
"blank": true,
"href": "https://doi.org/10.2218/ijdc.v17i1.825"
}
]
}
}
}
{{- end }}
\ No newline at end of file
{{- if .Values.ui.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ui
namespace: {{ $.Values.namespace }}
labels:
app: ui
service: ui
spec:
replicas: {{ .Values.ui.replicaCount }}
strategy:
type: {{ $.Values.strategyType }}
selector:
matchLabels:
app: ui
service: ui
template:
metadata:
labels:
app: ui
service: ui
spec:
securityContext:
fsGroup: 1000
runAsUser: 1000
runAsGroup: 1000
containers:
- name: ui
image: {{ printf "%s/%s:%s" .Values.ui.image.registry .Values.ui.image.repository .Values.ui.image.tag }}
imagePullPolicy: {{ .Values.ui.image.pullPolicy | default "IfNotPresent" }}
ports:
- containerPort: 3000
protocol: TCP
env:
- name: API
value: "https://{{ .Values.hostname }}"
volumeMounts:
- mountPath: /app/dbrepo.config.json
subPath: dbrepo.config.json
name: config
{{- if .Values.ui.extraVolumeMounts }}
{{- .Values.ui.extraVolumeMounts | toYaml | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 120
periodSeconds: 30
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 30
periodSeconds: 30
volumes:
- name: config
configMap:
name: ui-setup
{{- if .Values.ui.extraVolumes }}
{{- .Values.ui.extraVolumes | toYaml | nindent 8 }}
{{- end }}
{{- end }}
{{- if .Values.ui.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: ui
namespace: {{ $.Values.namespace }}
labels:
service: ui
spec:
type: ClusterIP
ports:
- name: "nuxt"
port: 80
targetPort: 3000
protocol: TCP
selector:
service: ui
{{- end }}
{{- if .Values.uploadService.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: upload-service
namespace: {{ $.Values.namespace }}
labels:
app: upload-service
service: upload-service
spec:
replicas: {{ .Values.uploadService.replicaCount }}
strategy:
type: {{ $.Values.strategyType }}
selector:
matchLabels:
app: upload-service
service: upload-service
template:
metadata:
labels:
app: upload-service
service: upload-service
spec:
securityContext:
fsGroup: 1000
runAsUser: 1000
runAsGroup: 1000
containers:
- name: upload-service
image: {{ printf "%s/%s:%s" .Values.uploadService.image.registry .Values.uploadService.image.repository .Values.uploadService.image.tag }}
imagePullPolicy: {{ .Values.uploadService.image.pullPolicy | default "IfNotPresent" }}
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: upload-service-secret
key: aws-access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: upload-service-secret
key: aws-secret-access-key
- name: AWS_REGION
valueFrom:
secretKeyRef:
name: upload-service-secret
key: aws-region
args:
- "--base-path=/api/upload/files/"
- "-s3-endpoint=http://storage-service-s3:9000"
- "-s3-bucket=dbrepo-upload"
ports:
- containerPort: 1080
protocol: TCP
livenessProbe:
httpGet:
port: 1080
readinessProbe:
httpGet:
port: 1080
initialDelaySeconds: 10
periodSeconds: 30
{{- end }}
{{- if .Values.uploadService.enabled }}
---
apiVersion: v1
kind: Secret
metadata:
name: upload-service-secret
namespace: {{ .Values.namespace }}
stringData:
aws-access-key-id: "{{ index .Values "storage-service" "s3" "auth" "username" }}"
aws-secret-access-key: "{{ index .Values "storage-service" "s3" "auth" "password" }}"
aws-region: "default"
{{- end }}
\ No newline at end of file
{{- if .Values.uploadService.enabled }}
---
apiVersion: v1
kind: Service
metadata:
name: upload-service
namespace: {{ $.Values.namespace }}
labels:
service: upload-service
spec:
type: ClusterIP
ports:
- name: "http"
port: 80
targetPort: 1080
protocol: TCP
selector:
service: upload-service
{{- end }}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment