-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
base: main
Are you sure you want to change the base?
feat:devbox websocket. #5266
Conversation
🤖 Generated by lychee actionSummary
Errors per inputErrors in docs/blog/zh-Hans/2024/how-to-deploy-and-configure-meilisearch-using-docker/index.md
Full action output |
@@ -117,12 +118,15 @@ type DevboxSpec struct { | |||
|
|||
type NetworkStatus struct { | |||
// +kubebuilder:default=NodePort | |||
// +kubebuilder:validation:Enum=NodePort;Tailnet |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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{ |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already fix it.
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, | ||
}, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mv to a func.
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controllers/devbox/cmd/main.go
Outdated
@@ -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") |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already fix it.
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"), | ||
}, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already fix it.
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
0bb2886
to
8efd4fe
Compare
feat:devbox controller support websocket
8efd4fe
to
384d288
Compare
📘 Preview documentation website |
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 <[email protected]> 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
d178398
to
676a495
Compare
No description provided.