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

Controlling Service Account roles when using the Kubernetes and Kubernetes Client extension #16612

Closed
bpasson opened this issue Apr 18, 2021 · 4 comments · Fixed by #31797
Closed
Labels
Milestone

Comments

@bpasson
Copy link
Contributor

bpasson commented Apr 18, 2021

Description

It currently is impossible to disable the service account generation when using the Kubernetes en Kubernetes Client extension in a project. It gererates a service account and a rolebinding linked to view role. Sometimes this is not strict enough. It is possible to work around using Kustomize, but this way using the deployment feature of the Kubernetes extension is impossible.

Being able to disable the Service Account generation will solve this, but that is not optimal as a Service Account and RoleBinding would have to be applied outside of the extension control.

An other option might be to specify a role to bind to in stead of view. The role could either be provided using the kubernetes.yml in the source tree or be provided or it would need to be present on deployment already. Any check on the existence of the role should be configurable.

@bpasson bpasson added the kind/enhancement New feature or request label Apr 18, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 18, 2021

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Apr 18, 2021

We could likely have a config property that controls this behavor, WDYT @iocanel ?

@iocanel
Copy link
Contributor

iocanel commented Apr 19, 2021

In theory people could specify the rbac configuration in src/main/kubernetes and make it as strict as they need to.

Haven't tried it though...

Now I can see a feature flag to disable the generation of rbac resources. Also we could point to an existing Role binding or even control the privileges. These are all valid approaches.

@bpasson
Copy link
Contributor Author

bpasson commented Apr 19, 2021

@iocanel specifying the rbac configuration src/main/kubernetes does add them to the generated descriptors, but if the name is not the same as would be generated it is just added and the *-view rolebinding is still generated. A bit more control over how it all is generated seems a good idea to me.

Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 13, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate. 

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 14, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate. 

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 15, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate. 

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 15, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate. 

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 15, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate. 

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 16, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate.

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 16, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate.

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 16, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate.

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 17, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate.

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 17, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate.

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
Sgitario added a commit to Sgitario/quarkus that referenced this issue Mar 21, 2023
These changes address a long-time issue in regards of K8s RBAC resources (see related issues).

These changes allow to generate custom Roles, ClusterRoles, ServiceAccount, and RoleBindings.
Plus, it allows the Kubernetes Client and Kubernetes Config extensions to configure the role binding to generate.

Fix quarkusio#16612
Fix quarkusio#19286
Fix quarkusio#15422
@quarkus-bot quarkus-bot bot added this to the 3.0 - main milestone Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants