Tryout adding HPB sidecart to nextcloud (#655)

* tryout adding HPB sidecart

* env array

* no need to encode a configmap and add service

* no message

* allow some more dns names

* try adding a wait to the hpb container if hpb doesn't exist

* fix quotes

* hmm

* cleaner command

* try again

* spaces bracets

* try syntaxis change

* typo

* try some polish
This commit is contained in:
Kjeld Schouten-Lebbing
2021-07-04 19:39:33 +02:00
committed by GitHub
parent 0dc4170f46
commit b1379db693
3 changed files with 43 additions and 2 deletions

View File

@@ -35,4 +35,4 @@ sources:
- https://github.com/nextcloud/docker
- https://github.com/nextcloud/helm
type: application
version: 1.0.20
version: 1.0.21

View File

@@ -17,9 +17,17 @@ kind: ConfigMap
metadata:
name: nextcloudconfig
data:
NEXTCLOUD_TRUSTED_DOMAINS: {{ ( printf "%v %v %v" "test.fakedomain.dns" ( .Values.env.NODE_IP | default "localhost" ) $hosts ) | quote }}
NEXTCLOUD_TRUSTED_DOMAINS: {{ ( printf "%v %v %v %v %v" "test.fakedomain.dns" ( .Values.env.NODE_IP | default "localhost" ) ( printf "%v-%v" .Release.Name "nextcloud" ) ( printf "%v-%v" .Release.Name "nextcloud-hpb" ) $hosts ) | quote }}
{{- if .Values.ingress.main.enabled }}
APACHE_DISABLE_REWRITE_IP: "1"
{{- end }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: hpbconfig
data:
NEXTCLOUD_URL: {{ ( printf "%v-%v" .Release.Name "nextcloud" ) | quote }}
{{- end -}}

View File

@@ -13,6 +13,12 @@ service:
ports:
main:
port: 80
hpb:
enabled: true
ports:
hpb:
enabled: true
port: 7867
env:
NEXTCLOUD_ADMIN_USER: "admin"
@@ -84,6 +90,33 @@ initContainers:
name: dbcreds
key: plainhost
additionalContainers:
- name: hpb
image: nextcloud:21.0.2
imagePullPolicy: IfNotPresent
command:
- "/bin/bash"
- "-c"
- "--"
args:
- 'while [ ! -f "/var/www/html/custom_apps/notify_push/bin/x86_64/notify_push" ]; do sleep 30; echo "notify_push not found, waiting"; done && /var/www/html/custom_apps/notify_push/bin/x86_64/notify_push /var/www/html/config/config.php'
env:
- name: PORT
value: "7867"
envFrom:
- configMapRef:
name: hpbconfig
ports:
- name: hpb
containerPort: 7867
volumeMounts:
- mountPath: /var/www/html
name: data
securityContext:
runAsUser: 33
runAsGroup: 33
podSecurityContext:
fsGroup: 33