Skip to content

Commit

Permalink
Merge pull request #19 from controlplaneio-fluxcd/sm-labels
Browse files Browse the repository at this point in the history
Add labels config for service monitor
  • Loading branch information
stefanprodan authored Jul 2, 2024
2 parents 9e34295 + 1b2b765 commit 8d11309
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/flux-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ see the Flux Operator [documentation](https://fluxcd.control-plane.io/operator/)
| resources | object | `{"limits":{"cpu":"1000m","memory":"1Gi"},"requests":{"cpu":"100m","memory":"64Mi"}}` | Container resources requests and limits settings. |
| securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"seccompProfile":{"type":"RuntimeDefault"}}` | Container security context settings. The default is compliant with the pod security restricted profile. |
| serviceAccount | object | `{"automount":true,"create":true,"name":""}` | Pod service account settings. The name of the service account defaults to the release name. |
| serviceMonitor | object | `{"create":false,"interval":"60s","scrapeTimeout":"30s"}` | Prometheus Operator scraping settings. |
| serviceMonitor | object | `{"create":false,"interval":"60s","labels":{},"scrapeTimeout":"30s"}` | Prometheus Operator scraping settings. |
| tolerations | list | `[]` | Pod tolerations settings. |

## Source Code
Expand Down
3 changes: 3 additions & 0 deletions charts/flux-operator/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ metadata:
{{- with .Values.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceMonitor.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/flux-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@
"interval": {
"type": "string"
},
"labels": {
"properties": {},
"type": "object"
},
"scrapeTimeout": {
"type": "string"
}
Expand Down
1 change: 1 addition & 0 deletions charts/flux-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ serviceMonitor: # @schema default: {"create":false,"interval":"60s","scrapeTimeo
create: false
interval: 60s
scrapeTimeout: 30s
labels: { }

# -- Marketplace settings.
marketplace:
Expand Down

0 comments on commit 8d11309

Please sign in to comment.