From 5f8e309cc39f8d0c9c8fce5ff6d4071742a6436b Mon Sep 17 00:00:00 2001 From: phuhung273 Date: Tue, 24 Dec 2024 08:50:03 +0000 Subject: [PATCH 1/2] Helm add value metrics.enabled --- helm/aws-load-balancer-controller/README.md | 1 + helm/aws-load-balancer-controller/templates/service.yaml | 2 +- helm/aws-load-balancer-controller/values.yaml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/helm/aws-load-balancer-controller/README.md b/helm/aws-load-balancer-controller/README.md index a86383dbaa..fe956f1a8c 100644 --- a/helm/aws-load-balancer-controller/README.md +++ b/helm/aws-load-balancer-controller/README.md @@ -262,6 +262,7 @@ 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.namespace` | Namespace in which to create the service monitor | None | | `serviceMonitor.additionalLabels` | Labels to add to the service monitor | `{}` | diff --git a/helm/aws-load-balancer-controller/templates/service.yaml b/helm/aws-load-balancer-controller/templates/service.yaml index aad0044ebd..e0073aa544 100644 --- a/helm/aws-load-balancer-controller/templates/service.yaml +++ b/helm/aws-load-balancer-controller/templates/service.yaml @@ -1,4 +1,4 @@ -{{- if.Values.serviceMonitor.enabled }} +{{- if or .Values.serviceMonitor.enabled .Values.metrics.enabled }} apiVersion: v1 kind: Service metadata: diff --git a/helm/aws-load-balancer-controller/values.yaml b/helm/aws-load-balancer-controller/values.yaml index c2f465bcd2..8438a4d72c 100644 --- a/helm/aws-load-balancer-controller/values.yaml +++ b/helm/aws-load-balancer-controller/values.yaml @@ -376,6 +376,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 From e6821f6014e22449ca9a753839ea09e24f9dd9f7 Mon Sep 17 00:00:00 2001 From: phuhung273 Date: Tue, 24 Dec 2024 08:57:01 +0000 Subject: [PATCH 2/2] format doc --- helm/aws-load-balancer-controller/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/helm/aws-load-balancer-controller/README.md b/helm/aws-load-balancer-controller/README.md index fe956f1a8c..4e23566e28 100644 --- a/helm/aws-load-balancer-controller/README.md +++ b/helm/aws-load-balancer-controller/README.md @@ -223,7 +223,7 @@ The default values set by the application itself can be confirmed [here](https:/ | `ingressMaxConcurrentReconciles` | Maximum number of concurrently running reconcile loops for ingress | None | | `logLevel` | Set the controller log level - info, debug | None | | `metricsBindAddr` | The address the metric endpoint binds to | "" | -| `webhookConfig.disableIngressValidation` | Disables the validation of resources of kind Ingress | None | +| `webhookConfig.disableIngressValidation` | Disables the validation of resources of kind Ingress | None | | `webhookBindPort` | The TCP port the Webhook server binds to | None | | `webhookTLS.caCert` | TLS CA certificate for webhook (auto-generated if not provided) | "" | | `webhookTLS.cert` | TLS certificate for webhook (auto-generated if not provided) | "" | @@ -244,7 +244,7 @@ The default values set by the application itself can be confirmed [here](https:/ | `externalManagedTags` | Specifies the list of tag keys on AWS resources that are managed externally | `[]` | | `livenessProbe` | Liveness probe settings for the controller | (see `values.yaml`) | | `env` | Environment variables to set for aws-load-balancer-controller pod | None | -| `envFrom` | Environment variables to set for aws-load-balancer-controller pod from configMap or Secret | None | +| `envFrom` | Environment variables to set for aws-load-balancer-controller pod from configMap or Secret | None | | `envSecretName` | AWS credentials as environment variables from Secret (Secret keys `key_id` and `access_key`). | None | | `hostNetwork` | If `true`, use hostNetwork | `false` | | `dnsPolicy` | Set dnsPolicy if required | `ClusterFirst` | @@ -262,7 +262,7 @@ 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` | +| `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.namespace` | Namespace in which to create the service monitor | None | | `serviceMonitor.additionalLabels` | Labels to add to the service monitor | `{}` | @@ -281,4 +281,4 @@ The default values set by the application itself can be confirmed [here](https:/ | `serviceTargetENISGTags` | set of `key=value` pairs of AWS tags in addition to cluster name for finding the target ENI security group to which to add inbound rules from NLBs | None | | `loadBalancerClass` | Sets the AWS load balancer type to be used when the Kubernetes service requests an external load balancer | `service.k8s.aws/nlb` | | `creator` | if set to a `value!=helm`, it will disable the addition of default helm labels | `helm` | -| `runtimeClassName` | Runtime class name for the controller pods , such as `gvisor` or `kata`. An unspecified `nil` or empty `""` RuntimeClassName is equivalent to the backwards-compatible default behavior as if the RuntimeClass feature is disabled. | "" | +| `runtimeClassName` | Runtime class name for the controller pods , such as `gvisor` or `kata`. An unspecified `nil` or empty `""` RuntimeClassName is equivalent to the backwards-compatible default behavior as if the RuntimeClass feature is disabled. | "" |