Skip to content

Commit

Permalink
fix(metrics-image): adds pullSecrets
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Heinzmann <heinzmann.extern@univention.de>
  • Loading branch information
Tobias Heinzmann committed Apr 27, 2023
1 parent b35eaa3 commit b05595d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
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 b05595d

Please sign in to comment.