diff --git a/CHANGELOG.md b/CHANGELOG.md index 11247d637..dd91c6aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ ### Fixed Bugs +- [PR #156](https://github.com/Orange-OpenSource/nifikop/pull/156) - **[Helm chart]** Operator metrics port configuration + ## v0.7.2 ### Added diff --git a/helm/nifikop/README.md b/helm/nifikop/README.md index d87d90a3b..0beb3dcce 100644 --- a/helm/nifikop/README.md +++ b/helm/nifikop/README.md @@ -30,7 +30,8 @@ The following tables lists the configurable parameters of the NiFi Operator Helm | `certManager.enabled` | Enable cert-manager integration | `true` | | `rbacEnable` | If true, create & use RBAC resources | `true` | | `resources` | Pod resource requests & limits | `{}` | -| `metricService` | deploy service for metrics | `false` | +| `metrics.enabled` | deploy service for metrics | `false` | +| `metrics.port` | Set port for operator metrics | `8081` | | `debug.enabled` | activate DEBUG log level | `false` | | `certManager.clusterScoped` | If true setup cluster scoped resources | `false` | | `namespaces` | List of namespaces where Operator watches for custom resources. Make sure the operator ServiceAccount is granted `get` permissions on this `Node` resource when using limited RBACs. | `""` i.e. all namespaces | diff --git a/helm/nifikop/templates/deployment.yaml b/helm/nifikop/templates/deployment.yaml index badfe9280..bddaae3a1 100644 --- a/helm/nifikop/templates/deployment.yaml +++ b/helm/nifikop/templates/deployment.yaml @@ -66,6 +66,7 @@ spec: - command: - /manager args: + - metrics-bind-address={{.Values.metrics.port}} - --leader-elect {{- if .Values.certManager.enabled }} - --cert-manager-enabled={{ .Values.certManager.enabled }} diff --git a/helm/nifikop/templates/service.yaml b/helm/nifikop/templates/service.yaml index e3e9bd667..60c908bf4 100644 --- a/helm/nifikop/templates/service.yaml +++ b/helm/nifikop/templates/service.yaml @@ -1,4 +1,4 @@ -{{- if .Values.metricService }} +{{- if .Values.metrics.enabled }} apiVersion: v1 kind: Service metadata: @@ -14,6 +14,6 @@ spec: app: {{ template "nifikop.name" . }} ports: - name: metrics - port: 9710 + port: {{ .Values.metrics.port }} protocol: TCP {{- end }} \ No newline at end of file diff --git a/helm/nifikop/values.yaml b/helm/nifikop/values.yaml index 08bf545c7..f60b3d0aa 100644 --- a/helm/nifikop/values.yaml +++ b/helm/nifikop/values.yaml @@ -36,8 +36,10 @@ rbacEnable: true serviceAccount: create: true -## if true deploy service for metrics access -metricService: false +metrics: + ## if true deploy service for metrics access + enabled: false + port: 8081 debug: enabled: false diff --git a/site/docs/2_setup/3_install/1_customizable_install_with_helm.md b/site/docs/2_setup/3_install/1_customizable_install_with_helm.md index 002f05a55..6e5a97b78 100644 --- a/site/docs/2_setup/3_install/1_customizable_install_with_helm.md +++ b/site/docs/2_setup/3_install/1_customizable_install_with_helm.md @@ -40,7 +40,8 @@ The following tables lists the configurable parameters of the NiFi Operator Helm | `certManager.enabled` | Enable cert-manager integration | `true` | | `rbacEnable` | If true, create & use RBAC resources | `true` | | `resources` | Pod resource requests & limits | `{}` | -| `metricService` | deploy service for metrics | `false` | +| `metrics.enabled` | deploy service for metrics | `false` | +| `metrics.port` | Set port for operator metrics | `8081` | | `debug.enabled` | activate DEBUG log level | `false` | | `certManager.clusterScoped` | If true setup cluster scoped resources | `false` | | `namespaces` | List of namespaces where Operator watches for custom resources. Make sure the operator ServiceAccount is granted `get` permissions on this `Node` resource when using limited RBACs. | `""` i.e. all namespaces |