From bdfb0a87b247c87a0a75b00a8e272783a20faf03 Mon Sep 17 00:00:00 2001 From: R-Lawton Date: Thu, 4 Jul 2024 17:04:42 +0100 Subject: [PATCH] Updating metrics service name and removing unnessacry patch for metrics port to make limitador operator more inline with authorino-operator --- Makefile | 2 +- config/default/kustomization.yaml | 1 - config/default/manager_metrics_patch.yaml | 13 ------------- config/manager/manager.yaml | 3 +++ config/manager/metrics_service.yaml | 2 +- 5 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 config/default/manager_metrics_patch.yaml diff --git a/Makefile b/Makefile index f40030c7..aac51be0 100644 --- a/Makefile +++ b/Makefile @@ -370,7 +370,7 @@ local-env-setup: ## Prepare environment to run the operator with "make run" ## Miscellaneous Custom targets .PHONY: local-setup -local-setup: export IMG := limitador-operator:dev +local-setup: export IMG := localhost/limitador-operator:dev local-setup: ## Deploy operator in local kind cluster $(MAKE) local-env-setup $(MAKE) docker-build diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 2e2c4512..63bed7a4 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -29,7 +29,6 @@ patchesStrategicMerge: # If you want your controller-manager to expose the /metrics # endpoint w/o any authn/z, please comment the following line. # - manager_auth_proxy_patch.yaml -- manager_metrics_patch.yaml # Mount the controller config file for loading manager configurations # through a ComponentConfig type diff --git a/config/default/manager_metrics_patch.yaml b/config/default/manager_metrics_patch.yaml deleted file mode 100644 index 82b0c633..00000000 --- a/config/default/manager_metrics_patch.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: controller-manager - namespace: system -spec: - template: - spec: - containers: - - name: manager - ports: - - containerPort: 8080 - name: metrics diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 942f07d2..c9e83e44 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -37,6 +37,9 @@ spec: name: manager securityContext: allowPrivilegeEscalation: false + ports: + - name: metrics + containerPort: 8080 livenessProbe: httpGet: path: /healthz diff --git a/config/manager/metrics_service.yaml b/config/manager/metrics_service.yaml index 79a3b23a..1e46eba5 100644 --- a/config/manager/metrics_service.yaml +++ b/config/manager/metrics_service.yaml @@ -4,7 +4,7 @@ kind: Service metadata: labels: control-plane: controller-manager - name: controller-manager-metrics-service + name: metrics namespace: system spec: ports: