-
Notifications
You must be signed in to change notification settings - Fork 269
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 notify_push support
Signed-off-by: Jesse Hitch <[email protected]> Signed-off-by: WrenIX <[email protected]>
- Loading branch information
Showing
14 changed files
with
286 additions
and
72 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
/var/www/html/occ app:install notify_push | ||
/var/www/html/occ notify_push:setup --server "https://{{ .Values.nextcloud.host }}{{ .Values.notifyPush.ingress.path }}" |
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
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 |
---|---|---|
@@ -1,35 +1,38 @@ | ||
{{- if .Values.metrics.enabled }} | ||
{{- with .Values.metrics.service }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "nextcloud.fullname" . }}-metrics | ||
name: {{ template "nextcloud.fullname" $ }}-metrics | ||
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/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: metrics | ||
{{- with .Values.metrics.service.labels }} | ||
app.kubernetes.io/monitor: enabled | ||
{{- with .labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.metrics.service.annotations }} | ||
{{- with .annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .Values.metrics.service.type }} | ||
{{- if eq .Values.metrics.service.type "LoadBalancer" }} | ||
{{- with .Values.metrics.service.loadBalancerIP }} | ||
type: {{ .type }} | ||
{{- if eq .type "LoadBalancer" }} | ||
{{- with .loadBalancerIP }} | ||
loadBalancerIP: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
selector: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" $ }} | ||
app.kubernetes.io/instance: {{ $.Release.Name }} | ||
app.kubernetes.io/component: metrics | ||
ports: | ||
- name: metrics | ||
port: 9205 | ||
port: 9100 | ||
targetPort: metrics | ||
selector: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: metrics | ||
{{- end }} | ||
{{- end }} |
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
{{- if and .Values.notifyPush.enabled .Values.notifyPush.autoSetup }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "nextcloud.fullname" . }}-notify-push | ||
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 }} | ||
data: | ||
hook.sh: |- | ||
{{- tpl (.Files.Get "files/notify_push.sh.tpl" ) . | nindent 4 }} | ||
{{- 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,70 @@ | ||
{{- if .Values.notifyPush.enabled }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "nextcloud.fullname" . }}-notify-push | ||
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: notify-push | ||
spec: | ||
replicas: {{ .Values.notifyPush.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: notify-push | ||
template: | ||
metadata: | ||
annotations: | ||
{{- toYaml .Values.notifyPush.podAnnotations | nindent 8 }} | ||
labels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/component: notify-push | ||
{{- with .Values.notifyPush.podLabels }} | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.notifyPush.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- range . }} | ||
- name: {{ . }} | ||
{{- end}} | ||
{{- end }} | ||
containers: | ||
- name: notify-push | ||
{{- with .Values.notifyPush.image }} | ||
image: "{{ .registry }}/{{ .repository }}:{{ .tag }}" | ||
imagePullPolicy: {{ .pullPolicy }} | ||
{{- end }} | ||
env: | ||
- name: PORT | ||
value: "7867" | ||
- name: METRICS_PORT | ||
value: "9867" | ||
- name: DATABASE_URL | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.externalDatabase.existingSecret.secretName | default (printf "%s-db" .Release.Name) }} | ||
key: {{ .Values.externalDatabase.existingSecret.databaseURLKey }} | ||
- name: REDIS_URL | ||
value: "redis://{{ if .Values.redis.auth.enabled }}:{{ .Values.redis.auth.password }}@{{ end }}{{ template "nextcloud.redis.fullname" . }}-master:{{ .Values.redis.master.service.ports.redis }}" | ||
- name: NEXTCLOUD_URL # deployment.namespace.svc.cluster.local | ||
value: "http{{ if .Values.notifyPush.https }}s{{ end }}://{{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}" | ||
ports: | ||
- name: http | ||
containerPort: 7867 | ||
- name: metrics | ||
containerPort: 9867 | ||
{{- with .Values.notifyPush.resources }} | ||
resources: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsNonRoot: true | ||
{{- 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,41 @@ | ||
{{- if .Values.notifyPush.enabled }} | ||
{{- with .Values.notifyPush.service }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "nextcloud.fullname" $ }}-notify-push | ||
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: notify-push | ||
app.kubernetes.io/monitor: enabled | ||
{{- with .labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
type: {{ .type }} | ||
{{- if eq .type "LoadBalancer" }} | ||
{{- with .loadBalancerIP }} | ||
loadBalancerIP: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
selector: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" $ }} | ||
app.kubernetes.io/instance: {{ $.Release.Name }} | ||
app.kubernetes.io/component: notify-push | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: http | ||
- name: metrics | ||
port: 9100 | ||
targetPort: metrics | ||
{{- 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,41 @@ | ||
{{- with .Values.prometheus.serviceMonitor }} | ||
{{- if .enabled }} | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ template "nextcloud.fullname" $ }} | ||
namespace: {{ .namespace | default $.Release.Namespace | quote }} | ||
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 }} | ||
{{- with .labels }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
jobLabel: {{ .jobLabel | quote }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "nextcloud.name" $ }} | ||
app.kubernetes.io/instance: {{ $.Release.Name }} | ||
app.kubernetes.io/monitor: enabled | ||
namespaceSelector: | ||
{{- with .namespaceSelector }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- else }} | ||
matchNames: | ||
- {{ $.Release.Namespace | quote }} | ||
{{- end }} | ||
endpoints: | ||
- port: metrics | ||
path: "/metrics" | ||
{{- with .interval }} | ||
interval: {{ . }} | ||
{{- end }} | ||
{{- with .scrapeTimeout }} | ||
scrapeTimeout: {{ . }} | ||
{{- end }} | ||
{{- 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,2 @@ | ||
notifyPush: | ||
enabled: true |
Oops, something went wrong.