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

feat:devbox websocket. #5266

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

bearslyricattack
Copy link
Member

No description provided.

@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Dec 5, 2024

🤖 Generated by lychee action

Summary

Status Count
🔍 Total 2255
✅ Successful 530
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 1722
❓ Unknown 0
🚫 Errors 1

Errors per input

Errors in docs/blog/zh-Hans/2024/how-to-deploy-and-configure-meilisearch-using-docker/index.md

Full action output

Full Github Actions output

@@ -117,12 +118,15 @@ type DevboxSpec struct {

type NetworkStatus struct {
// +kubebuilder:default=NodePort
// +kubebuilder:validation:Enum=NodePort;Tailnet
Copy link
Collaborator

Choose a reason for hiding this comment

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

make manifest to generate crd.

IngressClassName: &className,
Rules: []networkingv1.IngressRule{
{
Host: devbox.Name + "." + r.HostPath,
Copy link
Collaborator

Choose a reason for hiding this comment

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

use rand str as domain and set to devbox status. Use status.websocket.proxyDomain if exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

}
}

podName := devbox.Name + "-proxy-pod"
Copy link
Collaborator

Choose a reason for hiding this comment

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

use a func to generate proxy pod name.

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

return err
}

sshPort := "22"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the purpose of this code?

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

"sh",
"-c",
},
Args: []string{
Copy link
Collaborator

Choose a reason for hiding this comment

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

use a func to generate this...

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

proxySvc.Spec.Ports[0].Name = expectServiceSpec.Ports[0].Name
proxySvc.Spec.Ports[0].Port = expectServiceSpec.Ports[0].Port
proxySvc.Spec.Ports[0].TargetPort = expectServiceSpec.Ports[0].TargetPort
proxySvc.Spec.Ports[0].Protocol = expectServiceSpec.Ports[0].Protocol
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need to do these checks...

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

Comment on lines 419 to 448
runtimecr, err := r.getRuntime(ctx, devbox)
if err != nil {
return err
}
var servicePorts []corev1.ServicePort
for _, port := range runtimecr.Spec.Config.Ports {
servicePorts = append(servicePorts, corev1.ServicePort{
Name: port.Name,
Port: port.ContainerPort,
TargetPort: intstr.FromInt32(port.ContainerPort),
Protocol: port.Protocol,
})
}
if len(servicePorts) == 0 {
servicePorts = []corev1.ServicePort{
{
Name: "devbox-ssh-port",
Port: 22,
TargetPort: intstr.FromInt32(22),
Protocol: corev1.ProtocolTCP,
},
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

mv to a func.

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

return nil
}

func (r *DevboxReconciler) syncPodSvc(ctx context.Context, devbox *devboxv1alpha1.Devbox, recLabels map[string]string, servicePorts []corev1.ServicePort) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -93,6 +96,9 @@ func main() {
flag.Float64Var(&requestMemoryRate, "request-memory-rate", 10, "The request rate of memory limit in devbox.")
flag.StringVar(&requestEphemeralStorage, "request-ephemeral-storage", "500Mi", "The request value of ephemeral storage in devbox.")
flag.StringVar(&limitEphemeralStorage, "limit-ephemeral-storage", "10Gi", "The limit value of ephemeral storage in devbox.")
flag.StringVar(&webSocketImage, "websocket-image", "bearslyricattack/chisel:1.0", "The image name of devbox websocket proxy pod")
flag.StringVar(&hostPath, "host-path", "sealoshzh.site", "The host path of devbox ingress")
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename to websocket-proxy-domain

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

Comment on lines 447 to 454
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("100Mi"),
},
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("100Mi"),
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

requset use 10m, limit use 50m.

Copy link
Member Author

Choose a reason for hiding this comment

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

already fix it.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.97%. Comparing base (b57e851) to head (2051685).
Report is 88 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5266   +/-   ##
=======================================
  Coverage   61.97%   61.97%           
=======================================
  Files           8        8           
  Lines         647      647           
=======================================
  Hits          401      401           
  Misses        200      200           
  Partials       46       46           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

feat:devbox controller support websocket
@sealos-ci-robot
Copy link
Member

sealos-ci-robot commented Dec 20, 2024

📘 Preview documentation website

👀 Visit Preview

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat:devbox controller support websocket

docs: change blog url (labring#5251)

Signed-off-by: Carson Yang <yangchuansheng33@gmail.com>

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

chore(fmt): format code

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

feat:devbox controller support websocket

chore(fmt): format code

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat:websocket auto shutdown

feat:websocket auto shutdown

chore(fmt): format code

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

chore(fmt): format code

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

feat:websocket auto shutdown

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

Successfully merging this pull request may close these issues.

3 participants