Skip to content

Commit

Permalink
Use unique label and selector for operator objects (#697)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
  • Loading branch information
pavolloffay authored Feb 9, 2022
1 parent 22c3ccf commit 8dfb7a5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/name: opentelemetry-operator
control-plane: controller-manager
name: opentelemetry-operator-controller-manager-metrics-service
spec:
Expand All @@ -12,6 +13,7 @@ spec:
protocol: TCP
targetPort: https
selector:
app.kubernetes.io/name: opentelemetry-operator
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/name: opentelemetry-operator
name: opentelemetry-operator-metrics-reader
rules:
- nonResourceURLs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/name: opentelemetry-operator
name: opentelemetry-operator-webhook-service
spec:
ports:
- port: 443
protocol: TCP
targetPort: 9443
selector:
app.kubernetes.io/name: opentelemetry-operator
control-plane: controller-manager
status:
loadBalancer: {}
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: opentelemetry-operator
control-plane: controller-manager
strategy: {}
template:
metadata:
labels:
app.kubernetes.io/name: opentelemetry-operator
control-plane: controller-manager
spec:
containers:
Expand Down
2 changes: 2 additions & 0 deletions bundle/manifests/opentelemetry.io_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
labels:
app.kubernetes.io/name: opentelemetry-operator
name: instrumentations.opentelemetry.io
spec:
group: opentelemetry.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
labels:
app.kubernetes.io/name: opentelemetry-operator
name: opentelemetrycollectors.opentelemetry.io
spec:
group: opentelemetry.io
Expand Down
4 changes: 2 additions & 2 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ namespace: opentelemetry-operator-system
namePrefix: opentelemetry-operator-

# Labels to add to all resources and selectors.
#commonLabels:
# someName: someValue
commonLabels:
app.kubernetes.io/name: opentelemetry-operator

bases:
- ../crd
Expand Down

0 comments on commit 8dfb7a5

Please sign in to comment.