Skip to content

Commit a425a86

Browse files
committed
Added the ability to be able to configure workspace using an externally created configmap, changed default mount point and path for workspace config
1 parent c786475 commit a425a86

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{- if and (and (.Values.orbital.workspace.enabled) (not (empty .Values.orbital.workspace.config))) ( not (.Values.orbital.workspace.configSuppliedAsConfigMap)) }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ template "orbital.fullname" . }}-workspace-config
6+
data:
7+
workspaces.conf: |
8+
{{ .Values.orbital.workspace.config | nindent 4 }}
9+
{{- end}}

charts/orbital/templates/configmap-orbital.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ kind: ConfigMap
33
metadata:
44
name: {{ template "orbital.fullname" . }}-config
55
data:
6-
{{- if and (.Values.orbital.workspace.enabled) (not (empty .Values.orbital.workspace.config)) }}
7-
workspaces.conf: |
8-
{{ .Values.orbital.workspace.config | nindent 4 }}
9-
{{- end}}
106
{{- if .Values.orbital.project.enabled }}
117
taxi.conf: |
128
{{ .Values.orbital.project.config | nindent 4 }}

charts/orbital/templates/deployment-orbital.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ spec:
112112
mountPath: /opt/service/config
113113
- name: orbital-services-config
114114
mountPath: /opt/service/config/services
115+
- name: orbital-workspace-config
116+
mountPath: /opt/service/config/workspace
115117
{{- if .Values.userDefinedVolumeMounts }}
116118
{{- toYaml .Values.userDefinedVolumeMounts | nindent 10 }}
117119
{{- end }}
@@ -163,6 +165,13 @@ spec:
163165
- name: orbital-config
164166
configMap:
165167
name: {{ template "orbital.fullname" . }}-config
168+
- name: orbital-workspace-config
169+
configMap:
170+
{{- if .Values.orbital.workspace.configSuppliedAsConfigMap }}
171+
name: {{ .Values.orbital.workspace.configMap }}
172+
{{- else }}
173+
name: {{ template "orbital.fullname" . }}-workspace-config
174+
{{- end }}
166175
- name: orbital-services-config
167176
configMap:
168177
name: {{ template "orbital.fullname" . }}-services-config

charts/orbital/values.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ orbital:
6060
}
6161
workspace:
6262
enabled: false
63-
path: /opt/service/config/workspaces.conf
63+
path: /opt/service/config/workspace/workspaces.conf
64+
configSuppliedAsConfigMap: false
65+
configMap: "" #right now only 1 config map is allowed for workspace config
6466
config: |-
6567
git {
6668
# The root directory where all git repositories are cloned to

0 commit comments

Comments
 (0)