Skip to content

Commit

Permalink
Improve configuring of self-signed certificate
Browse files Browse the repository at this point in the history
Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
  • Loading branch information
sleshchenko committed Jul 26, 2019
1 parent 14e8b0a commit 2de387e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 7 additions & 3 deletions deploy/kubernetes/helm/che/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,21 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- if .Values.global.tls.enabled }}

# If self-signed-cert is used then configure Che Server with certificate content
# to propagate it to trust store
{{- if .Values.global.tls.useSelfSignedCerts }}
- name: CHE_SELF__SIGNED__CERT
valueFrom:
secretKeyRef:
key: ca.crt
name: self-signed-certificate
key: tls.crt
name: {{ .Values.global.tls.secretName }}
optional: false
{{- end }}

# If workspaces are created in different namespace than Che Server's one
# then configure Che Server to propagate TLS secret to workspaces' namespaces
{{- if .Values.global.tls.enabled }}
{{- if ne .Release.Namespace .Values.global.cheWorkspacesNamespace }}
- name: "CHE_INFRA_KUBERNETES_TLS__CERT"
valueFrom:
Expand Down
7 changes: 2 additions & 5 deletions deploy/kubernetes/helm/che/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ global:
## it MUST be pre-created in the configured Che namespace
secretName: che-tls

## If self-signed certificate is enabled
## then certificate from `tls.secretName` will be propagated to Che components' trust stores
useSelfSignedCerts: false
## Name of a secret that contains `ca.crt` entry with public key
## that will be used for checking server certificate
## Note the helm chart does now create this secret and
## it MUST be pre-created in the configured Che namespace
selfSingedCertSecretName: self-signed-cert

gitHubClientID: ""
gitHubClientSecret: ""
Expand Down

0 comments on commit 2de387e

Please sign in to comment.