From 3df61e768cab6e97eb1e98e0d6eb223cad5fa8e0 Mon Sep 17 00:00:00 2001 From: clsv Date: Thu, 25 Apr 2024 01:43:30 +0300 Subject: [PATCH] add port metrics to deployment in examples --- example/operator/all-redis-operator-resources.yaml | 8 +++++--- example/operator/operator.yaml | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/example/operator/all-redis-operator-resources.yaml b/example/operator/all-redis-operator-resources.yaml index 23ff484a6..cabbc8dc7 100644 --- a/example/operator/all-redis-operator-resources.yaml +++ b/example/operator/all-redis-operator-resources.yaml @@ -21,6 +21,10 @@ spec: - image: quay.io/spotahome/redis-operator:latest imagePullPolicy: IfNotPresent name: app + ports: + - containerPort: 9710 + name: metrics + protocol: TCP securityContext: readOnlyRootFilesystem: true runAsNonRoot: true @@ -102,7 +106,7 @@ rules: - leases verbs: - "*" - + --- apiVersion: v1 kind: ServiceAccount @@ -126,7 +130,6 @@ spec: - name: metrics port: 9710 protocol: TCP - targetPort: metrics selector: app: redisoperator --- @@ -149,7 +152,6 @@ spec: - default --- - apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: diff --git a/example/operator/operator.yaml b/example/operator/operator.yaml index def9a3727..21d74a603 100644 --- a/example/operator/operator.yaml +++ b/example/operator/operator.yaml @@ -21,6 +21,10 @@ spec: - image: quay.io/spotahome/redis-operator:latest imagePullPolicy: IfNotPresent name: app + ports: + - containerPort: 9710 + name: metrics + protocol: TCP securityContext: readOnlyRootFilesystem: true runAsNonRoot: true