-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdeployment.yaml
111 lines (99 loc) · 4.29 KB
/
deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{{ if .Values.features.appsIntegration.enabled }}
{{- range $officeSuite := .Values.features.appsIntegration.wopiIntegration.officeSuites }}
{{ if $officeSuite.enabled }}
{{- include "ocis.basicServiceTemplates" (dict "scope" $ "appName" "appNameAppProvider" "appNameSuffix" (regexReplaceAll "\\W+" (lower $officeSuite.name) "-")) -}}
---
apiVersion: apps/v1
kind: Deployment
{{ include "ocis.metadata" $ }}
spec:
{{- include "ocis.selector" $ | nindent 2 }}
replicas: 1 #TODO: https://github.com/owncloud/ocis-charts/issues/48
{{- include "ocis.deploymentStrategy" $ | nindent 2 }}
template:
{{- include "ocis.templateMetadata" (dict "scope" $ "configCheck" false) | nindent 4 }}
spec:
{{- include "ocis.serviceAccount" $ | nindent 6 }}
{{- include "ocis.affinity" $.Values.services.appprovider | nindent 6 }}
{{- include "ocis.securityContextAndtopologySpreadConstraints" $ | nindent 6 }}
containers:
- name: {{ $.appName }}
{{- include "ocis.image" $ | nindent 10 }}
command: ["ocis"]
args: ["app-provider", "server"]
{{- include "ocis.containerSecurityContext" $ | nindent 10 }}
env:
{{- include "ocis.serviceRegistry" $ | nindent 12 }}
- name: APP_PROVIDER_LOG_COLOR
value: {{ $.Values.logging.color | quote }}
- name: APP_PROVIDER_LOG_LEVEL
value: {{ $.Values.logging.level | quote }}
- name: APP_PROVIDER_LOG_PRETTY
value: {{ $.Values.logging.pretty | quote }}
- name: APP_PROVIDER_TRACING_ENABLED
value: "{{ $.Values.tracing.enabled }}"
- name: APP_PROVIDER_TRACING_TYPE
value: {{ $.Values.tracing.type | quote }}
- name: APP_PROVIDER_TRACING_ENDPOINT
value: {{ $.Values.tracing.endpoint | quote }}
- name: APP_PROVIDER_TRACING_COLLECTOR
value: {{ $.Values.tracing.collector | quote }}
- name: APP_PROVIDER_DEBUG_PPROF
value: "{{ $.Values.debug.profiling }}"
- name: APP_PROVIDER_GRPC_ADDR
value: 0.0.0.0:9164
- name: APP_PROVIDER_DEBUG_ADDR
value: 0.0.0.0:9165
- name: APP_PROVIDER_SERVICE_NAME
value: "{{ $.appName }}"
- name: APP_PROVIDER_EXTERNAL_ADDR
value: "com.owncloud.api.{{ $.appName }}"
- name: APP_PROVIDER_DRIVER
value: wopi
- name: APP_PROVIDER_WOPI_APP_NAME
value: {{ $officeSuite.name | quote }}
- name: APP_PROVIDER_WOPI_APP_ICON_URI
value: {{ $officeSuite.iconURI | quote }}
- name: APP_PROVIDER_WOPI_APP_URL
value: {{ $officeSuite.uri | quote }}
- name: APP_PROVIDER_WOPI_INSECURE
value: {{ $officeSuite.insecure | quote }}
{{- with $officeSuite.disableChat }}
- name: APP_PROVIDER_WOPI_DISABLE_CHAT
value: {{ $officeSuite.disableChat | quote }}
{{- end }}
- name: APP_PROVIDER_WOPI_WOPI_SERVER_EXTERNAL_URL
value: {{ $.Values.features.appsIntegration.wopiIntegration.wopiServerURI | quote }}
- name: APP_PROVIDER_WOPI_FOLDER_URL_BASE_URL
value: {{ tpl $.Values.features.appsIntegration.wopiIntegration.wopiFolderURI $ | quote }}
- name: APP_PROVIDER_JWT_SECRET
valueFrom:
secretKeyRef:
name: {{ include "secrets.jwtSecret" $ }}
key: jwt-secret
livenessProbe:
exec:
command:
- /bin/sh
- -c
- curl --silent --fail http://frontend:9140/app/list | grep {{ $officeSuite.name }}
timeoutSeconds: 10
initialDelaySeconds: 60
periodSeconds: 20
failureThreshold: 3
resources: {{ toYaml $.resources | nindent 12 }}
ports:
- name: grpc
containerPort: 9164
- name: metrics-debug
containerPort: 9165
volumeMounts:
- name: tmp-volume
mountPath: /tmp
{{- include "ocis.imagePullSecrets" $ | nindent 6 }}
volumes:
- name: tmp-volume
emptyDir: {}
{{ end }}
{{ end }}
{{ end }}