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

make deploy failing as ServiceAccount is created in default namespace and RoleBinding is missing the namespace. #96

Open
laxmikantbpandhare opened this issue Jul 19, 2022 · 1 comment

Comments

@laxmikantbpandhare
Copy link
Member

laxmikantbpandhare commented Jul 19, 2022

target/kubernetes/kubernetes.yml file got generated from the quarkus extension. The ServiceAccount created does not have any namespace that's why it gets created in the default namespace. As RoleBinding does not have the namespace mentioned throws the below error if you try to apply the above file.

Error from server (Invalid): error when creating "target/kubernetes/kubernetes.yml": ClusterRoleBinding.rbac.authorization.k8s.io "memcachedreconciler-cluster-role-binding" is invalid: subjects[0].namespace: Required value

Error from server (Invalid): error when creating "target/kubernetes/kubernetes.yml": ClusterRoleBinding.rbac.authorization.k8s.io "memcachedreconciler-crd-validating-role-binding" is invalid: subjects[0].namespace: Required value

What did you do?

Create docker image of operator and tries to run using make deploy.

What did you expect to see?

The operator will run without any error.

What did you see instead? Under which circumstances?

Got below errors

Error from server (Invalid): error when creating "target/kubernetes/kubernetes.yml": ClusterRoleBinding.rbac.authorization.k8s.io "memcachedreconciler-cluster-role-binding" is invalid: subjects[0].namespace: Required value

Error from server (Invalid): error when creating "target/kubernetes/kubernetes.yml": ClusterRoleBinding.rbac.authorization.k8s.io "memcachedreconciler-crd-validating-role-binding" is invalid: subjects[0].namespace: Required value

Environment

Operator type:

quarkus-memached-operator

Kubernetes cluster type:

kind

$ operator-sdk version

operator-sdk version: "v1.22.0-23-g6084e6cf-dirty", commit: "6084e6cf1eb393c38d9ebce8f9acee5628b3a5c3", kubernetes version: "v1.24.1", go version: "go1.18.3", GOOS: "darwin", GOARCH: "amd64"

$ java -version (if language is Java)

openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment (build 16.0.2+7-67)
OpenJDK 64-Bit Server VM (build 16.0.2+7-67, mixed mode, sharing)

$ kubectl version

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.0", GitCommit:"2c6062082e8dbbf36936b35dcc27c6882d3a2f67", GitTreeState:"clean", BuildDate:"2022-01-11T19:37:02Z", GoVersion:"go1.15.14", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}

Possible Solution

Need to discuss this with the Quarkus team.

@jmrodri
Copy link
Member

jmrodri commented Jul 28, 2022

July 28th java operators meeting, waiting on Need to discuss this with the Quarkus team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants