Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add serviceMonitor.extraLabels support #1200

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/redis-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: redis-cluster
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
version: 0.16.4
appVersion: "0.16.4"
version: 0.16.5
appVersion: "0.16.5"
home: https://github.com/ot-container-kit/redis-operator
sources:
- https://github.com/ot-container-kit/redis-operator
Expand Down
1 change: 1 addition & 0 deletions charts/redis-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ helm delete <my-release> --namespace <namespace>
| redisExporter.tag | string | `"v1.44.0"` | |
| serviceAccountName | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.extraLabels | object | `{}` | extraLabels are added to the servicemonitor when enabled set to true |
| serviceMonitor.interval | string | `"30s"` | |
| serviceMonitor.namespace | string | `"monitoring"` | |
| serviceMonitor.scrapeTimeout | string | `"10s"` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/redis-cluster/templates/follower-sm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
app.kubernetes.io/instance: {{ .Values.redisCluster.name | default .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: middleware
{{- with .Values.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
3 changes: 3 additions & 0 deletions charts/redis-cluster/templates/leader-sm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
app.kubernetes.io/instance: {{ .Values.redisCluster.name | default .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: middleware
{{- with .Values.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
4 changes: 4 additions & 0 deletions charts/redis-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ serviceMonitor:
interval: 30s
scrapeTimeout: 10s
namespace: monitoring
# -- extraLabels are added to the servicemonitor when enabled set to true
extraLabels: {}
# foo: bar
# team: devops

redisExporter:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions charts/redis-replication/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: redis-replication
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
version: 0.16.6
appVersion: "0.16.6"
version: 0.16.7
appVersion: "0.16.7"
type: application
engine: gotpl
maintainers:
Expand Down
1 change: 1 addition & 0 deletions charts/redis-replication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ helm delete <my-release> --namespace <namespace>
| securityContext | object | `{}` | |
| serviceAccountName | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.extraLabels | object | `{}` | extraLabels are added to the servicemonitor when enabled set to true |
| serviceMonitor.interval | string | `"30s"` | |
| serviceMonitor.namespace | string | `"monitoring"` | |
| serviceMonitor.scrapeTimeout | string | `"10s"` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/redis-replication/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
app.kubernetes.io/instance: {{ .Values.redisReplication.name | default .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: middleware
{{- with .Values.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
4 changes: 4 additions & 0 deletions charts/redis-replication/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ serviceMonitor:
interval: 30s
scrapeTimeout: 10s
namespace: monitoring
# -- extraLabels are added to the servicemonitor when enabled set to true
extraLabels: {}
# foo: bar
# team: devops

redisExporter:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions charts/redis-sentinel/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: redis-sentinel
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
version: 0.16.8
appVersion: "0.16.8"
version: 0.16.9
appVersion: "0.16.9"
home: https://github.com/ot-container-kit/redis-operator
sources:
- https://github.com/ot-container-kit/redis-operator
Expand Down
1 change: 1 addition & 0 deletions charts/redis-sentinel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ helm delete <my-release> --namespace <namespace>
| securityContext | object | `{}` | |
| serviceAccountName | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.extraLabels | object | `{}` | extraLabels are added to the servicemonitor when enabled set to true |
| serviceMonitor.interval | string | `"30s"` | |
| serviceMonitor.namespace | string | `"monitoring"` | |
| serviceMonitor.scrapeTimeout | string | `"10s"` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/redis-sentinel/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
app.kubernetes.io/instance: {{ .Values.redisSentinel.name | default .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: middleware
{{- with .Values.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
4 changes: 4 additions & 0 deletions charts/redis-sentinel/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ serviceMonitor:
interval: 30s
scrapeTimeout: 10s
namespace: monitoring
# -- extraLabels are added to the servicemonitor when enabled set to true
extraLabels: {}
# foo: bar
# team: devops

redisExporter:
enabled: false
Expand Down
4 changes: 2 additions & 2 deletions charts/redis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
apiVersion: v2
name: redis
description: Provides easy redis setup definitions for Kubernetes services, and deployment.
version: 0.16.4
appVersion: "0.16.4"
version: 0.16.5
appVersion: "0.16.5"
home: https://github.com/ot-container-kit/redis-operator
sources:
- https://github.com/ot-container-kit/redis-operator
Expand Down
1 change: 1 addition & 0 deletions charts/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ helm delete <my-release> --namespace <namespace>
| securityContext | object | `{}` | |
| serviceAccountName | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.extraLabels | object | `{}` | extraLabels are added to the servicemonitor when enabled set to true |
| serviceMonitor.interval | string | `"30s"` | |
| serviceMonitor.namespace | string | `"monitoring"` | |
| serviceMonitor.scrapeTimeout | string | `"10s"` | |
Expand Down
3 changes: 3 additions & 0 deletions charts/redis/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ metadata:
app.kubernetes.io/instance: {{ .Values.redisStandalone.name | default .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/component: middleware
{{- with .Values.serviceMonitor.extraLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
selector:
matchLabels:
Expand Down
4 changes: 4 additions & 0 deletions charts/redis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ serviceMonitor:
interval: 30s
scrapeTimeout: 10s
namespace: monitoring
# -- extraLabels are added to the servicemonitor when enabled set to true
extraLabels: {}
# foo: bar
# team: devops

redisExporter:
enabled: false
Expand Down
Loading