Skip to content

Commit

Permalink
Enable Prom metrics without service monitor
Browse files Browse the repository at this point in the history
Allows monitoring with alternate Prometheus collectors on EKS
clusters that don't have Prometheus Operator/ServiceMonitor CRD
  • Loading branch information
prashcr committed Dec 13, 2023
1 parent 64f624b commit bcbb386
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion helm/aws-load-balancer-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,12 @@ The default values set by the application itself can be confirmed [here](https:/
| `disableRestrictedSecurityGroupRules` | If disabled, controller will not specify port range restriction in the backend security group rules | `false` |
| `objectSelector.matchExpressions` | Webhook configuration to select specific pods by specifying the expression to be matched | None |
| `objectSelector.matchLabels` | Webhook configuration to select specific pods by specifying the key value label pair to be matched | None |
| `metrics.enabled` | Specifies whether the Prometheus metrics service should be created, independent of service monitor | `false` |
| `serviceMonitor.enabled` | Specifies whether a service monitor should be created, requires the ServiceMonitor CRD to be installed | `false` |
| `serviceMonitor.additionalLabels` | Labels to add to the service account | `{}` |
| `serviceMonitor.interval` | Prometheus scrape interval | `1m` |
| `serviceMonitor.namespace` | Namespace in which Prometheus is running | None |
| `clusterSecretsPermissions.allowAllSecrets` | If `true`, controller has access to all secrets in the cluster. | `false` |
| `controllerConfig.featureGates` | set of `key: value` pairs that describe AWS load balance controller features | `{}` |
| `ingressClassConfig.default` | If `true`, the ingressclass will be the default class of the cluster. | `false` |
| `enableServiceMutatorWebhook` | If `false`, disable the Service Mutator webhook which makes all new services of type LoadBalancer reconciled by the lb controller | `true` |
| `enableServiceMutatorWebhook` | If `false`, disable the Service Mutator webhook which makes all new services of type LoadBalancer reconciled by the lb controller | `true` |
2 changes: 1 addition & 1 deletion helm/aws-load-balancer-controller/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if.Values.serviceMonitor.enabled }}
{{- if or .Values.serviceMonitor.enabled .Values.metrics.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand Down
4 changes: 4 additions & 0 deletions helm/aws-load-balancer-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ objectSelector:
matchLabels:
# key: value

metrics:
# Specifies whether the Prometheus metrics service should be created, independent of service monitor
enabled: false

serviceMonitor:
# Specifies whether a service monitor should be created
enabled: false
Expand Down

0 comments on commit bcbb386

Please sign in to comment.