Skip to content

Commit

Permalink
Merge pull request #184 from mrueg/nextcloud-exp-0.5.0
Browse files Browse the repository at this point in the history
Update nextcloud-exporter to 0.5.0
  • Loading branch information
tvories authored Feb 2, 2022
2 parents ba7a105 + 9165d15 commit b11ce6c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 2.11.3
version: 2.12.0
appVersion: 22.2.3
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
3 changes: 2 additions & 1 deletion charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ The following table lists the configurable parameters of the nextcloud chart and
| `podAnnotations` | Annotations to be added at 'pod' level | not set |
| `metrics.enabled` | Start Prometheus metrics exporter | `false` |
| `metrics.https` | Defines if https is used to connect to nextcloud | `false` (uses http) |
| `metrics.token` | Uses token for auth instead of username/password | `""` |
| `metrics.timeout` | When the scrape times out | `5s` |
| `metrics.image.repository` | Nextcloud metrics exporter image name | `xperimental/nextcloud-exporter` |
| `metrics.image.tag` | Nextcloud metrics exporter image tag | `v0.4.0` |
| `metrics.image.tag` | Nextcloud metrics exporter image tag | `v0.5.0` |
| `metrics.image.pullPolicy` | Nextcloud metrics exporter image pull policy | `IfNotPresent` |
| `metrics.podAnnotations` | Additional annotations for metrics exporter | not set |
| `metrics.podLabels` | Additional labels for metrics exporter | not set |
Expand Down
8 changes: 8 additions & 0 deletions charts/nextcloud/templates/metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ spec:
image: "{{ .Values.metrics.image.repository }}:{{ .Values.metrics.image.tag }}"
imagePullPolicy: {{ .Values.metrics.image.pullPolicy }}
env:
{{- if .Values.metrics.token }}
- name: NEXTCLOUD_TOKEN
valueFrom:
secretKeyRef:
name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }}
key: {{ .Values.nextcloud.existingSecret.tokenKey | default "nextcloud-token" }}
{{- else }}
- name: NEXTCLOUD_USERNAME
valueFrom:
secretKeyRef:
Expand All @@ -42,6 +49,7 @@ spec:
secretKeyRef:
name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }}
key: {{ .Values.nextcloud.existingSecret.passwordKey | default "nextcloud-password" }}
{{- end }}
- name: NEXTCLOUD_SERVER
value: http{{ if .Values.metrics.https }}s{{ end }}://{{ .Values.nextcloud.host }}
- name: NEXTCLOUD_TIMEOUT
Expand Down
11 changes: 8 additions & 3 deletions charts/nextcloud/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ metadata:
type: Opaque
data:
nextcloud-username: {{ .Values.nextcloud.username | b64enc | quote }}
{{ if .Values.nextcloud.password }}
{{- if .Values.nextcloud.password }}
nextcloud-password: {{ .Values.nextcloud.password | b64enc | quote }}
{{ else }}
{{- else }}
nextcloud-password: {{ randAlphaNum 10 | b64enc | quote }}
{{ end }}
{{- end }}
{{- if .Values.metrics.token }}
nextcloud-token: {{ .Values.metrics.token | b64enc | quote }}
{{- else }}
nextcloud-token: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }}
{{- if .Values.nextcloud.mail.enabled }}
smtp-username: {{ default "" .Values.nextcloud.mail.smtp.name | b64enc | quote }}
smtp-password: {{ default "" .Values.nextcloud.mail.smtp.password | b64enc | quote }}
Expand Down
7 changes: 6 additions & 1 deletion charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ nextcloud:
# secretName: nameofsecret
# usernameKey: username
# passwordKey: password
# tokenKey: serverinfo_token
# smtpUsernameKey: smtp_username
# smtpPasswordKey: smtp_password
update: 0
Expand Down Expand Up @@ -419,11 +420,15 @@ metrics:
replicaCount: 1
# The metrics exporter needs to know how you serve Nextcloud either http or https
https: false
# Use API token if set, otherwise fall back to password authentication
# https://github.com/xperimental/nextcloud-exporter#token-authentication
# Currently you still need to set the token manually in your nextcloud install
token: ""
timeout: 5s

image:
repository: xperimental/nextcloud-exporter
tag: v0.4.0
tag: v0.5.0
pullPolicy: IfNotPresent

## Metrics exporter resource requests and limits
Expand Down

0 comments on commit b11ce6c

Please sign in to comment.