Description
The .spec.serviceAccount field in the ClusterExtension API is being deprecated. This field was originally introduced to enforce least privilege by requiring a user-provided ServiceAccount for managing extension content. However, due to operational complexity and limited benefit, we propose to:
- Mark the field as optional and deprecated.
- Update the controller to ignore this field and use its own ServiceAccount for all reconciliation.
- Log a deprecation warning if the field is set.
- Eventually remove the field entirely in a future update.
Motivation
The .spec.serviceAccount field was originally introduced to enable least privilege by allowing users to specify a custom ServiceAccount for reconciliation. However, this added operational complexity with token management and impersonation. Simplifying this by using the controller’s own ServiceAccount reduces complexity and centralizes permission management, providing a clearer and more maintainable security model.
Impact
- Users relying on .spec.serviceAccount impersonation will need to ensure the controller’s ServiceAccount has appropriate permissions.
- Any manifests using this field will see warnings and should be updated to remove it before its eventual removal.
Tasks:
Description
The .spec.serviceAccount field in the ClusterExtension API is being deprecated. This field was originally introduced to enforce least privilege by requiring a user-provided ServiceAccount for managing extension content. However, due to operational complexity and limited benefit, we propose to:
Motivation
The
.spec.serviceAccountfield was originally introduced to enable least privilege by allowing users to specify a custom ServiceAccount for reconciliation. However, this added operational complexity with token management and impersonation. Simplifying this by using the controller’s own ServiceAccount reduces complexity and centralizes permission management, providing a clearer and more maintainable security model.Impact
Tasks:
Create enhancement proposal in openshift/enhancements repo
Implement code changes
.spec.serviceAccountin controller logic.spec.serviceAccountas optional and deprecatedUpdate unit tests
.spec.serviceAccountis ignoredUpdate e2e tests
.spec.serviceAccountAdd or update upgrade test scenarios