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

Could not update the hierarchical configuration - on Openshift #140

Closed
arturobrzut opened this issue Feb 1, 2022 · 12 comments
Closed

Could not update the hierarchical configuration - on Openshift #140

arturobrzut opened this issue Feb 1, 2022 · 12 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@arturobrzut
Copy link
Contributor

Environment Openshift 4.8
HNC v0.9.0

Hi
I install HNC on Openshift cluster 4.8
And I have such issue:

kubectl create namespace my-parent
namespace/my-parent created

kubectl hns create -n my-parent my-child1   
Successfully created "my-child1" subnamespace anchor in "my-parent" namespace

kubectl create namespace my-child2
namespace/my-child2 created

kubectl hns set my-child2 --parent my-parent
Setting the parent of my-child2 to my-parent

Could not update the hierarchical configuration of my-child2.
Reason: admission webhook "hierarchyconfigurations.hnc.x-k8s.io" denied the request: Cannot update hierarchy because it would overwrite the following object(s):
  * Namespace "my-child2": system:image-pullers (rbac.authorization.k8s.io/v1, Kind=RoleBinding)
  * Namespace "my-child2": system:image-builders (rbac.authorization.k8s.io/v1, Kind=RoleBinding)
  * Namespace "my-child2": system:deployers (rbac.authorization.k8s.io/v1, Kind=RoleBinding)
To fix this, please rename or remove the conflicting objects first.

Can we turn off checking some OCP resource in HNC?

@adrianludwin
Copy link
Contributor

adrianludwin commented Feb 1, 2022 via email

@arturobrzut
Copy link
Contributor Author

@adrianludwin
It works when I add annotations in parent namespace resources

but I want to add PR which exclude this 3 RoleBinding
I will prepare it

@adrianludwin
Copy link
Contributor

adrianludwin commented Feb 1, 2022 via email

@arturobrzut
Copy link
Contributor Author

Ok I will describe it in doc

https://github.com/kubernetes-sigs/hierarchical-namespaces/blob/master/docs/user-guide/concepts.md#built-in-exceptions

these 3 RoleBindings are always created by Openshift
image

@erikgb
Copy link
Contributor

erikgb commented Feb 1, 2022

Could it make sense to skip all "system" roles (system:.*) by default? Or would that be too generic?

@adrianludwin
Copy link
Contributor

adrianludwin commented Feb 1, 2022 via email

@arturobrzut
Copy link
Contributor Author

arturobrzut commented Feb 2, 2022

and now maybe exclude by annotations
e.g.
if openshift annotation exists with any value - do not propagate
Annotations: openshift.io/description:

@erikgb
Copy link
Contributor

erikgb commented Feb 2, 2022

As already suggested above, I think it would make more sense to exclude HNC propagation of roles/rolebindings with names that have a system: prefix. And not do something tailored for Openshift to resolve this issue. IMO the Kubernetes documentation could be used to support this point of view: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings. The note addresses clusterroles/clusterrolebindings, but I think it could be argued that the same principle should/could be applied to roles/rolebindings in HNC.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 3, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 2, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants