Skip to content

Commit

Permalink
Altered network policy to allow all trafic for head & worker pods
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbins228 committed Apr 23, 2024
1 parent 1e76157 commit 651f2df
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions pkg/controllers/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,10 @@ func desiredNetworkPolicy(cluster *rayv1.RayCluster, cfg *config.KubeRayConfigur
WithPodSelector(metav1ac.LabelSelector().WithMatchLabels(map[string]string{"ray.io/cluster": cluster.Name, "ray.io/node-type": "head"})).
WithIngress(
networkingv1ac.NetworkPolicyIngressRule().
WithPorts(
networkingv1ac.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(6379)),
networkingv1ac.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(10001)),
networkingv1ac.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(8080)),
networkingv1ac.NetworkPolicyPort().WithProtocol(corev1.ProtocolTCP).WithPort(intstr.FromInt(8265)),
).WithFrom(
networkingv1ac.NetworkPolicyPeer().WithPodSelector(metav1ac.LabelSelector()),
),
WithFrom(
networkingv1ac.NetworkPolicyPeer().WithPodSelector(metav1ac.LabelSelector().WithMatchLabels(map[string]string{"ray.io/cluster-name": cluster.Name, "ray.io/node-type": "head"})),
networkingv1ac.NetworkPolicyPeer().WithPodSelector(metav1ac.LabelSelector().WithMatchLabels(map[string]string{"ray.io/cluster": cluster.Name, "ray.io/node-type": "worker"})),
),
networkingv1ac.NetworkPolicyIngressRule().
WithFrom(
networkingv1ac.NetworkPolicyPeer().WithPodSelector(metav1ac.LabelSelector().
Expand Down

0 comments on commit 651f2df

Please sign in to comment.