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

Fix status update issue and redis port formatting issue #16

Merged
merged 3 commits into from
Sep 5, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion bytedance/examples/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
object-manager-port: '12345'
node-manager-port: '12346'
object-store-memory: '100000000'
redis-password: 'LetMeInRay'
redis-password: 'AwesomeRay'
dashboard-host: '0.0.0.0'
num-cpus: '1'
node-ip-address: $MY_POD_IP
Expand Down
5 changes: 3 additions & 2 deletions bytedance/pkg/controllers/utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utils
import (
"bytes"
"fmt"
"strconv"

rayiov1alpha1 "github.com/ray-project/ray-contrib/bytedance/pkg/api/v1alpha1"
"github.com/ray-project/ray-contrib/bytedance/pkg/controllers/common"
Expand Down Expand Up @@ -89,7 +90,7 @@ func SetContainerEnvs(container *corev1.Container, rayNodeType rayiov1alpha1.Ray
if !envVarExists(common.RayHeadServicePortEnv, container.Env) {
port := corev1.EnvVar{Name: common.RayHeadServicePortEnv}
if value, ok := params["port"]; !ok {
port.Value = string(common.DefaultRedisPort)
port.Value = strconv.Itoa(common.DefaultRedisPort)
} else {
port.Value = value
}
Expand Down Expand Up @@ -123,7 +124,7 @@ func AddServiceAddress(params map[string]string, nodeType rayiov1alpha1.RayNodeT
if _, ok := params["address"]; !ok {
var svcPort string
if _, ok := params["port"]; !ok {
svcPort = string(common.DefaultRedisPort)
svcPort = strconv.Itoa(common.DefaultRedisPort)
} else {
svcPort = params["port"]
}
Expand Down
2 changes: 1 addition & 1 deletion bytedance/pkg/controllers/v1alpha1/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (r *RayClusterReconciler) updateStatus(cluster *rayiov1alpha1.RayCluster) e
// TODO (@Jeffwan): Fetch head service and check if it's serving
// We always update cluster no matter if there's one change or not.
cluster.Status.LastUpdateTime.Time = time.Now()
if err := r.Update(context.TODO(), cluster); err != nil {
if err := r.Status().Update(context.TODO(), cluster); err != nil {
return err
}

Expand Down