added Nextcloud

This commit is contained in:
2024-10-21 23:34:50 +01:00
parent 2bf4c332e5
commit 401f35566b
9 changed files with 169 additions and 0 deletions

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: https://nextcloud.github.io/helm/
version: 6.1.1
digest: sha256:7057ec0c1f4a92a850c29ffa87725bbe1d503af867970c42e17e3ecbbc1fd118
generated: "2024-10-21T22:36:15.165743497+01:00"

View File

@@ -0,0 +1,10 @@
apiVersion: v2
name: nextcloud-linode
description: Deploying nextcloud's helm chart on linode k8s
type: application
version: 0.1.0
appVersion: "30.1"
dependencies:
- name: nextcloud
version: ~6.1
repository: "https://nextcloud.github.io/helm/"

Binary file not shown.

View File

@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "nextcloud-linode.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-linode.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-linode.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "nextcloud-linode.labels" -}}
helm.sh/chart: {{ include "nextcloud-linode.chart" . }}
{{ include "nextcloud-linode.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "nextcloud-linode.selectorLabels" -}}
app.kubernetes.io/name: {{ include "nextcloud-linode.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "nextcloud-linode.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "nextcloud-linode.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,8 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: nextcloud-db
spec:
instances: 3
storage:
size: 4Gi

View File

@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: nextcloud-config
type: Opaque
data:
nc-admin-username: {{ printf "%s" .Values.initialNextcloudAdminUsername | b64enc }}
nc-admin-password: {{ printf "%s" .Values.initialNextcloudAdminPassword | b64enc }}

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

@@ -0,0 +1,36 @@
tailscaleHostName:
initialNextcloudAdminUsername:
initialNextcloudAdminPassword:
nextcloud:
nextcloud:
host:
existingSecret:
enabled: true
secretName: nextcloud-config
usernameKey: nc-admin-username
passwordKey: nc-admin-password
redis:
enabled: true
auth:
enabled: false
cronjob:
enabled: true
internalDatabase:
enabled: false
externalDatabase:
enabled: true
type: postgresql
existingSecret:
enabled: true
secretName: nextcloud-db-app
usernameKey: user
passwordKey: password
databaseKey: dbname
hostKey: host
persistence:
enabled: true
size: 8Gi
nextcloudData:
enabled: true
size: 8Gi