Skip to content

Commit

Permalink
chore: add custom CA certificate injection (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski authored Jun 22, 2022
1 parent 1142d3a commit 5024dc3
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,7 @@ examples-private/
# Cypress
acceptance-tests/cypress/screenshots
acceptance-tests/cypress/videos

# Helm requirements lock files
helm-chart/amalthea/requirements.lock
helm-chart/amalthea/Chart.lock
5 changes: 5 additions & 0 deletions helm-chart/amalthea/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ apiVersion: v2
name: amalthea
description: A helm chart for deploying the amalthea jupyter server operator

dependencies:
- name: certificates
version: "0.0.2"
repository: "https://swissdatasciencecenter.github.io/helm-charts/"

# 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
Expand Down
5 changes: 5 additions & 0 deletions helm-chart/amalthea/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ spec:
serviceAccountName: {{ include "amalthea.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
{{- include "certificates.initContainer" . | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand Down Expand Up @@ -88,17 +90,20 @@ spec:
value: {{ .Values.metrics.port | quote }}
- name: METRICS_EXTRA_LABELS
value: {{ .Values.metrics.extraMetricsLabels | toJson | quote }}
{{- include "certificates.env.python" . | nindent 12 }}
{{- if .Values.scheduler.enable}}
- name: SERVER_SCHEDULER_NAME
value: {{ include "amalthea.fullname" . }}-scheduler
{{- end }}
volumeMounts:
- name: config
mountPath: /app/config
{{- include "certificates.volumeMounts.system" . | nindent 12 }}
volumes:
- name: config
configMap:
name: {{ include "amalthea.fullname" . }}-config
{{- include "certificates.volumes" . | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/amalthea/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -454,5 +454,5 @@
],
"title": "Values",
"type": "object",
"additionalProperties": false
"additionalProperties": true
}
13 changes: 13 additions & 0 deletions helm-chart/amalthea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

global:
# Specify a secret that containes the certificate
# if you would like to use a custom CA. The key for the secret
# should have the .crt extension otherwise it is ignored. The
# keys across all secrets are mounted as files in one location so
# the keys across all secrets have to be unique.
certificates:
image:
repository: renku/certificates
tag: "0.0.1"
customCAs: []
# - secret:

# Indicate the scope which this operator watches for
# JupyterServer resources.
scope:
Expand Down

0 comments on commit 5024dc3

Please sign in to comment.