Skip to content

Commit

Permalink
adjust configuration for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Disper committed Dec 28, 2023
1 parent eec2f69 commit 91d2248
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 12 deletions.
15 changes: 9 additions & 6 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: namespace
control-plane: infrastructure-manager
app.kubernetes.io/name: infrastructure-manager
app.kubernetes.io/instance: system
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: infrastructure-manager
Expand All @@ -17,10 +17,10 @@ metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
app.kubernetes.io/name: deployment
app.kubernetes.io/instance: controller-manager
app.kubernetes.io/component: manager
control-plane: infrastructure-manager
app.kubernetes.io/name: infrastructure-manager
app.kubernetes.io/instance: infrastructure-manager
app.kubernetes.io/component: infrastructure-manager.kyma-project.io
app.kubernetes.io/created-by: infrastructure-manager
app.kubernetes.io/part-of: infrastructure-manager
app.kubernetes.io/managed-by: kustomize
Expand Down Expand Up @@ -77,6 +77,9 @@ spec:
capabilities:
drop:
- "ALL"
ports:
- containerPort: 8080
name: metrics
livenessProbe:
httpGet:
path: /healthz
Expand Down
23 changes: 23 additions & 0 deletions config/manager/metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Service
metadata:
labels:
control-plane: infrastructure-manager
app.kubernetes.io/name: metrics
app.kubernetes.io/instance: infrastructure-manager
app.kubernetes.io/component: infrastructure-manager.kyma-project.io
app.kubernetes.io/created-by: infrastructure-manager
app.kubernetes.io/part-of: infrastructure-manager
app.kubernetes.io/managed-by: kustomize
name: infrastructure-manager-metrics
namespace: kcp-system
spec:
ports:
- name: metrics
port: 8080
protocol: TCP
appProtocol: http
targetPort: metrics
selector:
app.kubernetes.io/name: infrastructure-manager
app.kubernetes.io/component: infrastructure-manager.kyma-project.io
13 changes: 7 additions & 6 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
control-plane: controller-manager
app.kubernetes.io/name: servicemonitor
app.kubernetes.io/instance: controller-manager-metrics-monitor
control-plane: infrastructure-manager
app.kubernetes.io/name: infrastructure-manager-metrics-monitor
app.kubernetes.io/instance: infrastructure-manager-metrics-monitor
app.kubernetes.io/component: metrics
app.kubernetes.io/created-by: infrastructure-manager
app.kubernetes.io/part-of: infrastructure-manager
Expand All @@ -16,11 +16,12 @@ metadata:
spec:
endpoints:
- path: /metrics
port: https
scheme: https
port: metrics
scheme: http
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
tlsConfig:
insecureSkipVerify: true
selector:
matchLabels:
control-plane: controller-manager
app.kubernetes.io/name: metrics
app.kubernetes.io/component: infrastructure-manager.kyma-project.io

0 comments on commit 91d2248

Please sign in to comment.