Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use operator-rs build_rbac_resources instead of own implementation #499

Open
maltesander opened this issue Nov 25, 2024 · 0 comments
Open

Comments

@maltesander
Copy link
Member

maltesander commented Nov 25, 2024

Issue checklist

PR stackabletech/issues#675 fixed a bug in operator-rs build_rbac_resources to improve ServiceAccount / RoleBinding deployment.

The spark-k8s operator uses its own method build_history_role_serviceaccount (only required for the history server). Although that method does not introduce the bug fixed in stackabletech/issues#675, it differs in terms of naming the ServiceAccount and RoleBinding (missing suffixes -serviceaccount and -rolebinding respectivly).

This should be consolidated.

A quick test lead to label differences of the ServiceAccount / RoleBinding. This needs investigation.

Generated labels using the spark-k8s-ops build_history_role_serviceaccount:

apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/component: node
    app.kubernetes.io/instance: spark-history
    app.kubernetes.io/managed-by: spark.stackable.tech_history
    app.kubernetes.io/name: spark-k8s
    app.kubernetes.io/role-group: history
    app.kubernetes.io/version: 3.5.2-stackable0.0.0-dev
    stackable.tech/vendor: Stackable
  name: spark-history
  ...

vs generated via operator-rs build_rbac_resources (only using cluster resources get_required_labels method):

apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
    app.kubernetes.io/instance: spark-history
    app.kubernetes.io/managed-by: spark.stackable.tech_history
    app.kubernetes.io/name: spark-k8s
  name: spark-history-serviceaccount
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant