Skip to content

Commit 652ed14

Browse files
committed
feat: add optional service monitor namespace
1 parent ebe1a05 commit 652ed14

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

helm/aws-load-balancer-controller/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: aws-load-balancer-controller
33
description: AWS Load Balancer Controller Helm chart for Kubernetes
4-
version: 1.4.1
4+
version: 1.4.2
55
appVersion: v2.4.1
66
home: https://github.com/aws/eks-charts
77
icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png

helm/aws-load-balancer-controller/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ The following tables lists the configurable parameters of the chart and their de
166166
The default values set by the application itself can be confirmed [here](https://kubernetes-sigs.github.io/aws-load-balancer-controller/guide/controller/configurations/).
167167

168168
| Parameter | Description | Default |
169-
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
169+
|------------------------------------------------| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
170170
| `image.repository` | image repository | `602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-load-balancer-controller` |
171171
| `image.tag` | image tag | `<VERSION>` |
172172
| `image.pullPolicy` | image pull policy | `IfNotPresent` |
@@ -236,4 +236,5 @@ The default values set by the application itself can be confirmed [here](https:/
236236
| `serviceMonitor.enabled` | Specifies whether a service monitor should be created, requires the ServiceMonitor CRD to be installed | `false` |
237237
| `serviceMonitor.additionalLabels` | Labels to add to the service account | `{}` |
238238
| `serviceMonitor.interval` | Prometheus scrape interval | `1m` |
239+
| `serviceMonitor.namespace` | Namespace in which Prometheus is running | `""` |
239240
| `clusterSecretsPermissions.allowAllSecrets` | If `true`, controller has access to all secrets in the cluster. | `false` |

helm/aws-load-balancer-controller/templates/servicemonitor.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ apiVersion: monitoring.coreos.com/v1
33
kind: ServiceMonitor
44
metadata:
55
name: {{ include "aws-load-balancer-controller.fullname" . }}
6+
{{- if .Values.serviceMonitor.namespace }}
7+
namespace: {{ .Values.serviceMonitor.namespace }}
8+
{{- else }}
9+
namespace: {{ .Release.Namespace | quote }}
10+
{{- end }}
611
labels:
712
{{- include "aws-load-balancer-controller.labels" . | nindent 4 }}
813
{{- with .Values.serviceMonitor.additionalLabels }}
@@ -27,4 +32,4 @@ spec:
2732
{{- with .Values.serviceMonitor.interval }}
2833
interval: {{ . }}
2934
{{- end }}
30-
{{- end -}}
35+
{{- end -}}

helm/aws-load-balancer-controller/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ serviceMonitor:
281281
additionalLabels: {}
282282
# Prometheus scrape interval
283283
interval: 1m
284+
# Namespace to create the service monitor in
285+
namespace: ""
284286

285287
# clusterSecretsPermissions lets you configure RBAC permissions for secret resources
286288
# Access to secrets resource is required only if you use the OIDC feature, and instead of

0 commit comments

Comments
 (0)