You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 5. Check metrics-reader (MOST DANGEROUS - very generic name)
115
133
# First, check if it's being used by any rolebindings OTHER than barman's:
116
-
kubectl get clusterrolebinding -o json | jq -r '.items[] | select(.roleRef.name=="metrics-reader") | "\(.metadata.name) -> \(.subjects[0].name) in \(.subjects[0].namespace)"'
117
-
# If this shows ANY rolebindings, review them carefully. Only proceed if they're all barman-related.
118
-
# Then check the role itself:
134
+
kubectl get clusterrolebinding -o json | jq -r '.items[] \
135
+
| select(.roleRef.name=="metrics-reader") \
136
+
| "\(.metadata.name) -> \(.subjects[0].name) in \(.subjects[0].namespace)"'
137
+
# If this shows ANY rolebindings, review them carefully. Only proceed if
138
+
# they're all Barman-related. Then check the role itself:
119
139
kubectl describe clusterrole metrics-reader
120
-
# If it ONLY has nonResourceURLs: /metrics and NO other rolebindings use it, delete it:
140
+
# If it ONLY has nonResourceURLs: /metrics and NO other rolebindings use it,
141
+
# delete it:
121
142
kubectl delete clusterrole metrics-reader
122
143
```
123
144
124
145
:::warning
125
-
The `metrics-reader` role is particularly dangerous to delete blindly. Many monitoring systems use this exact name. Only delete it if:
146
+
The `metrics-reader` role is particularly dangerous to delete blindly. Many
147
+
monitoring systems use this exact name. Only delete it if:
148
+
126
149
1. You've verified it ONLY grants access to `/metrics`
127
150
2. No other rolebindings reference it (checked with the jq command above)
128
151
3. You're certain it was created by the Barman Cloud plugin
129
152
130
-
If you're unsure, it's safer to leave it and let the new `barman-plugin-metrics-reader` role coexist with it.
153
+
If you're unsure, it's safer to leave it and let the new
154
+
`barman-plugin-metrics-reader` role coexist with it.
131
155
:::
132
156
133
-
If any resource is not found during the `describe` command, that's okay - it means it was never created or already deleted. Simply skip the delete command for that resource.
157
+
If any resource is not found during the `describe` command, that's okay - it
158
+
means it was never created or already deleted. Simply skip the delete command
159
+
for that resource.
134
160
135
161
### Step 3: Delete Old Namespace-scoped Resources
136
162
@@ -142,12 +168,17 @@ kubectl delete role leader-election-role -n cnpg-system
If any resource is not found, that's okay - it means it was never created or already deleted.
171
+
If any resource is not found, that's okay - it means it was never created or
172
+
already deleted.
146
173
147
174
## Impact
148
175
149
-
-**Permissions:** If you have custom RBAC rules or tools that reference the old resource names, they will need to be updated.
150
-
-**External Users:** If end users have been granted the `objectstore-viewer-role` or `objectstore-editor-role`, they will need to be re-granted the new role names (`barman-plugin-objectstore-viewer-role` and `barman-plugin-objectstore-editor-role`).
176
+
-**Permissions:** If you have custom RBAC rules or tools that reference the
177
+
old resource names, they will need to be updated.
178
+
-**External Users:** If end users have been granted the
179
+
`objectstore-viewer-role` or `objectstore-editor-role`, they will need to be
180
+
re-granted the new role names (`barman-plugin-objectstore-viewer-role` and
181
+
`barman-plugin-objectstore-editor-role`).
151
182
152
183
## Verification
153
184
@@ -184,4 +215,5 @@ If the plugin fails to start after migration, check:
184
215
185
216
## Support
186
217
187
-
If you encounter issues during migration, please open an issue on the [GitHub repository](https://github.com/cloudnative-pg/plugin-barman-cloud/issues).
218
+
If you encounter issues during migration, please open an issue on the [GitHub
0 commit comments