6 Commits

9 changed files with 193 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
# name: ts-nextcloud
# annotations:
# tailscale.com/funnel: "false"
# spec:
# defaultBackend:
# service:
# name: {{ .Release.Name }}
# port:
# number: 8080
# ingressClassName: tailscale
# tls:
# - hosts:
# - "{{ .Values.tailscaleHostName }}"

View File

@@ -25,7 +25,7 @@ nextcloud:
enabled: true
secretName: nextcloud-db-app
usernameKey: user
passwordKey: password
passwordKey: password
databaseKey: dbname
hostKey: host
persistence:
@@ -34,3 +34,36 @@ nextcloud:
nextcloudData:
enabled: true
size: 8Gi
image:
flavor: fpm
nginx:
enabled: true
ingress:
className: nginx
annotations:
nginx.ingress.kubernetes.io/server-snippet: |-
server_tokens off;
proxy_hide_header X-Powered-By;
rewrite ^/.well-known/webfinger /index.php/.well-known/webfinger last;
rewrite ^/.well-known/nodeinfo /index.php/.well-known/nodeinfo last;
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json;
location = /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location = /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:autotest|occ|issue|indie|db_|console) {
deny all;
}
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For"

View File

@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

View File

@@ -0,0 +1,6 @@
dependencies:
- name: nextcloud
repository: oci://tccr.io/truecharts
version: 30.1.25
digest: sha256:474884a5d58fdabf0b9c21920b601d76b20c12dbcfb747bdf79572ea279dd332
generated: "2024-10-22T13:29:47.712320248Z"

View File

@@ -0,0 +1,10 @@
apiVersion: v2
name: nextcloud-truechart
description: Chart over the nextcloud chart from truecharts
type: application
version: 0.1.0
appVersion: "30"
dependencies:
- name: nextcloud
version: ~30
repository: "oci://tccr.io/truecharts"

Binary file not shown.

View File

@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "nextcloud-truechart.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nextcloud-truechart.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "nextcloud-truechart.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "nextcloud-truechart.labels" -}}
helm.sh/chart: {{ include "nextcloud-truechart.chart" . }}
{{ include "nextcloud-truechart.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "nextcloud-truechart.selectorLabels" -}}
app.kubernetes.io/name: {{ include "nextcloud-truechart.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "nextcloud-truechart.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "nextcloud-truechart.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@@ -3,14 +3,14 @@ kind: Ingress
metadata:
name: ts-nextcloud
annotations:
tailscale.com/funnel: "false"
tailscale.com/funnel: "{{ .Values.tailscaleIngress.funnel }}"
spec:
defaultBackend:
service:
name: {{ .Release.Name }}
name: main
port:
number: 8080
ingressClassName: tailscale
tls:
- hosts:
- "{{ .Values.tailscaleHostName }}"
- "{{ .Values.tailscaleIngress.host }}"

View File

@@ -0,0 +1,39 @@
tailscaleIngress:
host: nextcloud-tc
funnel: "false"
nextcloud:
nextcloud:
credentials:
initialAdminUser: admin
initialAdminPassword: changeme
general:
default_phone_region: FR
clamav:
enabled: true
collabora:
enabled: true
username: admin
password: changeme
persistence:
html:
type: pvc
storageClass: linode-block-storage
size: 4Gi
config:
type: pvc
storageClass: linode-block-storage-retain
size: 100Mi
data:
type: pvc
storageClass: linode-block-storage-retain
size: 10Gi
cnpg:
main:
user: nextcloud
database: nextcloud
redis:
username: default
ingress:
main:
required: false