Added postinstall for nextcloud
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: nc-syncthing-postinstall
|
||||
namespace: {{ .Values.argocd.namespace }}
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
notifications.argoproj.io/subscribe.on-sync-succeeded.telegram: "-1002270587578"
|
||||
spec:
|
||||
project: {{ .Values.argocd.project }}
|
||||
source:
|
||||
repoURL: {{ .Values.argocd.postinstall.repoURL }}
|
||||
targetRevision: {{ .Values.argocd.postinstall.targetRevision }}
|
||||
path: {{ .Values.argocd.postinstall.path }}
|
||||
helm:
|
||||
releaseName: nc-syncthing-postinstall
|
||||
valuesObject:
|
||||
tailscaleIngresses:
|
||||
odooHostname: {{ .Values.tailscaleIngresses.ncHostname }}
|
||||
destination:
|
||||
server: {{ .Values.destination.server }}
|
||||
namespace: {{ .Values.destination.namespace }}
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true # Automatically remove resources no longer in the repo
|
||||
selfHeal: true # Automatically self-heal when drift is detected
|
||||
syncOptions:
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
- CreateNamespace=true
|
||||
@@ -1,6 +1,10 @@
|
||||
argocd:
|
||||
namespace: argocd
|
||||
project: default
|
||||
postinstall:
|
||||
repoURL: "https://git.blarre.net/thomas/helm-charts.git"
|
||||
targetRevision: HEAD
|
||||
path: nc-syncthing-postinstall
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
|
||||
23
nextcloud-syncthing-postinstall/.helmignore
Normal file
23
nextcloud-syncthing-postinstall/.helmignore
Normal 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/
|
||||
5
nextcloud-syncthing-postinstall/Chart.yaml
Normal file
5
nextcloud-syncthing-postinstall/Chart.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: nextcloud-syncthing-postinstall
|
||||
description: A Helm chart for deploying the nc and syncthing ingresses
|
||||
type: application
|
||||
version: 0.1.0
|
||||
62
nextcloud-syncthing-postinstall/templates/_helpers.tpl
Normal file
62
nextcloud-syncthing-postinstall/templates/_helpers.tpl
Normal file
@@ -0,0 +1,62 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "nextcloud-syncthing-postinstall.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-syncthing-postinstall.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-syncthing-postinstall.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "nextcloud-syncthing-postinstall.labels" -}}
|
||||
helm.sh/chart: {{ include "nextcloud-syncthing-postinstall.chart" . }}
|
||||
{{ include "nextcloud-syncthing-postinstall.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "nextcloud-syncthing-postinstall.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "nextcloud-syncthing-postinstall.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "nextcloud-syncthing-postinstall.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "nextcloud-syncthing-postinstall.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
16
nextcloud-syncthing-postinstall/templates/nc-ingress.yaml
Normal file
16
nextcloud-syncthing-postinstall/templates/nc-ingress.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ts-nextcloud
|
||||
annotations:
|
||||
tailscale.com/funnel: "true"
|
||||
spec:
|
||||
defaultBackend:
|
||||
service:
|
||||
name: nextcloud
|
||||
port:
|
||||
name: http
|
||||
ingressClassName: tailscale
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.tailscaleIngresses.ncHostname }}
|
||||
3
nextcloud-syncthing-postinstall/values.yaml
Normal file
3
nextcloud-syncthing-postinstall/values.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
tailscaleIngresses:
|
||||
ncHostname: nextcloud
|
||||
syncthingHostname: syncthing
|
||||
Reference in New Issue
Block a user