Skip to content

Commit b1956c7

Browse files
authored
chore(discovery): replace Endpoints with EndpointSlices (#1094)
1 parent de69cfe commit b1956c7

10 files changed

+50
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ interacting with the deployed Cryostat instance(s).
133133
When using the web-client, users can login with their username and password associated with their OpenShift account. User credentials will be remembered for the duration of the session.
134134

135135
If the current user account does not have sufficient permissions to list
136-
routes, list endpoints, or perform other actions that Cryostat requires,
136+
routes, list endpointslices, or perform other actions that Cryostat requires,
137137
then the user may also try to authenticate using the Operator's service
138138
account. This, of course, assumes that the user has permission to view this
139139
service account's secrets.

bundle/manifests/cryostat-operator-cryostat-namespaced_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ metadata:
77
name: cryostat-operator-cryostat-namespaced
88
rules:
99
- apiGroups:
10-
- ""
10+
- discovery.k8s.io
1111
resources:
12-
- endpoints
12+
- endpointslices
1313
verbs:
1414
- get
1515
- list

bundle/manifests/cryostat-operator-oauth-client_rbac.authorization.k8s.io_v1_clusterrole.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ rules:
3030
- ""
3131
resources:
3232
- replicationcontrollers
33-
- endpoints
3433
verbs:
3534
- get
35+
- apiGroups:
36+
- discovery.k8s.io
37+
resources:
38+
- endpointslices
39+
verbs:
40+
- get
41+
- list
42+
- watch
3643
- apiGroups:
3744
- apps
3845
resources:

bundle/manifests/cryostat-operator.clusterserviceversion.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ metadata:
2424
capabilities: Seamless Upgrades
2525
categories: Monitoring, Developer Tools
2626
containerImage: quay.io/cryostat/cryostat-operator:4.1.0-dev
27-
createdAt: "2025-05-14T20:50:18Z"
27+
createdAt: "2025-06-12T14:26:29Z"
2828
description: JVM monitoring and profiling tool
2929
operatorframework.io/initialization-resource: |-
3030
{
@@ -949,7 +949,6 @@ spec:
949949
- ""
950950
resources:
951951
- configmaps
952-
- endpoints
953952
- events
954953
- persistentvolumeclaims
955954
- pods
@@ -1049,6 +1048,14 @@ spec:
10491048
- get
10501049
- list
10511050
- update
1051+
- apiGroups:
1052+
- discovery.k8s.io
1053+
resources:
1054+
- endpointslices
1055+
verbs:
1056+
- get
1057+
- list
1058+
- watch
10521059
- apiGroups:
10531060
- networking.k8s.io
10541061
resources:

config/rbac/cryostat_namespaced_role.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ rules:
1212
- list
1313
- watch
1414
apiGroups:
15-
- ''
15+
- discovery.k8s.io
1616
resources:
17-
- endpoints
17+
- endpointslices
1818
- verbs:
1919
- get
2020
apiGroups:

config/rbac/oauth_client.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ rules:
2929
- ""
3030
resources:
3131
- replicationcontrollers
32-
- endpoints
3332
verbs:
3433
- get
34+
- apiGroups:
35+
- discovery.k8s.io
36+
resources:
37+
- endpointslices
38+
verbs:
39+
- get
40+
- list
41+
- watch
3542
- apiGroups:
3643
- apps
3744
resources:

config/rbac/role.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ rules:
88
- ""
99
resources:
1010
- configmaps
11-
- endpoints
1211
- events
1312
- persistentvolumeclaims
1413
- pods
@@ -108,6 +107,14 @@ rules:
108107
- get
109108
- list
110109
- update
110+
- apiGroups:
111+
- discovery.k8s.io
112+
resources:
113+
- endpointslices
114+
verbs:
115+
- get
116+
- list
117+
- watch
111118
- apiGroups:
112119
- networking.k8s.io
113120
resources:

internal/controllers/cryostat_controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ func NewCryostatReconciler(config *ReconcilerConfig) (*CryostatReconciler, error
4949
// +kubebuilder:rbac:groups=operator.cryostat.io,resources=cryostats,verbs=*
5050
// +kubebuilder:rbac:groups=operator.cryostat.io,resources=cryostats/status,verbs=get;update;patch
5151
// +kubebuilder:rbac:groups=operator.cryostat.io,resources=cryostats/finalizers,verbs=update
52-
// +kubebuilder:rbac:groups="",resources=pods;services;services/finalizers;endpoints;persistentvolumeclaims;events;configmaps;secrets;serviceaccounts,verbs=*
52+
// +kubebuilder:rbac:groups="",resources=pods;services;services/finalizers;persistentvolumeclaims;events;configmaps;secrets;serviceaccounts,verbs=*
53+
// +kubebuilder:rbac:groups=discovery.k8s.io,resources=endpointslices,verbs=get;list;watch
5354
// +kubebuilder:rbac:groups="",resources=replicationcontrollers,verbs=get
5455
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings,verbs=create;get;list;update;watch;delete
5556
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=clusterrolebindings,verbs=create;get;list;update;watch;delete

internal/images/custom-scorecard-tests/rbac/scorecard_role.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,18 @@ rules:
8080
- patch
8181
- delete
8282
- get
83+
- apiGroups:
84+
- discovery.k8s.io
85+
resources:
86+
- endpointslices
87+
verbs:
88+
- get
89+
- list
90+
- watch
8391
- apiGroups:
8492
- ""
8593
resources:
8694
- replicationcontrollers
87-
- endpoints
8895
verbs:
8996
- get
9097
- apiGroups:

internal/test/resources.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4113,8 +4113,8 @@ func (r *TestResources) NewRole() *rbacv1.Role {
41134113
rules := []rbacv1.PolicyRule{
41144114
{
41154115
Verbs: []string{"get", "list", "watch"},
4116-
APIGroups: []string{""},
4117-
Resources: []string{"endpoints"},
4116+
APIGroups: []string{"discovery.k8s.io"},
4117+
Resources: []string{"endpointslices"},
41184118
},
41194119
{
41204120
Verbs: []string{"get"},

0 commit comments

Comments
 (0)