diff --git a/chart/open-feature-operator/README.md b/chart/open-feature-operator/README.md index a3756ead3..4d0a07cba 100644 --- a/chart/open-feature-operator/README.md +++ b/chart/open-feature-operator/README.md @@ -177,5 +177,6 @@ The command removes all the Kubernetes components associated with the chart and | `controllerManager.replicas` | Sets number of replicas of the OpenFeature operator pod. | `1` | | `managerConfig.flagsValidatonEnabled` | Enables the validating webhook for FeatureFlag CR. | `true` | | `managerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress` | Sets the bind address for health probes. | `:8081` | -| `managerConfig.controllerManagerConfigYaml.metrics.bindAddress` | Sets the bind address for metrics. | `127.0.0.1:8080` | +| `managerConfig.controllerManagerConfigYaml.metrics.bindAddress` | Sets the bind address for metrics (combined with bindPort). | `127.0.0.1` | +| `managerConfig.controllerManagerConfigYaml.metrics.bindPort` | Sets the bind port for metrics. | `8080` | | `managerConfig.controllerManagerConfigYaml.webhook.port` | Sets the bind address for webhook. | `9443` | diff --git a/chart/open-feature-operator/values.yaml b/chart/open-feature-operator/values.yaml index 52ce76074..dfa420bdc 100644 --- a/chart/open-feature-operator/values.yaml +++ b/chart/open-feature-operator/values.yaml @@ -151,9 +151,11 @@ managerConfig: health: ## @param managerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress Sets the bind address for health probes. healthProbeBindAddress: :8081 - metrics: - ## @param managerConfig.controllerManagerConfigYaml.metrics.bindAddress Sets the bind address for metrics. - bindAddress: 127.0.0.1:8080 + metrics: + ## @param managerConfig.controllerManagerConfigYaml.metrics.bindAddress Sets the bind address for metrics (combined with bindPort). + bindAddress: 127.0.0.1 + ## @param managerConfig.controllerManagerConfigYaml.metrics.bindPort Sets the bind port for metrics. + bindPort: 8080 webhook: ## @param managerConfig.controllerManagerConfigYaml.webhook.port Sets the bind address for webhook. port: 9443 diff --git a/config/overlays/helm/controller_manager_config.yaml b/config/overlays/helm/controller_manager_config.yaml index 7c51b9112..e3e870b3a 100644 --- a/config/overlays/helm/controller_manager_config.yaml +++ b/config/overlays/helm/controller_manager_config.yaml @@ -3,6 +3,6 @@ kind: ControllerManagerConfig health: healthProbeBindAddress: "{{ .Values.managerConfig.controllerManagerConfigYaml.health.healthProbeBindAddress }}" metrics: - bindAddress: "{{ .Values.managerConfig.controllerManagerConfigYaml.metrics.bindAddress }}" + bindAddress: "{{ .Values.managerConfig.controllerManagerConfigYaml.metrics.bindAddress }}:{{ .Values.managerConfig.controllerManagerConfigYaml.metrics.bindPort }}" webhook: port: 0{{ .Values.managerConfig.controllerManagerConfigYaml.webhook.port }} diff --git a/config/overlays/helm/manager.yaml b/config/overlays/helm/manager.yaml index 58be452bb..e35ac993e 100644 --- a/config/overlays/helm/manager.yaml +++ b/config/overlays/helm/manager.yaml @@ -22,6 +22,13 @@ spec: requests: cpu: "{{ .Values.controllerManager.manager.resources.requests.cpu }}" memory: "{{ .Values.controllerManager.manager.resources.requests.memory }}" + ports: + - containerPort: "___ {{ .Values.managerConfig.controllerManagerConfigYaml.webhook.port }} ___" + name: webhook-server + protocol: TCP + - containerPort: "___ {{ .Values.managerConfig.controllerManagerConfigYaml.metrics.bindPort }} ___" + name: metrics-server + protocol: TCP env: - name: SIDECAR_MANAGEMENT_PORT value: "{{ .Values.sidecarConfiguration.managementPort }}" @@ -96,6 +103,7 @@ spec: - --sidecar-cpu-request={{ .Values.sidecarConfiguration.resources.requests.cpu }} - --sidecar-ram-request={{ .Values.sidecarConfiguration.resources.requests.memory }} - --image-pull-secrets={{ range .Values.imagePullSecrets }}{{ .name }},{{- end }} + - --metrics-bind-address=:{{ .Values.managerConfig.controllerManagerConfigYaml.metrics.bindPort }} - name: kube-rbac-proxy image: "{{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag }}" resources: