Skip to content

Commit

Permalink
Merge pull request #389 from tarhann/fix/metrics-image-pullsecrets
Browse files Browse the repository at this point in the history
fix(metrics-image): add pullSecrets
  • Loading branch information
provokateurin authored Apr 27, 2023
2 parents b35eaa3 + 58a3e50 commit e99a041
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 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: 3.5.10
version: 3.5.11
appVersion: 26.0.1
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
47 changes: 24 additions & 23 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,29 +238,30 @@ Persistent Volume Claims are used to keep the data across deployments. This is k

We include an optional experimental Nextcloud Metrics exporter from [xperimental/nextcloud-exporter](https://github.com/xperimental/nextcloud-exporter).

| Parameter | Description | Default |
|----------------------------------------|---------------------------------------------------------------------------------|--------------------------------------------------------------|
| `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.tlsSkipVerify` | Skips certificate verification of Nextcloud server | `false` |
| `metrics.image.repository` | Nextcloud metrics exporter image name | `xperimental/nextcloud-exporter` |
| `metrics.image.tag` | Nextcloud metrics exporter image tag | `0.6.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 |
| `metrics.service.type` | Metrics: Kubernetes Service type | `ClusterIP` |
| `metrics.service.loadBalancerIP` | Metrics: LoadBalancerIp for service type LoadBalancer | `nil` |
| `metrics.service.nodePort` | Metrics: NodePort for service type NodePort | `nil` |
| `metrics.service.annotations` | Additional annotations for service metrics exporter | `{prometheus.io/scrape: "true", prometheus.io/port: "9205"}` |
| `metrics.service.labels` | Additional labels for service metrics exporter | `{}` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `` |
| `metrics.serviceMonitor.jobLabel` | Name of the label on the target service to use as the job name in prometheus | `` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `` |
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{} |
| Parameter | Description | Default |
|----------------------------------------|------------------------------------------------------------------------------|--------------------------------------------------------------|
| `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.tlsSkipVerify` | Skips certificate verification of Nextcloud server | `false` |
| `metrics.image.repository` | Nextcloud metrics exporter image name | `xperimental/nextcloud-exporter` |
| `metrics.image.tag` | Nextcloud metrics exporter image tag | `0.6.0` |
| `metrics.image.pullPolicy` | Nextcloud metrics exporter image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Nextcloud metrics exporter image pull secrets | `nil` |
| `metrics.podAnnotations` | Additional annotations for metrics exporter | not set |
| `metrics.podLabels` | Additional labels for metrics exporter | not set |
| `metrics.service.type` | Metrics: Kubernetes Service type | `ClusterIP` |
| `metrics.service.loadBalancerIP` | Metrics: LoadBalancerIp for service type LoadBalancer | `nil` |
| `metrics.service.nodePort` | Metrics: NodePort for service type NodePort | `nil` |
| `metrics.service.annotations` | Additional annotations for service metrics exporter | `{prometheus.io/scrape: "true", prometheus.io/port: "9205"}` |
| `metrics.service.labels` | Additional labels for service metrics exporter | `{}` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using PrometheusOperator | `false` |
| `metrics.serviceMonitor.namespace` | Namespace in which Prometheus is running | `` |
| `metrics.serviceMonitor.jobLabel` | Name of the label on the target service to use as the job name in prometheus | `` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `metrics.serviceMonitor.scrapeTimeout` | Specify the timeout after which the scrape is ended | `` |
| `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{} |



Expand Down
6 changes: 6 additions & 0 deletions charts/nextcloud/templates/metrics-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ spec:
{{ toYaml .Values.metrics.podLabels | indent 8 }}
{{- end }}
spec:
{{- if .Values.metrics.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.metrics.image.pullSecrets }}
- name: {{ . }}
{{- end}}
{{- end }}
containers:
- name: metrics-exporter
image: "{{ .Values.metrics.image.repository }}:{{ .Values.metrics.image.tag }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ metrics:
repository: xperimental/nextcloud-exporter
tag: 0.6.0
pullPolicy: IfNotPresent
# pullSecrets:
# - myRegistrKeySecretName

## Metrics exporter resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
Expand Down

0 comments on commit e99a041

Please sign in to comment.