stackabletech / spark-k8s-operator

Operator for Apache Spark-on-Kubernetes for Stackable Data Platform
https://stackable.tech
Other
47 stars 2 forks source link

fix: Add missing deletecollection RBAC permission #313

Closed sbernauer closed 7 months ago

sbernauer commented 7 months ago

Description

Fixes https://github.com/stackabletech/spark-k8s-operator/issues/316 Other user has reported as well:

When I’m running my teragen spark job I see an error at the end. Is the default RBAC not being applied is something missing from it?

2023-11-28T13:05:23,601 ERROR [main] org.apache.spark.util.Utils - Uncaught exception in thread main io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: DELETE at: https://kubernetes.default.svc/api/v1/namespaces/default/configmaps?labelSelector=spark-app-selector%3Dspark-6d6176af4a3244b3932a9ef1ad5c53fe%2Cspark-role%3Dexecutor. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. configmaps is forbidden: User "system:serviceaccount:default:spark-teragen" cannot deletecollection resource "configmaps" in API group "" in the namespace "default".

Definition of Done Checklist

# Author
- [ ] Changes are OpenShift compatible
- [ ] CRD changes approved
- [ ] Helm chart can be installed and deployed operator works
- [ ] Integration tests passed (for non trivial changes)
- [ ] Changes need to be "offline" compatible
# Reviewer
- [ ] Code contains useful comments
- [ ] (Integration-)Test cases added
- [ ] Documentation added or updated
- [ ] Changelog updated
- [ ] Cargo.toml only contains references to git tags (not specific commits or branches)
# Acceptance
- [ ] Feature Tracker has been updated
- [ ] Proper release label has been added
maltesander commented 7 months ago

Should this be cherry picked to 23.11?

lfrancke commented 7 months ago

If we can, that'd be great. But if it is too much of a hassle leave it.

sbernauer commented 7 months ago

+1. We already had a discussion on Slack as well: https://stackable-workspace.slack.com/archives/C037Q9DPF4P/p1701180253227739