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

[BUG] Error applying ActorSystem on Openshift #262

Closed
h3nrique opened this issue Oct 26, 2023 · 2 comments
Closed

[BUG] Error applying ActorSystem on Openshift #262

h3nrique opened this issue Oct 26, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@h3nrique
Copy link
Contributor

Describe the bug
Operator throws error when deployed ActorSystem on Openshift.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy operator on openshift
  2. Deploy a demo ActorSystem
  3. See error on container operator

2023-10-26 14:58:20.078 [spawn_operator@spawn-operator-7f794947fb-ngzjm]:[pid=<0.2977.0> ]:[error]:{"eigr-functions/spawn-demo", "spawn-eigr.io/v1", "Kind=ActorSystem, Action=:add"} - Failed applying descending (child) resource {"eigr-functions/spawn-demo-role", "rbac.authorization.k8s.io/v1", "Kind=Role"}. roles.rbac.authorization.k8s.io "spawn-demo-role" is forbidden: User "system:serviceaccount:eigr-functions:spawn-operator" cannot patch resource "roles" in API group "rbac.authorization.k8s.io" in the namespace "eigr-functions"
2023-10-26 14:58:20.078 [spawn_operator@spawn-operator-7f794947fb-ngzjm]:[pid=<0.2977.0> ]:[error]:Task #PID<0.2977.0> started from #PID<0.2974.0> terminating
** (RuntimeError) {"eigr-functions/spawn-demo", "spawn-eigr.io/v1", "Kind=ActorSystem, Action=:add"} - Failed applying descending (child) resource {"eigr-functions/spawn-demo-role", "rbac.authorization.k8s.io/v1", "Kind=Role"}. roles.rbac.authorization.k8s.io "spawn-demo-role" is forbidden: User "system:serviceaccount:eigr-functions:spawn-operator" cannot patch resource "roles" in API group "rbac.authorization.k8s.io" in the namespace "eigr-functions"
(bonny 1.2.1) lib/bonny/axn.ex:406: anonymous fn/4 in Bonny.Axn.apply_descendants/2
(elixir 1.14.0) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
(bonny 1.2.1) lib/bonny/axn.ex:382: Bonny.Axn.apply_descendants/2
(spawn_operator 0.0.0-local.dev) lib/spawn_operator/operator.ex:1: SpawnOperator.Operator.pluggable_builder_call/2
(bonny 1.2.1) lib/bonny/operator.ex:155: Bonny.Operator.run/4
(elixir 1.14.0) lib/stream.ex:612: anonymous fn/4 in Stream.map/2
(elixir 1.14.0) lib/enum.ex:4751: Enumerable.List.reduce/3
(elixir 1.14.0) lib/stream.ex:1026: Stream.do_transform_inner_list/7
Function: &Bonny.Server.AsyncStreamRunner.run/2
Args: [#Stream<[enum: #Function<60.124013645/2 in Stream.transform/3>, funs: [#Function<48.124013645/1 in Stream.map/2>, #Function<48.124013645/1 in Stream.map/2>]]>, nil]

Screenshots
image

Kubernetes (please complete the following information):

  • Version v1.24.15+a9da4a8
  • Provider: Openshift 4.11.48

Spawn Operator

  • Version v1.0.0-rc.19

Spawn Proxy (please complete the following information):

  • Version v1.0.0-rc.19

Additional context
I'm trying to deploy demo application (https://github.com/h3nrique/postalcode-spawn-demo) on Openshift.

@h3nrique h3nrique added the bug Something isn't working label Oct 26, 2023
@h3nrique
Copy link
Contributor Author

h3nrique commented Oct 26, 2023

As workaround, I changed ClusterRole spawn-operator in manifest.yaml as below to work on Openshift.

resource serviceaccount to serviceaccounts
image

resource role to roles, and add rolebindings
image

The results is a deployed ActorSystem and ActorHost with success
image

image

@sleipnir
Copy link
Member

Closed by #263

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants