Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add custom CA certificate injection #171

Merged
merged 3 commits into from
Jun 22, 2022
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
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