-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nextcloud): Add support of imaginary an externalPreviewProvider
Signed-off-by: WrenIX <[email protected]>
- Loading branch information
Showing
8 changed files
with
259 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
charts/nextcloud/files/defaultConfigs/imaginary.config.php.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
$CONFIG = array ( | ||
'preview_imaginary_url' => 'http://{{ template "nextcloud.fullname" . }}-imaginary', | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{{- if .Values.imaginary.enabled }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "nextcloud.fullname" . }}-imaginary | ||
labels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
helm.sh/chart: {{ include "nextcloud.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/component: imaginary | ||
spec: | ||
replicas: {{ .Values.imaginary.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: imaginary | ||
template: | ||
metadata: | ||
annotations: | ||
{{- toYaml .Values.imaginary.podAnnotations | nindent 8 }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: imaginary | ||
{{- with .Values.imaginary.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.imaginary.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- range . }} | ||
- name: {{ . }} | ||
{{- end}} | ||
{{- end }} | ||
containers: | ||
- name: imaginary | ||
{{- with .Values.imaginary.image }} | ||
image: "{{ .registry }}/{{ .repository }}:{{ .tag }}" | ||
imagePullPolicy: {{ .pullPolicy }} | ||
{{- end }} | ||
env: | ||
- name: PORT | ||
value: "9000" | ||
ports: | ||
- name: http | ||
containerPort: 9000 | ||
{{- with .Values.imaginary.readinessProbe }} | ||
{{- if .enabled }} | ||
readinessProbe: | ||
httpGet: | ||
path: /health | ||
port: http | ||
scheme: HTTP | ||
failureThreshold: {{ .failureThreshold }} | ||
successThreshold: {{ .successThreshold }} | ||
periodSeconds: {{ .periodSeconds }} | ||
timeoutSeconds: {{ .timeoutSeconds }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .Values.imaginary.livenessProbe }} | ||
{{- if .enabled }} | ||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: http | ||
scheme: HTTP | ||
failureThreshold: {{ .failureThreshold }} | ||
successThreshold: {{ .successThreshold }} | ||
periodSeconds: {{ .periodSeconds }} | ||
timeoutSeconds: {{ .timeoutSeconds }} | ||
{{- end }} | ||
{{- end }} | ||
{{- with .Values.imaginary.resources }} | ||
resources: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.imaginary.securityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.imaginary.podSecurityContext }} | ||
securityContext: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{- if .Values.imaginary.enabled }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "nextcloud.fullname" . }}-imaginary | ||
labels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
helm.sh/chart: {{ include "nextcloud.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/component: imaginary | ||
{{- with .Values.imaginary.service.labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.imaginary.service.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.imaginary.service.type }} | ||
{{- with .Values.imaginary.service.loadBalancerIP }} | ||
loadBalancerIP: {{ . }} | ||
{{- end }} | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: http | ||
{{- with .Values.imaginary.service.nodePort }} | ||
nodePort: {{ . }} | ||
{{- end }} | ||
selector: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: imaginary | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
nextcloud: | ||
defaultConfigs: | ||
imaginary.config.php: true | ||
configs: | ||
previews.config.php: |- | ||
<?php | ||
$CONFIG = array( | ||
'enabledPreviewProviders' => array( | ||
0 => 'OC\\Preview\\Imaginary', | ||
1 => 'OC\\Preview\\ImaginaryPDF', | ||
); | ||
imaginary: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters