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

Add deprecate description #127

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ empty
| 202 | |
| 500 | something went wrong (see logs of the simulator server) |

---
## **deprecated APIs**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## **deprecated APIs**
## deprecated APIs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed: 4d227ee


The following APIs are deprecated. They will be removed in the near future.
## Apply Node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change all deprecated APIs titles like this?

Suggested change
## Apply Node
### Apply Node

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed: 4d227ee


apply nodes.
Expand Down
4 changes: 2 additions & 2 deletions docs/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ Users can create resources below.
- Storage Classes
- Priority Classes

When users request to create resources, the simulator server will create it with requesting kube-apiserver.
When users request to create resources, the simulator's frontend will create it with requesting kube-apiserver.

## 2. the scheduler schedules a new pod.

When a new pod is created through kube-apiserver by the simulator server, the scheduler will notice that the pod has been created and start scheduling.
When a new pod is created through kube-apiserver, the scheduler will notice that the pod has been created and start scheduling.

## 3. the results of score/filter plugins are recorded.

Expand Down
15 changes: 15 additions & 0 deletions server/handler/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
)

// NodeHandler is handler for manage nodes.
//
// Deprecated: NodeHandler exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
type NodeHandler struct {
service di.NodeService
}
Expand All @@ -22,6 +25,9 @@ func NewNodeHandler(s di.NodeService) *NodeHandler {
}

// ApplyNode handles the endpoint for applying node.
//
// Deprecated: ApplyNode exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *NodeHandler) ApplyNode(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -41,6 +47,9 @@ func (h *NodeHandler) ApplyNode(c echo.Context) error {
}

// GetNode handles the endpoint for getting node.
//
// Deprecated: GetNode exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *NodeHandler) GetNode(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -59,6 +68,9 @@ func (h *NodeHandler) GetNode(c echo.Context) error {
}

// ListNode handles the endpoint for listing node.
//
// Deprecated: ListNode exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *NodeHandler) ListNode(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -72,6 +84,9 @@ func (h *NodeHandler) ListNode(c echo.Context) error {
}

// DeleteNode handles the endpoint for deleting node.
//
// Deprecated: DeleteNode exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *NodeHandler) DeleteNode(c echo.Context) error {
ctx := c.Request().Context()

Expand Down
15 changes: 15 additions & 0 deletions server/handler/persistentvolume.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
)

// PersistentVolumeHandler is handler for manage persistentVolume.
//
// Deprecated: PersistentVolumeHandler exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
type PersistentVolumeHandler struct {
service di.PersistentVolumeService
}
Expand All @@ -22,6 +25,9 @@ func NewPersistentVolumeHandler(s di.PersistentVolumeService) *PersistentVolumeH
}

// ApplyPersistentVolume handles the endpoint for applying persistentVolume.
//
// Deprecated: ApplyPersistentVolume exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeHandler) ApplyPersistentVolume(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -41,6 +47,9 @@ func (h *PersistentVolumeHandler) ApplyPersistentVolume(c echo.Context) error {
}

// GetPersistentVolume handles the endpoint for getting persistentVolume.
//
// Deprecated: GetPersistentVolume exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeHandler) GetPersistentVolume(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -59,6 +68,9 @@ func (h *PersistentVolumeHandler) GetPersistentVolume(c echo.Context) error {
}

// ListPersistentVolume handles the endpoint for listing persistentVolume.
//
// Deprecated: ListPersistentVolume exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeHandler) ListPersistentVolume(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -72,6 +84,9 @@ func (h *PersistentVolumeHandler) ListPersistentVolume(c echo.Context) error {
}

// DeletePersistentVolume handles the endpoint for deleting persistentVolume.
//
// Deprecated: DeletePersistentVolume exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeHandler) DeletePersistentVolume(c echo.Context) error {
ctx := c.Request().Context()

Expand Down
15 changes: 15 additions & 0 deletions server/handler/persistentvolumeclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
)

// PersistentVolumeClaimHandler is handler for manage persistentVolumeClaim.
//
// Deprecated: PersistentVolumeClaimHandler exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
type PersistentVolumeClaimHandler struct {
service di.PersistentVolumeClaimService
}
Expand All @@ -22,6 +25,9 @@ func NewPersistentVolumeClaimHandler(s di.PersistentVolumeClaimService) *Persist
}

// ApplyPersistentVolumeClaim handles the endpoint for applying persistentVolumeClaim.
//
// Deprecated: ApplyPersistentVolumeClaim exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeClaimHandler) ApplyPersistentVolumeClaim(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -41,6 +47,9 @@ func (h *PersistentVolumeClaimHandler) ApplyPersistentVolumeClaim(c echo.Context
}

// GetPersistentVolumeClaim handles the endpoint for getting persistentVolumeClaim.
//
// Deprecated: GetPersistentVolumeClaim exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeClaimHandler) GetPersistentVolumeClaim(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -59,6 +68,9 @@ func (h *PersistentVolumeClaimHandler) GetPersistentVolumeClaim(c echo.Context)
}

// ListPersistentVolumeClaim handles the endpoint for listing persistentVolumeClaim.
//
// Deprecated: ListPersistentVolumeClaim exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeClaimHandler) ListPersistentVolumeClaim(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -72,6 +84,9 @@ func (h *PersistentVolumeClaimHandler) ListPersistentVolumeClaim(c echo.Context)
}

// DeletePersistentVolumeClaim handles the endpoint for deleting persistentVolumeClaim.
//
// Deprecated: DeletePersistentVolumeClaim exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PersistentVolumeClaimHandler) DeletePersistentVolumeClaim(c echo.Context) error {
ctx := c.Request().Context()

Expand Down
15 changes: 15 additions & 0 deletions server/handler/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
)

// PodHandler is handler for manage pod.
//
// Deprecated: PodHandler exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
type PodHandler struct {
service di.PodService
}
Expand All @@ -22,6 +25,9 @@ func NewPodHandler(s di.PodService) *PodHandler {
}

// ApplyPod handles the endpoint for applying pod.
//
// Deprecated: ApplyPod exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PodHandler) ApplyPod(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -41,6 +47,9 @@ func (h *PodHandler) ApplyPod(c echo.Context) error {
}

// GetPod handles the endpoint for getting pod.
//
// Deprecated: GetPod exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PodHandler) GetPod(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -59,6 +68,9 @@ func (h *PodHandler) GetPod(c echo.Context) error {
}

// ListPod handles the endpoint for listing pod.
//
// Deprecated: ListPod exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PodHandler) ListPod(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -72,6 +84,9 @@ func (h *PodHandler) ListPod(c echo.Context) error {
}

// DeletePod handles the endpoint for deleting pod.
//
// Deprecated: DeletePod exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PodHandler) DeletePod(c echo.Context) error {
ctx := c.Request().Context()

Expand Down
15 changes: 15 additions & 0 deletions server/handler/priorityclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
)

// PriorityClassHandler is a handler for managing priorityClass.
//
// Deprecated: PriorityClassHandler exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
type PriorityClassHandler struct {
service di.PriorityClassService
}
Expand All @@ -22,6 +25,9 @@ func NewPriorityClassHandler(s di.PriorityClassService) *PriorityClassHandler {
}

// ApplyPriorityClass handles the endpoint for applying priorityClass.
//
// Deprecated: ApplyPriorityClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PriorityClassHandler) ApplyPriorityClass(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -41,6 +47,9 @@ func (h *PriorityClassHandler) ApplyPriorityClass(c echo.Context) error {
}

// GetPriorityClass handles the endpoint for getting priorityClass.
//
// Deprecated: GetPriorityClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PriorityClassHandler) GetPriorityClass(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -59,6 +68,9 @@ func (h *PriorityClassHandler) GetPriorityClass(c echo.Context) error {
}

// ListPriorityClass handles the endpoint for listing priorityClass.
//
// Deprecated: ListPriorityClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PriorityClassHandler) ListPriorityClass(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -72,6 +84,9 @@ func (h *PriorityClassHandler) ListPriorityClass(c echo.Context) error {
}

// DeletePriorityClass handles the endpoint for deleting priorityClass.
//
// Deprecated: DeletePriorityClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *PriorityClassHandler) DeletePriorityClass(c echo.Context) error {
ctx := c.Request().Context()

Expand Down
15 changes: 15 additions & 0 deletions server/handler/storageclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
)

// StorageClassHandler is handler for manage storageClass.
//
// Deprecated: StorageClassHandler exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
type StorageClassHandler struct {
service di.StorageClassService
}
Expand All @@ -22,6 +25,9 @@ func NewStorageClassHandler(s di.StorageClassService) *StorageClassHandler {
}

// ApplyStorageClass handles the endpoint for applying storageClass.
//
// Deprecated: ApplyStorageClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *StorageClassHandler) ApplyStorageClass(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -41,6 +47,9 @@ func (h *StorageClassHandler) ApplyStorageClass(c echo.Context) error {
}

// GetStorageClass handles the endpoint for getting storageClass.
//
// Deprecated: GetStorageClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *StorageClassHandler) GetStorageClass(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -59,6 +68,9 @@ func (h *StorageClassHandler) GetStorageClass(c echo.Context) error {
}

// ListStorageClass handles the endpoint for listing storageClass.
//
// Deprecated: ListStorageClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *StorageClassHandler) ListStorageClass(c echo.Context) error {
ctx := c.Request().Context()

Expand All @@ -72,6 +84,9 @@ func (h *StorageClassHandler) ListStorageClass(c echo.Context) error {
}

// DeleteStorageClass handles the endpoint for deleting storageClass.
//
// Deprecated: DeleteStorageClass exists only for backward compatibility.
// It is not maintained now and will be deleted soon.
func (h *StorageClassHandler) DeleteStorageClass(c echo.Context) error {
ctx := c.Request().Context()

Expand Down