Skip to content

Commit

Permalink
Add ability to set up Che workspace and postgress pvc class names us…
Browse files Browse the repository at this point in the history
…ing helm. (#15677)

*  Add ability to set up Che workspace and postgress pvc names using helm.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* improve helm value chePostgresPVCStorageClassName location

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>

* Fix indent in the yaml.

Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com>
  • Loading branch information
AndrienkoAleksandr committed Jan 16, 2020
1 parent 0df8423 commit d13f9d3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ che.infra.kubernetes.pvc.strategy=common
# Note that this property has effect only if the 'common' PVC strategy used.
che.infra.kubernetes.pvc.precreate_subpaths=true

# Defines the name of Persistent Volume Claim for che workspaces.
# Defines the settings of PVC name for che workspaces.
# Each PVC strategy suplies this value differently.
# See doc for che.infra.kubernetes.pvc.strategy property
che.infra.kubernetes.pvc.name=claim-che-workspace

# Defines the storage class of Persistent Volume Claim for the workspaces.
Expand Down Expand Up @@ -392,7 +394,7 @@ che.infra.kubernetes.client.http.async_requests.max=1000
che.infra.kubernetes.client.http.async_requests.max_per_host=1000

# Max number of idle connections in the connection pool
# of the Kubernetes-client shared http client
# of the Kubernetes-client shared http client
che.infra.kubernetes.client.http.connection_pool.max_idle=5

# Keep-alive timeout of the connection pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ metadata:
io.kompose.service: postgres-data
name: postgres-data
spec:
{{- if .Values.global.chePostgresPVCStorageClassName }}
storageClassName: {{ .Values.global.chePostgresPVCStorageClassName }}
{{- end }}
accessModes:
- ReadWriteOnce
resources:
Expand Down
1 change: 1 addition & 0 deletions deploy/kubernetes/helm/che/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ data:
CHE_INFRA_KUBERNETES_PVC_STRATEGY: "{{ .Values.global.cheWorkspacesPVCStrategy }}"
CHE_INFRA_KUBERNETES_PVC_QUANTITY: {{ .Values.global.pvcClaim }}
CHE_INFRA_KUBERNETES_PVC_PRECREATE__SUBPATHS: "true"
CHE_INFRA_KUBERNETES_PVC_STORAGE__CLASS__NAME: "{{ .Values.global.cheWorkspacePVCStorageClassName }}"
CHE_INFRA_KUBERNETES_POD_SECURITY__CONTEXT_RUN__AS__USER: "{{ .Values.global.securityContext.runAsUser }}"
CHE_INFRA_KUBERNETES_POD_SECURITY__CONTEXT_FS__GROUP: "{{ .Values.global.securityContext.fsGroup }}"
CHE_LOCAL_CONF_DIR: /etc/conf
Expand Down
4 changes: 4 additions & 0 deletions deploy/kubernetes/helm/che/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ global:
# Possible values: common, per-workspace, unique
cheWorkspacesPVCStrategy: "common"
pvcClaim: "1Gi"
# Defines the storage class of Persistent Volume Claim(s) for the workspaces.
cheWorkspacePVCStorageClassName: ""
cheWorkspacesNamespace: "<username>-che"
# Service account name that will be mounted to workspaces pods
# Note that:
Expand All @@ -81,6 +83,8 @@ global:
runAsUser: 1724
fsGroup: 1724
postgresDebugLogs: false
# Defines the storage class of Persistent Volume Claim for Postgres database.
chePostgresPVCStorageClassName: ""
cheDevfileRegistryUrlFormat: "devfile-registry-%s.%s"
chePluginRegistryUrlFormat: "plugin-registry-%s.%s"

Expand Down

0 comments on commit d13f9d3

Please sign in to comment.