Skip to content

Commit 8679a4a

Browse files
committed
Don't unnecessarily take ownership of PersistentVolumes and PersistentVolumeClaims
# Conflicts: # bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml
1 parent 5000892 commit 8679a4a

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

.chloggen/fix_dont-own-volumes.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: bug_fix
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5+
component: collector
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Don't unnecessarily take ownership of PersistentVolumes and PersistentVolumeClaims
9+
10+
# One or more tracking issues related to the change
11+
issues: [3042]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext:

bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ metadata:
9999
categories: Logging & Tracing,Monitoring
100100
certified: "false"
101101
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
102-
createdAt: "2024-08-21T12:36:08Z"
102+
createdAt: "2024-08-27T07:26:20Z"
103103
description: Provides the OpenTelemetry components, including the Collector
104104
operators.operatorframework.io/builder: operator-sdk-v1.29.0
105105
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
@@ -262,8 +262,6 @@ spec:
262262
- ""
263263
resources:
264264
- configmaps
265-
- persistentvolumeclaims
266-
- persistentvolumes
267265
- pods
268266
- serviceaccounts
269267
- services

bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ metadata:
9999
categories: Logging & Tracing,Monitoring
100100
certified: "false"
101101
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
102-
createdAt: "2024-08-21T12:36:11Z"
102+
createdAt: "2024-08-27T07:26:23Z"
103103
description: Provides the OpenTelemetry components, including the Collector
104104
operators.operatorframework.io/builder: operator-sdk-v1.29.0
105105
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
@@ -262,8 +262,6 @@ spec:
262262
- ""
263263
resources:
264264
- configmaps
265-
- persistentvolumeclaims
266-
- persistentvolumes
267265
- pods
268266
- serviceaccounts
269267
- services

config/rbac/role.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ rules:
88
- ""
99
resources:
1010
- configmaps
11-
- persistentvolumeclaims
12-
- persistentvolumes
1311
- pods
1412
- serviceaccounts
1513
- services

controllers/opentelemetrycollector_controller.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func NewReconciler(p Params) *OpenTelemetryCollectorReconciler {
199199
return r
200200
}
201201

202-
// +kubebuilder:rbac:groups="",resources=pods;configmaps;services;serviceaccounts;persistentvolumeclaims;persistentvolumes,verbs=get;list;watch;create;update;patch;delete
202+
// +kubebuilder:rbac:groups="",resources=pods;configmaps;services;serviceaccounts,verbs=get;list;watch;create;update;patch;delete
203203
// +kubebuilder:rbac:groups="",resources=events,verbs=create;patch
204204
// +kubebuilder:rbac:groups=apps,resources=daemonsets;deployments;statefulsets,verbs=get;list;watch;create;update;patch;delete
205205
// +kubebuilder:rbac:groups=autoscaling,resources=horizontalpodautoscalers,verbs=get;list;watch;create;update;patch;delete
@@ -297,8 +297,6 @@ func (r *OpenTelemetryCollectorReconciler) SetupWithManager(mgr ctrl.Manager) er
297297
Owns(&appsv1.Deployment{}).
298298
Owns(&appsv1.DaemonSet{}).
299299
Owns(&appsv1.StatefulSet{}).
300-
Owns(&corev1.PersistentVolume{}).
301-
Owns(&corev1.PersistentVolumeClaim{}).
302300
Owns(&networkingv1.Ingress{}).
303301
Owns(&autoscalingv2.HorizontalPodAutoscaler{}).
304302
Owns(&policyV1.PodDisruptionBudget{})

0 commit comments

Comments
 (0)