Skip to content

Commit

Permalink
Fix metrics service selector labels
Browse files Browse the repository at this point in the history
  • Loading branch information
rm3l committed Jan 7, 2025
1 parent e7dde5f commit 8997860
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: service
app.kubernetes.io/part-of: backstage-operator
control-plane: controller-manager
name: backstage-operator-metrics-service
spec:
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ metadata:
}
}
]
createdAt: "2025-01-07T13:28:03Z"
createdAt: "2025-01-07T13:47:21Z"
description: Backstage Operator
operators.operatorframework.io/builder: operator-sdk-v1.37.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
Expand Down Expand Up @@ -169,6 +169,7 @@ spec:
deployments:
- label:
app: operator
control-plane: controller-manager
name: backstage-operator
spec:
replicas: 1
Expand All @@ -183,6 +184,7 @@ spec:
kubectl.kubernetes.io/default-container: manager
labels:
app: operator
control-plane: controller-manager
spec:
affinity:
nodeAffinity:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ metadata:
categories: Developer Tools
certified: "true"
containerImage: registry.redhat.io/rhdh/rhdh-rhel9-operator:1.5
createdAt: "2025-01-07T13:28:05Z"
createdAt: "2025-01-07T13:47:23Z"
description: Red Hat Developer Hub is a Red Hat supported version of Backstage.
It comes with pre-built plug-ins and configuration settings, supports use of
an external database, and can help streamline the process of setting up a self-managed
Expand Down Expand Up @@ -212,6 +212,7 @@ spec:
deployments:
- label:
app: rhdh-operator
control-plane: controller-manager
name: rhdh-operator
spec:
replicas: 1
Expand All @@ -228,6 +229,7 @@ spec:
app: rhdh-operator
app.kubernetes.io/component: rhdh-operator
app.kubernetes.io/managed-by: olm
control-plane: controller-manager
spec:
affinity:
nodeAffinity:
Expand Down
2 changes: 1 addition & 1 deletion bundle/rhdh/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ annotations:
operators.operatorframework.io.bundle.mediatype.v1: registry+v1
operators.operatorframework.io.bundle.manifests.v1: manifests/
operators.operatorframework.io.bundle.metadata.v1: metadata/
operators.operatorframework.io.bundle.package.v1: backstage-operator
operators.operatorframework.io.bundle.package.v1: rhdh
operators.operatorframework.io.bundle.channels.v1: fast,fast-${CI_X_VERSION}.${CI_Y_VERSION}
operators.operatorframework.io.bundle.channel.default.v1: fast
operators.operatorframework.io.metrics.builder: operator-sdk-v1.37.0
Expand Down
2 changes: 2 additions & 0 deletions config/manager/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
name: operator
labels:
app: operator
control-plane: controller-manager
spec:
replicas: 1
selector:
Expand All @@ -17,6 +18,7 @@ spec:
kubectl.kubernetes.io/default-container: manager
labels:
app: operator
control-plane: controller-manager
spec:
# Required because the operator does not work without a Service Account Token
automountServiceAccountToken: true # NOSONAR
Expand Down
4 changes: 4 additions & 0 deletions config/profile/rhdh/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ patches:
target:
kind: Deployment
name: operator
- path: patches/metrics-service-patch.yaml
target:
kind: Service
name: operator-metrics-service

generatorOptions:
disableNameSuffixHash: true
Expand Down
9 changes: 9 additions & 0 deletions config/profile/rhdh/patches/metrics-service-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: rhdh-operator
name: operator-metrics-service
spec:
selector:
app: rhdh-operator
6 changes: 4 additions & 2 deletions config/prometheus/monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: controller
control-plane: controller-manager
app.kubernetes.io/name: backstage-operator
app.kubernetes.io/managed-by: kustomize
name: operator-metrics-monitor
namespace: system
spec:
Expand All @@ -16,4 +18,4 @@ spec:
insecureSkipVerify: true
selector:
matchLabels:
app: operator
control-plane: controller-manager
1 change: 1 addition & 0 deletions config/rbac/metrics_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Service
metadata:
labels:
app: operator
control-plane: controller-manager
app.kubernetes.io/name: service
app.kubernetes.io/instance: controller-manager-metrics-service
app.kubernetes.io/component: metrics
Expand Down

0 comments on commit 8997860

Please sign in to comment.