Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions deployment/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
apiVersion: v2
name: cloud-registry
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.16.0
version: 2.0.0
appVersion: 2.0.0
11 changes: 11 additions & 0 deletions deployment/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Elixir Cloud Service Registry is being deployed!

Once deployed:

1. Access the API via https://{{ .Values.host_name }}/ga4gh/registry/v1/

To test the connection, you can run:

curl -X GET "https://{{ .Values.host_name }}/ga4gh/registry/v1/service-info" -H "Accept: application/json" -H "Authorization: Bearer {TOKEN}"

2. Access the Swagger UI via https://{{ .Values.host_name }}/ga4gh/registry/v1/ui
3 changes: 1 addition & 2 deletions deployment/templates/cloud-registry-configmap-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ spec:
- name: HOST_NAME
value: {{ .Values.host_name }}
- name: MONGO_HOST
value: mongodb-{{ .Values.cloud-registry.appName }}
value: mongodb
restartPolicy: Never
serviceAccountName: {{ .Values.cloud_registry.appName }}-configurer
status: {}
---
apiVersion: v1
kind: ServiceAccount
Expand Down
3 changes: 1 addition & 2 deletions deployment/templates/cloud-registry-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
ports:
- containerPort: 8080
protocol: TCP
resources: {}
resources: {{- toYaml .Values.cloud_registry.resources | nindent 10 }}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
Expand All @@ -47,4 +47,3 @@ spec:
path: config.yaml
name: app-config
name: config-yaml
status:
29 changes: 29 additions & 0 deletions deployment/templates/cloud-registry-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{ if .Values.cloud_registry.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
{{- if .Values.cloud_registry.ingress.https.enabled }}
cert-manager.io/cluster-issuer: {{ .Values.cloud_registry.ingress.https.issuer }}
kubernetes.io/tls-acme: "true"
{{- end }}
name: {{ .Values.cloud_registry.appName }}
spec:
rules:
- host: {{ .Values.host_name }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ .Values.cloud_registry.appName }}
port:
number: 8080
{{- if .Values.cloud_registry.ingress.https.enabled }}
tls:
- hosts:
- {{ .Values.host_name }}
secretName: {{ .Values.cloud_registry.appName }}-ingress-secret
{{- end }}
{{ end }}
4 changes: 1 addition & 3 deletions deployment/templates/cloud-registry-route.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ if .Capabilities.APIVersions.Has "route.openshift.io/v1" }}
{{ if (and (.Capabilities.APIVersions.Has "route.openshift.io/v1") (not .Values.cloud_registry.ingress.enabled)) }}
apiVersion: route.openshift.io/v1
kind: Route
metadata:
Expand All @@ -15,6 +15,4 @@ spec:
name: {{ .Values.cloud_registry.appName }}
weight: 100
wildcardPolicy: None
status:
ingress: []
{{ end }}
2 changes: 0 additions & 2 deletions deployment/templates/cloud-registry-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ spec:
app: {{ .Values.cloud_registry.appName }}
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
9 changes: 7 additions & 2 deletions deployment/templates/mongo-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ spec:
ports:
- containerPort: 27017
protocol: TCP
resources: {}
resources: {{- toYaml .Values.mongodb.resources | nindent 10 }}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/db/
name: mongodb
- name: init-script
mountPath: /docker-entrypoint-initdb.d/init-script.js
subPath: init-script.js
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
Expand All @@ -42,4 +45,6 @@ spec:
- name: mongodb
persistentVolumeClaim:
claimName: mongodb
status:
- name: init-script
configMap:
name: mongo-init-script
21 changes: 21 additions & 0 deletions deployment/templates/mongo-init-script.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mongo-init-script
data:
init-script.js: |
db = db.getSiblingDB('serviceStore');

// Create the 'services' and 'service_info' collections
// Database configuration from https://github.com/elixir-cloud-aai/cloud-registry/blob/fa8a1b0dd1361751574550116150a630035dc199/cloud_registry/config.yaml#L32
db.createCollection('services');
db.services.createIndex(
{ id: 1 },
{ unique: true }
);
db.createCollection('service_info');
db.service_info.createIndex(
{ id: 1 },
{ unique: true }
);

1 change: 0 additions & 1 deletion deployment/templates/mongo-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ spec:
resources:
requests:
storage: {{ .Values.mongodb.volumeSize }}
status:
2 changes: 0 additions & 2 deletions deployment/templates/mongo-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@ spec:
app: mongodb
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
27 changes: 24 additions & 3 deletions deployment/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,35 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

host_name: cloud-registry.rahtiapp.fi
host_name: ""

cloud_registry:
image: elixircloud/cloud-registry:0.1.0
image: elixircloud/cloud-registry:20240716
appName: cloud-registry
# if ingress.enabled: false, it will deploy an OpenShift Route (https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/network_apis/route-route-openshift-io-v1)
ingress:
enabled: true
https:
enabled: false
issuer: letsencrypt-prod
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 128Mi

apiServer: kubernetes.default.svc:443 # address of k8s API server

mongodb:
image: mongo:3.6
image: docker.io/library/mongo:noble
volumeSize: 1Gi
resources:
limits:
cpu: 200m
memory: 512Mi
requests:
cpu: 200m
memory: 512Mi