Skip to content

Commit 19f664f

Browse files
authored
Update Helm Chart (#53)
* Update Helm Chart * Fix image * Fix * Add Ingress. Edit Route and Values * Fix mongo init script * Add resources in cloud-registry deployment
1 parent aef5914 commit 19f664f

12 files changed

Lines changed: 97 additions & 34 deletions

deployment/Chart.yaml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,6 @@
11
apiVersion: v2
22
name: cloud-registry
33
description: A Helm chart for Kubernetes
4-
5-
# A chart can be either an 'application' or a 'library' chart.
6-
#
7-
# Application charts are a collection of templates that can be packaged into versioned archives
8-
# to be deployed.
9-
#
10-
# Library charts provide useful utilities or functions for the chart developer. They're included as
11-
# a dependency of application charts to inject those utilities and functions into the rendering
12-
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
134
type: application
14-
15-
# This is the chart version. This version number should be incremented each time you make changes
16-
# to the chart and its templates, including the app version.
17-
version: 0.1.0
18-
19-
# This is the version number of the application being deployed. This version number should be
20-
# incremented each time you make changes to the application.
21-
appVersion: 1.16.0
5+
version: 2.0.0
6+
appVersion: 2.0.0

deployment/templates/NOTES.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Elixir Cloud Service Registry is being deployed!
2+
3+
Once deployed:
4+
5+
1. Access the API via https://{{ .Values.host_name }}/ga4gh/registry/v1/
6+
7+
To test the connection, you can run:
8+
9+
curl -X GET "https://{{ .Values.host_name }}/ga4gh/registry/v1/service-info" -H "Accept: application/json" -H "Authorization: Bearer {TOKEN}"
10+
11+
2. Access the Swagger UI via https://{{ .Values.host_name }}/ga4gh/registry/v1/ui

deployment/templates/cloud-registry-configmap-job.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ spec:
2929
- name: HOST_NAME
3030
value: {{ .Values.host_name }}
3131
- name: MONGO_HOST
32-
value: mongodb-{{ .Values.cloud-registry.appName }}
32+
value: mongodb
3333
restartPolicy: Never
3434
serviceAccountName: {{ .Values.cloud_registry.appName }}-configurer
35-
status: {}
3635
---
3736
apiVersion: v1
3837
kind: ServiceAccount

deployment/templates/cloud-registry-deploy.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ spec:
2727
ports:
2828
- containerPort: 8080
2929
protocol: TCP
30-
resources: {}
30+
resources: {{- toYaml .Values.cloud_registry.resources | nindent 10 }}
3131
terminationMessagePath: /dev/termination-log
3232
terminationMessagePolicy: File
3333
volumeMounts:
@@ -47,4 +47,3 @@ spec:
4747
path: config.yaml
4848
name: app-config
4949
name: config-yaml
50-
status:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{{ if .Values.cloud_registry.ingress.enabled }}
2+
apiVersion: networking.k8s.io/v1
3+
kind: Ingress
4+
metadata:
5+
annotations:
6+
{{- if .Values.cloud_registry.ingress.https.enabled }}
7+
cert-manager.io/cluster-issuer: {{ .Values.cloud_registry.ingress.https.issuer }}
8+
kubernetes.io/tls-acme: "true"
9+
{{- end }}
10+
name: {{ .Values.cloud_registry.appName }}
11+
spec:
12+
rules:
13+
- host: {{ .Values.host_name }}
14+
http:
15+
paths:
16+
- path: /
17+
pathType: Prefix
18+
backend:
19+
service:
20+
name: {{ .Values.cloud_registry.appName }}
21+
port:
22+
number: 8080
23+
{{- if .Values.cloud_registry.ingress.https.enabled }}
24+
tls:
25+
- hosts:
26+
- {{ .Values.host_name }}
27+
secretName: {{ .Values.cloud_registry.appName }}-ingress-secret
28+
{{- end }}
29+
{{ end }}

deployment/templates/cloud-registry-route.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ if .Capabilities.APIVersions.Has "route.openshift.io/v1" }}
1+
{{ if (and (.Capabilities.APIVersions.Has "route.openshift.io/v1") (not .Values.cloud_registry.ingress.enabled)) }}
22
apiVersion: route.openshift.io/v1
33
kind: Route
44
metadata:
@@ -15,6 +15,4 @@ spec:
1515
name: {{ .Values.cloud_registry.appName }}
1616
weight: 100
1717
wildcardPolicy: None
18-
status:
19-
ingress: []
2018
{{ end }}

deployment/templates/cloud-registry-service.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,3 @@ spec:
1212
app: {{ .Values.cloud_registry.appName }}
1313
sessionAffinity: None
1414
type: ClusterIP
15-
status:
16-
loadBalancer: {}

deployment/templates/mongo-deploy.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ spec:
2727
ports:
2828
- containerPort: 27017
2929
protocol: TCP
30-
resources: {}
30+
resources: {{- toYaml .Values.mongodb.resources | nindent 10 }}
3131
terminationMessagePath: /dev/termination-log
3232
terminationMessagePolicy: File
3333
volumeMounts:
3434
- mountPath: /data/db/
3535
name: mongodb
36+
- name: init-script
37+
mountPath: /docker-entrypoint-initdb.d/init-script.js
38+
subPath: init-script.js
3639
dnsPolicy: ClusterFirst
3740
restartPolicy: Always
3841
schedulerName: default-scheduler
@@ -42,4 +45,6 @@ spec:
4245
- name: mongodb
4346
persistentVolumeClaim:
4447
claimName: mongodb
45-
status:
48+
- name: init-script
49+
configMap:
50+
name: mongo-init-script
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: mongo-init-script
5+
data:
6+
init-script.js: |
7+
db = db.getSiblingDB('serviceStore');
8+
9+
// Create the 'services' and 'service_info' collections
10+
// Database configuration from https://github.com/elixir-cloud-aai/cloud-registry/blob/fa8a1b0dd1361751574550116150a630035dc199/cloud_registry/config.yaml#L32
11+
db.createCollection('services');
12+
db.services.createIndex(
13+
{ id: 1 },
14+
{ unique: true }
15+
);
16+
db.createCollection('service_info');
17+
db.service_info.createIndex(
18+
{ id: 1 },
19+
{ unique: true }
20+
);
21+

deployment/templates/mongo-pvc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ spec:
88
resources:
99
requests:
1010
storage: {{ .Values.mongodb.volumeSize }}
11-
status:

0 commit comments

Comments
 (0)