|
5 | 5 | Gateway pod template shared by the StatefulSet and Deployment workload shapes. |
6 | 6 | */}} |
7 | 7 | {{- define "openshell.gatewayPodTemplate" -}} |
8 | | -{{- $testing := index .Values "testing" | default (dict) -}} |
9 | | -{{- $externalKubernetesComputeDriver := index $testing "externalKubernetesComputeDriver" | default (dict) -}} |
10 | | -{{- $externalKubernetesComputeDriverSocket := $externalKubernetesComputeDriver.socketPath | default "/var/run/openshell-compute/driver.sock" -}} |
11 | 8 | metadata: |
12 | 9 | annotations: |
13 | 10 | # Roll the gateway workload when the rendered gateway TOML changes - the |
|
81 | 78 | - name: OPENSHELL_TELEMETRY_ENABLED |
82 | 79 | value: {{ .Values.server.telemetryEnabled | quote }} |
83 | 80 | volumeMounts: |
84 | | - {{- if $externalKubernetesComputeDriver.enabled }} |
85 | | - - name: compute-driver-socket |
86 | | - mountPath: {{ dir $externalKubernetesComputeDriverSocket | quote }} |
87 | | - {{- end }} |
88 | 81 | {{- if eq (include "openshell.workloadKind" .) "statefulset" }} |
89 | 82 | - name: openshell-data |
90 | 83 | mountPath: /var/openshell |
@@ -152,47 +145,7 @@ spec: |
152 | 145 | failureThreshold: {{ .Values.probes.readiness.failureThreshold }} |
153 | 146 | resources: |
154 | 147 | {{- toYaml .Values.resources | nindent 8 }} |
155 | | - {{- if $externalKubernetesComputeDriver.enabled }} |
156 | | - - name: kubernetes-compute-driver |
157 | | - securityContext: |
158 | | - {{- toYaml .Values.securityContext | nindent 8 }} |
159 | | - image: {{ include "openshell.image" . | quote }} |
160 | | - imagePullPolicy: {{ .Values.image.pullPolicy }} |
161 | | - command: ["/usr/local/bin/openshell-driver-kubernetes"] |
162 | | - args: |
163 | | - - --bind-socket |
164 | | - - {{ $externalKubernetesComputeDriverSocket | quote }} |
165 | | - - --workspace-mode |
166 | | - - {{ .Values.server.drivers.kubernetes.workspaceMode | default "shared" | quote }} |
167 | | - - --gateway-id |
168 | | - - {{ .Values.server.sandboxJwt.gatewayId | default (include "openshell.fullname" .) | quote }} |
169 | | - - --sandbox-namespace |
170 | | - - {{ include "openshell.sandboxNamespace" . | quote }} |
171 | | - - --sandbox-service-account |
172 | | - - {{ include "openshell.sandboxServiceAccountName" . | quote }} |
173 | | - - --grpc-endpoint |
174 | | - - {{ include "openshell.grpcEndpoint" . | quote }} |
175 | | - - --sandbox-image |
176 | | - - {{ .Values.server.sandboxImage | quote }} |
177 | | - - --supervisor-image |
178 | | - - {{ include "openshell.supervisorImage" . | quote }} |
179 | | - - --supervisor-sideload-method |
180 | | - - {{ include "openshell.supervisorSideloadMethod" . | quote }} |
181 | | - - --topology |
182 | | - - {{ .Values.supervisor.topology | default "combined" | quote }} |
183 | | - - --client-tls-secret-name |
184 | | - - {{ .Values.server.tls.clientTlsSecretName | quote }} |
185 | | - volumeMounts: |
186 | | - - name: compute-driver-socket |
187 | | - mountPath: {{ dir $externalKubernetesComputeDriverSocket | quote }} |
188 | | - resources: |
189 | | - {{- toYaml .Values.resources | nindent 8 }} |
190 | | - {{- end }} |
191 | 148 | volumes: |
192 | | - {{- if $externalKubernetesComputeDriver.enabled }} |
193 | | - - name: compute-driver-socket |
194 | | - emptyDir: {} |
195 | | - {{- end }} |
196 | 149 | - name: gateway-config |
197 | 150 | configMap: |
198 | 151 | name: {{ include "openshell.fullname" . }}-config |
|
0 commit comments