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

support Namespace and change Web UI to support #84

Closed
sanposhiho opened this issue Jan 29, 2022 · 19 comments
Closed

support Namespace and change Web UI to support #84

sanposhiho opened this issue Jan 29, 2022 · 19 comments
Assignees
Labels
area/web Issues or PRs related to the Web UI. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@sanposhiho
Copy link
Member

Let's support Namespace.

I think it requires a big Web UI design change, because all resources are now created on the same namespace. We need to change Web UI to make it easier to understand which namespace each resource resides in.

@sanposhiho
Copy link
Member Author

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Jan 29, 2022
@momom-i
Copy link
Contributor

momom-i commented Feb 4, 2022

Hello, again. if no one working on it, I'd like to try it!

For backend side, I have an image for this implement like as follows.

  • Add namespace service that has Get, List, Apply and Delete method, same as node or pod
  • Change some method for namespaced resources to pass namespace info to them

Is my understanding almost correct?

@sanposhiho
Copy link
Member Author

Hi @momom-i.
This issue is not started. Please feel free to assign yourself with /assign

Yeah, your thought is right, but I feel the development for this issue should be done after #95.
After #95, we don't need to change the backend and can create/edit/delete namespaces by requesting kube-apiserver directly.

@momom-i
Copy link
Contributor

momom-i commented Feb 6, 2022

Thank you! I understand, so first I'm trying to work on #95 and then if it works, will be back on this issue later.

@196Ikuchil
Copy link
Contributor

Hi @momom-i
Are you currently working on this?
Would you like me to take it on?

@momom-i
Copy link
Contributor

momom-i commented May 6, 2022

@196Ikuchil Hi! No, I'm not working on it so you can take this freely.

@sanposhiho I've been a bit busy right now, but I'd like to contribute to this project. So I hope I can be back in the near future and we can work together :)

@196Ikuchil
Copy link
Contributor

196Ikuchil commented May 6, 2022

@momom-i Thanks for the reply👌 ok! Have a good GW:)

/assign

@sanposhiho
Copy link
Member Author

sanposhiho commented May 6, 2022

implementation tasks:

  • Design how to show Pods on namespace
    • I, personally, think it's difficult to show namespace on current Web UI 😓 . And given the current web UI may be deprecated, just add namespace column on table views is enough..?
  • support namespace as other resources.
    • create New Namepace button, namespace store, API client functions for namespace... etc

@196Ikuchil
Copy link
Contributor

@sanposhiho
For about #161.
Sorry for the lack of explanation.
I'm not talking about client.

When we use the importing function, some namespaced resources may belong to various namespaces.
And if we operate these resources (e.g. Delete), we call our API directory from web UI. Therefore, the namespace must also be registered with the API

The importing function call Apply method on each ResourceService (e.g. PodService).
So, I think that we must do register the namespace if it is new before applying.

@196Ikuchil
Copy link
Contributor

This was a correction omission of #116.
So, close #161 and reopen #116.

@196Ikuchil
Copy link
Contributor

196Ikuchil commented May 6, 2022

And also there is another bug.
We can't use metav1.NamespaceAll in call DeleteCollection method.
https://github.com/kubernetes-sigs/kube-scheduler-simulator/pull/137/files#diff-375d57e386f20eaa5f09f02bb9d28bfc48ac3dca18d0325f59492208219e5618R112

The above DeleteCollection function will eventually call the k8s API as shown in the code below.

	if err := s.client.CoreV1().Pods(metav1.NamespaceAll).DeleteCollection(ctx, metav1.DeleteOptions{
		// need to use noGrace to avoid waiting kubelet checking.
		// > When a force deletion is performed, the API server does not wait for confirmation from the kubelet that
		//   the Pod has been terminated on the node it was running on.
		// https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination-forced
		GracePeriodSeconds: &noGrace,
	}, lopts); err != nil {
		return fmt.Errorf("delete collection of pods: %w", err)
	}

Our server then outputs an error like this.

E0508 00:02:56.095272   48085 reset.go:25] failed to reset all resources and schediler configuration: delete collecton of pod service:
    github.com/kubernetes-sigs/kube-scheduler-simulator/reset.(*Service).Reset.func1
        /Users/user/kube-scheduler-simulator/reset/reset.go:66
  - delete collection of pods: the server does not allow this method on the requested resource

This is because that DeleteCollection must specify a namespace. (※namespaceall is available for the List.)
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#delete-collection-pod-v1-core

Therefore, I think it needs to be modified to check all namespaces recursively.
This issue will be resolved in #162.

@sanposhiho
Copy link
Member Author

/triage accepted
Not to mark as stale.

@k8s-ci-robot k8s-ci-robot added the triage/accepted Indicates an issue or PR is ready to be actively worked on. label Jun 7, 2022
@sanposhiho
Copy link
Member Author

/area web

@k8s-ci-robot k8s-ci-robot added the area/web Issues or PRs related to the Web UI. label Sep 4, 2022
@196Ikuchil
Copy link
Contributor

Design how to show Pods on namespace
I, personally, think it's difficult to show namespace on current Web UI 😓 . And given the current web UI may be deprecated, just add namespace column on table views is enough..?

support namespace as other resources.
create New Namepace button, namespace store, API client functions for namespace... etc
#84 (comment)

The first one, I think is related to the table view which is the alpha feature on the web. We wouldn't need to spend any time discussing it if the feature is adopted early.

The second one is a basic function and should be implemented as soon as possible.

@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 Dec 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 Jan 2, 2023
@sanposhiho
Copy link
Member Author

/remove-lifecycle rotten
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jan 17, 2023
@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Jan 17, 2023
@196Ikuchil
Copy link
Contributor

This issue already has been resolved in #236

/close

@k8s-ci-robot
Copy link
Contributor

@196Ikuchil: Closing this issue.

In response to this:

This issue already has been resolved in #236

/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
area/web Issues or PRs related to the Web UI. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

5 participants